In statistical mechanics, a canonical ensemble is the statistical ensemble that represents the possible states of a mechanical system in thermal equilibrium with a heat bath at a fixed temperature. The system can exchange energy with the heat bath, so that the states of the system will differ in total energy. The principal thermodynamic variable of the canonical ensemble, determining the probability distribution of states, is the absolute temperature (symbol: ). The ensemble typically also depends on mechanical variables such as the number of particles in the system (symbol: ) and the system's volume (symbol: ), each of which influence the nature of the system's internal states. An ensemble with these three parameters is sometimes called the ensemble. The canonical ensemble assigns a probability to each distinct microstate given by the following exponential: where is the total energy of the microstate, and is the Boltzmann constant. The number is the free energy (specifically, the Helmholtz free energy) and is a constant for the ensemble. However, the probabilities and will vary if different N, V, T are selected. The free energy serves two roles: first, it provides a normalization factor for the probability distribution (the probabilities, over the complete set of microstates, must add up to one); second, many important ensemble averages can be directly calculated from the function . An alternative but equivalent formulation for the same concept writes the probability as using the canonical partition function rather than the free energy. The equations below (in terms of free energy) may be restated in terms of the canonical partition function by simple mathematical manipulations. Historically, the canonical ensemble was first described by Boltzmann (who called it a holode) in 1884 in a relatively unknown paper. It was later reformulated and extensively investigated by Gibbs in 1902. Applicability of canonical ensemble The canonical ensemble is the ensemble that describes the possible states of a system that is in thermal equilibrium with a heat bath (the derivation of this fact can be found in Gibbs). The canonical ensemble applies to systems of any size; while it is necessary to assume that the heat bath is very large (i. e., take a macroscopic limit), the system itself may be small or large. The condition that the system is mechanically isolated is necessary in order to ensure it does not exchange energy with any external object besides the heat bath. In general, it is