Statistical approach to thermal evolution of neutron stars