According to Law of Gravitation:
F(r)=GMmr2
Now, if Earth is considered uniformly dense of density ρ0 then mass of Earth within the radius,r is given by:
M(r)=43πr3ρ0 (Mass = Volume × Density)
Now, F(r)=GMmr2=mg
So, acceleration due to gravity will be, g=F(r)m
g=Gr243πr3ρ0=(43Gπρ0)r
This shows that the value of ′g′ depends linearly on r. It decreases as r decreases (deep inside a mine).