Why did hot water squirt out of a squirt bottle when I placed it in cold water? A curious thing happened today, and I can't figure out why it happened. 
I had boiled some water, and put it in a squirt bottle. In order to cool the hot water down more quickly, I filled a secondary container with cold water, and placed my squirt bottle of hot water inside, like so (blue for cold water, red for hot):

The moment I did this, I noticed hot water squirting out of the spout on the top. I am certain that I didn't squeeze the bottle myself. Later, once the temperatures had equalized a bit, I tried dunking the now-lukewarm squirt bottle in the lukewarm water bath again, and did not see the same effect. This leads me to believe that the temperature differential was involved. 
Why did putting the hot squirt bottle in cold water cause hot water to squirt out?
 A: Suggest that the bottle itself contracted on contact with the cold water' causing the ejection you noticed. This would happen before enough heat had conducted from the interior of the contents to the outside to cool the contents appreciably. Remember that water has a very high specific heat capacity and would have to lose considerable heat before its temperature dropped enough for its contraction to be noticeable.
A: If hot water came out of the squeeze bottle, then either the volume of the water in the bottle got bigger, or the volume of the airspace in the bottle got bigger, or the interior volume ofthe bottle got smaller.  Squeezing would have made the bottle smaller, which is why it occurred to you.  Reducing temperature also makes most things smaller.  So a plausible explanation is that, as the bottle cooled, the volume of the bottle shrank more than the volume of the water inside of it.
Most plastic bottles are polyethylene or polypropylene, which have coefficients of linear expansion of order $200\rm\,ppm/K$ (with ppm = "part per million" = $10^{-6}$).  Volume goes like length cubed, so the coefficient of volume expansion is three times the length coefficient (one length in each dimension), about $6\times 10^{-4}\rm/K$.
The volume coefficient for water depends on temperature, because water has its unusual density maximum at 4C, but
the expansion coefficient
is smaller than the volume coefficient for plastic for water below about 50C.
Furthermore, when you put the hot water bottle into the cold water, the bottle cools off more rapidly than the water it contains.
Now the air in the bottle has the largest coefficient of thermal expansion: an ideal gas has volume proportional to temperature, and so room-temperature air has a volume expansion coefficient of $\frac1{300}\rm/K$.  But while you're cooling the hot bottle, it and its contents are not in thermal equlibirium.  It's plausible that, in the situation you've sketched, you'd have the largest volume change in the plastic of the bottle.
If we're talking a temperature change of 50C (hot tap water, but not scalding) to 10C, the volume change would be at most a fraction of a percent --- a few milliliters out of a one-liter bottle.
