The way to calculate the average energy of a system is to use the Boltzmann Distribution, which says that the probability of a system at temperature T being in a state n is just proportional to the Boltzmann Factor, , where is the energy of state n and where k is the Boltzmann constant.
We now show how to use the Boltzmann Distribution to calculate the average energy of a system. We will begin with two instructive examples. Then, we shall calculate using the Planck hypothesis, which reproduces the experimental results perfectly.