Statistical physics provides the microscopic theory for thermodynamic macroscopic properties of a physical system. These lecture notes introduce the necessary concepts of statistics and analytical mechanics for equilibrium thermodynamics with partition functions. They cover classical and quantum statistics, and treat advanced topics such as Langevin dynamics , the Fokker-Planck equation and phase transitions. Many systems like ideal classical and relativistic gases are worked out in detail.