Before the experiment you can measure the mass of both objects. In the experiment you measure the force and distance to calculate the constant.
The weight either object gives you the force between that object and earth (adjusting for atmospheric buoyancy). Altitude at your location + size and shape of earth gives distance between object and center of earth, you just learned the constant. So you know 4 out of five variables in an equation and can thus calculate the mass of the earth.
Technically that excludes the weight of the atmosphere above your altitude, but you can get that from the air pressure. Similarly the density of the earth isn’t constant but it is very close to symmetrical so you can get a reasonable estimate.
F_gravitational = G m1 m2 /r^2
g = G Mass_earth / r_earth^2
Mass_earth = r_earth^2 * g/G
Density_earth = r_earth^2 * g/G / V_earth
Density_earth = 3*g / (4*Pi*G*r_earth)
Prior to Cavendish we already new g and r_earth, just missing G.
- get the gravitational constant with these two known masses
- then can deduct the mass of the unknown Earth by its interaction with other masses (say the "g" gravitational acceleration value)
- then from the mass and the otherwise measured size of Earth the density pops out
More details in good ol' Wikipedia: https://en.wikipedia.org/wiki/Cavendish_experiment#Derivatio...
He uses his experiment to calculate G based only on the test masses and spring and then the _result_ of the calculation was just used as a final step to calculate the mass of the earth, and then from that the density?