A stochastic model of a temperature-dependent population