Title: Thermodynamics and statistics, with applications to gases