[3][4] The ensemble formalises the notion that an experimenter repeating an experiment again and again under the same macroscopic conditions, but unable to control the microscopic details, may expect to observe a range of different outcomes.
[2] The study of thermodynamics is concerned with systems that appear to human perception to be "static" (despite the motion of their internal parts), and which can be described simply by a set of macroscopically observable variables.
"We may imagine a great number of systems of the same nature, but differing in the configurations and velocities which they have at a given instant, and differing in not merely infinitesimally, but it may be so as to embrace every conceivable combination of configuration and velocities..." J. W. Gibbs (1903)[5]Three important thermodynamic ensembles were defined by Gibbs:[2] The calculations that can be made using each of these ensembles are explored further in their respective articles.
Other thermodynamic ensembles can be also defined, corresponding to different physical requirements, for which analogous formulae can often similarly be derived.
[6] In thermodynamic limit all ensembles should produce identical observables due to Legendre transforms, deviations to this rule occurs under conditions that state-variables are non-convex, such as small molecular measurements.
[7] The precise mathematical expression for a statistical ensemble has a distinct form depending on the type of mechanics under consideration (quantum or classical).
In quantum mechanics, this notion, due to von Neumann, is a way of assigning a probability distribution over the results of each complete set of commuting observables.
A statistical ensemble in quantum mechanics (also known as a mixed state) is most often represented by a density matrix, denoted by
In classical mechanics, an ensemble is represented by a probability density function defined over the system's phase space.
The ensemble is then represented by a joint probability density function ρ(p1, ... pn, q1, ... qn).
The ensemble is then represented by a joint probability density function ρ(N1, ... Ns, p1, ... pn, q1, ... qn).
In order to connect the probability density in phase space to a probability distribution over microstates, it is necessary to somehow partition the phase space into blocks that are distributed representing the different states of the system in a fair way.
Typically, the phase space contains duplicates of the same physical state in multiple distinct locations.
Overcounting can cause serious problems: It is in general difficult to find a coordinate system that uniquely encodes each physical state.
As a result, it is usually necessary to use a coordinate system with multiple copies of each state, and then to recognize and remove the overcounting.
While this would solve the problem, the resulting integral over phase space would be tedious to perform due to its unusual boundary shape.
(In this case, the factor C introduced above would be set to C = 1, and the integral would be restricted to the selected subregion of phase space.)
The formulation of statistical ensembles used in physics has now been widely adopted in other fields, in part because it has been recognized that the canonical ensemble or Gibbs measure serves to maximize the entropy of a system, subject to a set of constraints: this is the principle of maximum entropy.
In addition, statistical ensembles in physics are often built on a principle of locality: that all interactions are only between neighboring atoms or nearby molecules.
Thus, the general notion of a statistical ensemble with nearest-neighbor interactions leads to Markov random fields, which again find broad applicability; for example in Hopfield networks.
However, the mean obtained for a given physical quantity does not depend on the ensemble chosen at the thermodynamic limit.
The microcanonical ensemble represents an isolated system in which energy (E), volume (V) and the number of particles (N) are all constant.
The canonical ensemble represents a closed system which can exchange energy (E) with its surroundings (usually a heat bath), but the volume (V) and the number of particles (N) are all constant.
The grand canonical ensemble represents an open system which can exchange energy (E) and particles (N) with its surroundings, but the volume (V) is kept constant.
In the discussion given so far, while rigorous, we have taken for granted that the notion of an ensemble is valid a priori, as is commonly done in physical context.
As a result of this preparation procedure, some system is produced and maintained in isolation for some small period of time.