Step 1: Understanding Gravity Variation with Depth
The acceleration due to gravity at a depth \( d \) inside the Earth is given by the formula:
\[
g' = g \left( 1 - \frac{d}{R} \right)
\]
where:
\( g' \) is the acceleration due to gravity at depth \( d \),
\( g \) is the acceleration due to gravity on the surface,
\( R \) is the radius of the Earth.
Step 2: Explanation of the Formula
Gravity decreases linearly as we move inside the Earth because only the mass enclosed within radius \( R-d \) contributes to gravity at depth \( d \), following the equation:
\[
g' = g \times \frac{R - d}{R} = g \left( 1 - \frac{d}{R} \right)
\]
Thus, the correct option is:
\[
g' = g \left( 1 - \frac{d}{R} \right)
\]
which corresponds to option (D).