Near room temperature, the density of water goes down as
the temperature goes up. This is shown in the following figure.
This has been known for a long time. About 400 years ago
Galileo use this to develop a thermometer. He built a thermometer
comprised of a number of small glass spheres with small tags
on the bottom and placed in a tall cylindrical container filled
with water. The water temperature is assumed to be close to
the room air temperature. The water thermometer value is read
as the number on the sphere tag which is at the bottom of
the floating spheres.
Select a temperature in the figure and see how the spheres
move. Change the water temperature by selecting the temperature
slider and moving it. Watch what happens to the spheres.
The reason they move as they do is that the effective density
of the sphere with the 72 number on it is made equal to the
density of water at 72 degrees. Remember the density of something
is just the weight of it divided by the volume. One way to
make these is to use a larger container of water with a better
thermometer in it. Heat it up till it is 72 degrees. Them
place the glass sphere with the 72 value tag into it. Add
small weights to the sphere until it will just stay motionless
in the water a few inches below the surface. It then has the
effective density of the water at this temperature. The water
is heated, or cooled, and the same procedure repeated for
all the rest of the spheres.
All the spheres that have tags values higher than the water
temperature will be near the surface while all those with
numbers lower will be near the bottom of the cylinder. As
the water temperature rises, the water density increases,
and some of the spheres which could float in the higher density
water now sink in the lighter density water.