Consider this. I have an Earth-sized quantity of water that I throw into space. Naturally, it will assume the shape of a ball.
Now hear me out. Density's definition generally assumes that it will tend towards equalizing accross the whole material. However, a strong force of gravity to me would indicate that it actually becomes denser the closer you are to the center of mass in this case. It certainly seems to be in the case of Earth's crust and core.
So is there some sort of simple formula that ties these two properties together? Have I made a wrongful assumption somewhere?