Category:
We are interested in a statistical description of a system in contact with a heat bath (reservoir).Such a system can exchange energy with the heat bath and is not an isolated system. Therefore, in equilibrium all micro states will not have equal a priori probabilities. It turns out that micro states with different energies have different probabilities.An ensemble of system in contact with a heat bath is called canonical ensemble.We need to find the probability of micro state as function of energy and the temperature of the heat bath.
The required probability, in equilibrium, will be found by noting that the system and the heat bath form an isolated system. Therefore, the postulate of equal a priori probability is applicable.
In an alternate approach based on the Boltzmann expression for entropy, one writes an expression for the entropy in terms of the number of micro states of the combined system consisting of the system and the heat bath. Maximizing this entropy gives the equilibrium probability distribution.
It turns out that for canonical ensemble, the internal energy does not have well defined value. However for a macroscopic system it is still meaningful
to take the average energy as the total internal energy of the system. It can be shown that for a macroscopic system variance in energy is small compared to the average energy.
For a microscopic system, such as that consisting of a few atoms, the average energy cannot be thought of as representing the internal energy.