Unit content
The microcanonical ensemble
An isolated system has fixed energy $E$, volume $V$ and particle number $N$. Statistical mechanics represents incomplete knowledge of its microscopic state by the microcanonical ensemble: all accessible microstates consistent with those macroscopic constraints are assigned equal probability.
If there are $\Omega(E,V,N)$ accessible discrete microstates, then $$P_i=\frac{1}{\Omega}.$$ For classical continuous systems, the corresponding construction uses the volume of the allowed region of phase space, with an appropriate normalization.
This equal-a-priori-probability rule is not the claim that a real system jumps through every state in a simple periodic way. It is a statistical model for equilibrium when no accessible microstate is distinguished by the known macroscopic information.
The entropy is $$S(E,V,N)=k_B\ln\Omega(E,V,N).$$ Suppose two weakly interacting subsystems can exchange energy while their total energy is fixed. The number of combined microstates for a division $E_1+E_2=E$ is $$\Omega_{\text{tot}}(E_1)=\Omega_1(E_1)\Omega_2(E-E_1).$$ The overwhelmingly most probable energy division maximizes $\ln\Omega_{\text{tot}}$, equivalently $S_1+S_2$. Equilibrium therefore emerges as the macrostate of maximal total entropy under the constraints.
The microcanonical ensemble is the natural statistical description of isolated equilibrium systems and the starting point from which temperature and other thermodynamic variables can be connected to derivatives of entropy.