This lecture covers the derivation of the canonical distribution based on Gibbs's entropy and a maximum entropy principle. Starting with the microcanonical ensemble, the instructor explains the Lagrange multiplier method to enforce normalized probability. Moving on to the canonical ensemble, the lecture explores the constant-temperature case and the connection between Lagrange multipliers and thermodynamic variables. The discussion extends to systems with particles in external potentials, illustrating how energy depends on position and how this affects the probability distribution. Throughout, the focus is on maximizing entropy while respecting thermodynamic constraints.