The density of earth in terms of acceleration due to gravity (g), radius of earth (R) and universal gravitational constant (G) is :
4πRG3g
3πRG4g
4g3πRG
3g4πRG
g=GMR2=43πGρR⇒ρ=3g4πGR