In
physics
Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge which rel ...
, specifically
statistical mechanics, an ensemble (also statistical ensemble) is an idealization consisting of a large number of virtual copies (sometimes infinitely many) of a
system, considered all at once, each of which represents a possible state that the real system might be in. In other words, a statistical ensemble is a set of systems of particles used in statistical mechanics to describe a single
system.
The concept of an ensemble was introduced by
J. Willard Gibbs
Josiah Willard Gibbs (; February 11, 1839 – April 28, 1903) was an American scientist who made significant theoretical contributions to physics, chemistry, and mathematics. His work on the applications of thermodynamics was instrumental in t ...
in 1902.
A thermodynamic ensemble is a specific variety of statistical ensemble that, among other properties, is in statistical equilibrium (defined below), and is used to derive the properties of
thermodynamic system
A thermodynamic system is a body of matter and/or radiation, confined in space by walls, with defined permeabilities, which separate it from its surroundings. The surroundings may include other thermodynamic systems, or physical systems that are ...
s from the laws of classical or quantum mechanics.
Physical considerations
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.
The notional size of ensembles in thermodynamics, statistical mechanics and
quantum statistical mechanics can be very large, including every possible
microscopic state the system could be in, consistent with its observed
macroscopic
The macroscopic scale is the length scale on which objects or phenomena are large enough to be visible with the naked eye, without magnifying optical instruments. It is the opposite of microscopic.
Overview
When applied to physical phenomena ...
properties. For many important physical cases, it is possible to calculate averages directly over the whole of the thermodynamic ensemble, to obtain explicit formulas for many of the thermodynamic quantities of interest, often in terms of the appropriate
partition function.
The concept of an equilibrium or stationary ensemble is crucial to many applications of statistical ensembles. Although a mechanical system certainly evolves over time, the ensemble does not necessarily have to evolve. In fact, the ensemble will not evolve if it contains all past and future phases of the system. Such a statistical ensemble, one that does not change over time, is called ''stationary'' and can be said to be in ''statistical equilibrium''.
Terminology
*The word "ensemble" is also used for a smaller set of possibilities
sampled from the full set of possible states. For example, a collection of
walkers in a
Markov chain Monte Carlo
In statistics, Markov chain Monte Carlo (MCMC) methods comprise a class of algorithms for sampling from a probability distribution. By constructing a Markov chain that has the desired distribution as its equilibrium distribution, one can obtain ...
iteration is called an ensemble in some of the literature.
*The term "ensemble" is often used in physics and the physics-influenced literature. In
probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set o ...
, the term
probability space
In probability theory, a probability space or a probability triple (\Omega, \mathcal, P) is a mathematical construct that provides a formal model of a random process or "experiment". For example, one can define a probability space which models t ...
is more prevalent.
Main types

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. These systems can be described by statistical ensembles that depend on a few observable parameters, and which are in statistical equilibrium. Gibbs noted that different macroscopic constraints lead to different types of ensembles, with particular statistical characteristics. Three important thermodynamic ensembles were defined by Gibbs:
* ''
Microcanonical ensemble'' (or ''NVE ensemble'') —a statistical ensemble where the total energy of the system and the number of particles in the system are each fixed to particular values; each of the members of the ensemble are required to have the same total energy and particle number. The system must remain totally isolated (unable to exchange energy or particles with its environment) in order to stay in statistical equilibrium.
* ''
Canonical ensemble'' (or ''NVT ensemble'')—a statistical ensemble where the energy is not known exactly but the number of particles is fixed. In place of the energy, the
temperature
Temperature is a physical quantity that expresses quantitatively the perceptions of hotness and coldness. Temperature is measured with a thermometer.
Thermometers are calibrated in various temperature scales that historically have relied on ...
is specified. The canonical ensemble is appropriate for describing a closed system which is in, or has been in, weak
thermal contact with a heat bath. In order to be in statistical equilibrium, the system must remain totally closed (unable to exchange particles with its environment) and may come into weak thermal contact with other systems that are described by ensembles with the same temperature.
* ''
Grand canonical ensemble'' (or ''μVT ensemble'')—a statistical ensemble where neither the energy nor particle number are fixed. In their place, the temperature and
chemical potential
In thermodynamics, the chemical potential of a species is the energy that can be absorbed or released due to a change of the particle number of the given species, e.g. in a chemical reaction or phase transition. The chemical potential of a species ...
are specified. The grand canonical ensemble is appropriate for describing an open system: one which is in, or has been in, weak contact with a reservoir (thermal contact, chemical contact, radiative contact, electrical contact, etc.). The ensemble remains in statistical equilibrium if the system comes into weak contact with other systems that are described by ensembles with the same temperature and chemical potential.
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.
For example, in the reaction ensemble, particle number fluctuations are only allowed to occur according to the
stoichiometry
Stoichiometry refers to the relationship between the quantities of reactants and products before, during, and following chemical reactions.
Stoichiometry is founded on the law of conservation of mass where the total mass of the reactants equ ...
of the
chemical reaction
A chemical reaction is a process that leads to the chemical transformation of one set of chemical substances to another. Classically, chemical reactions encompass changes that only involve the positions of electrons in the forming and break ...
s which are present in the system.
Representations
The precise mathematical expression for a statistical ensemble has a distinct form depending on the type of mechanics under consideration (quantum or classical). In the classical case, the ensemble is a probability distribution over the microstates. 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.
In classical mechanics, the ensemble is instead written as a probability distribution in
phase space
In dynamical system theory, a phase space is a space in which all possible states of a system are represented, with each possible state corresponding to one unique point in the phase space. For mechanical systems, the phase space usual ...
; the microstates are the result of partitioning phase space into equal-sized units, although the size of these units can be chosen somewhat arbitrarily.
Requirements for representations
Putting aside for the moment the question of how statistical ensembles are generated
operationally, we should be able to perform the following two operations on ensembles ''A'', ''B'' of the same system:
* Test whether ''A'', ''B'' are statistically equivalent.
* If ''p'' is a real number such that 0 < ''p'' < 1, then produce a new ensemble by probabilistic sampling from ''A'' with probability ''p'' and from ''B'' with probability 1 – ''p''.
Under certain conditions, therefore,
equivalence class
In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements ...
es of statistical ensembles have the structure of a convex set.
Quantum mechanical
A statistical ensemble in quantum mechanics (also known as a mixed state) is most often represented by a
density matrix
In quantum mechanics, a density matrix (or density operator) is a matrix that describes the quantum state of a physical system. It allows for the calculation of the probabilities of the outcomes of any measurement performed upon this system, usin ...
, denoted by
. The density matrix provides a fully general tool that can incorporate both quantum uncertainties (present even if the state of the system were completely known) and classical uncertainties (due to a lack of knowledge) in a unified manner. Any physical observable in quantum mechanics can be written as an operator, . The expectation value of this operator on the statistical ensemble
is given by the following
trace:
:
This can be used to evaluate averages (operator ),
variance
In probability theory and statistics, variance is the expectation of the squared deviation of a random variable from its population mean or sample mean. Variance is a measure of dispersion, meaning it is a measure of how far a set of number ...
s (using operator ),
covariance
In probability theory and statistics, covariance is a measure of the joint variability of two random variables. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the le ...
s (using operator ), etc. The density matrix must always have a trace of 1:
(this essentially is the condition that the probabilities must add up to one).
In general, the ensemble evolves over time according to the
von Neumann equation.
Equilibrium ensembles (those that do not evolve over time,
) can be written solely as a function of conserved variables. For example, the
microcanonical ensemble and
canonical ensemble are strictly functions of the total energy, which is measured by the total energy operator (Hamiltonian). The grand canonical ensemble is additionally a function of the particle number, measured by the total particle number operator . Such equilibrium ensembles are a
diagonal matrix
In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices. Elements of the main diagonal can either be zero or nonzero. An example of a 2×2 diagonal ...
in the orthogonal basis of states that simultaneously diagonalize each conserved variable. In
bra–ket notation
In quantum mechanics, bra–ket notation, or Dirac notation, is used ubiquitously to denote quantum states. The notation uses angle brackets, and , and a vertical bar , to construct "bras" and "kets".
A ket is of the form , v \rangle. Mathem ...
, the density matrix is
:
where the , indexed by , are the elements of a complete and orthogonal basis. (Note that in other bases, the density matrix is not necessarily diagonal.)
Classical mechanical

In classical mechanics, an ensemble is represented by a probability density function defined over the system's
phase space
In dynamical system theory, a phase space is a space in which all possible states of a system are represented, with each possible state corresponding to one unique point in the phase space. For mechanical systems, the phase space usual ...
.
While an individual system evolves according to
Hamilton's equations, the density function (the ensemble) evolves over time according to
Liouville's equation.
In a
mechanical system with a defined number of parts, the phase space has
generalized coordinates called , and associated
canonical momenta called . The ensemble is then represented by a
joint probability density function .
If the number of parts in the system is allowed to vary among the systems in the ensemble (as in a grand ensemble where the number of particles is a random quantity), then it is a probability distribution over an extended phase space that includes further variables such as particle numbers (first kind of particle), (second kind of particle), and so on up to (the last kind of particle; is how many different kinds of particles there are). The ensemble is then represented by a
joint probability density function . The number of coordinates varies with the numbers of particles.
Any mechanical quantity can be written as a function of the system's phase. The expectation value of any such quantity is given by an integral over the entire phase space of this quantity weighted by :
:
The condition of probability normalization applies, requiring
:
Phase space is a continuous space containing an infinite number of distinct physical states within any small region. 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. It turns out that the correct way to do this simply results in equal-sized blocks of canonical phase space, and so a microstate in classical mechanics is an extended region in the phase space of canonical coordinates that has a particular volume.
[This equal-volume partitioning is a consequence of Liouville's theorem, i. e., the principle of conservation of extension in canonical phase space for Hamiltonian mechanics. This can also be demonstrated starting with the conception of an ensemble as a multitude of systems. See Gibbs' ''Elementary Principles'', Chapter I.] In particular, the probability density function in phase space, , is related to the probability distribution over microstates, by a factor
:
where
* is an arbitrary but predetermined constant with the units of , setting the extent of the microstate and providing correct dimensions to .
[(Historical note) Gibbs' original ensemble effectively set , leading to unit-dependence in the values of some thermodynamic quantities like entropy and chemical potential. Since the advent of quantum mechanics, is often taken to be equal to Planck's constant in order to obtain a semiclassical correspondence with quantum mechanics.]
* is an overcounting correction factor (see below), generally dependent on the number of particles and similar concerns.
Since can be chosen arbitrarily, the notional size of a microstate is also arbitrary. Still, the value of influences the offsets of quantities such as entropy and chemical potential, and so it is important to be consistent with the value of when comparing different systems.
Correcting overcounting in phase space
Typically, the phase space contains duplicates of the same physical state in multiple distinct locations. This is a consequence of the way that a physical state is encoded into mathematical coordinates; the simplest choice of coordinate system often allows a state to be encoded in multiple ways. An example of this is a gas of identical particles whose state is written in terms of the particles' individual positions and momenta: when two particles are exchanged, the resulting point in phase space is different, and yet it corresponds to an identical physical state of the system. It is important in statistical mechanics (a theory about physical states) to recognize that the phase space is just a mathematical construction, and to not naively overcount actual physical states when integrating over phase space. Overcounting can cause serious problems:
* Dependence of derived quantities (such as entropy and chemical potential) on the choice of coordinate system, since one coordinate system might show more or less overcounting than another.
[In some cases the overcounting error is benign. An example is the choice of coordinate system used for representing orientations of three-dimensional objects. A simple encoding is the 3-sphere (e. g., unit ]quaternion
In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quat ...
s) which is a double cover—each physical orientation can be encoded in two ways. If this encoding is used without correcting the overcounting, then the entropy will be higher by per rotatable object and the chemical potential lower by . This does not actually lead to any observable error since it only causes unobservable offsets.
* Erroneous conclusions that are inconsistent with physical experience, as in the
mixing paradox
In statistical mechanics, a semi-classical derivation of entropy that does not take into account the indistinguishability of particles yields an expression for entropy which is not extensive (is not proportional to the amount of substance in que ...
.
* Foundational issues in defining the
chemical potential
In thermodynamics, the chemical potential of a species is the energy that can be absorbed or released due to a change of the particle number of the given species, e.g. in a chemical reaction or phase transition. The chemical potential of a species ...
and the
grand canonical ensemble.
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.
A crude way to remove the overcounting would be to manually define a subregion of phase space that includes each physical state only once and then exclude all other parts of phase space. In a gas, for example, one could include only those phases where the particles' coordinates are sorted in ascending order. 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 introduced above would be set to , and the integral would be restricted to the selected subregion of phase space.)
A simpler way to correct the overcounting is to integrate over all of phase space but to reduce the weight of each phase in order to exactly compensate the overcounting. This is accomplished by the factor introduced above, which is a whole number that represents how many ways a physical state can be represented in phase space. Its value does not vary with the continuous canonical coordinates,
[Technically, there are some phases where the permutation of particles does not even yield a distinct specific phase: for example, two similar particles can share the exact same trajectory, internal state, etc.. However, in classical mechanics these phases only make up an infinitesimal fraction of the phase space (they have measure zero) and so they do not contribute to any volume integral in phase space.] so overcounting can be corrected simply by integrating over the full range of canonical coordinates, then dividing the result by the overcounting factor. However, does vary strongly with discrete variables such as numbers of particles, and so it must be applied before summing over particle numbers.
As mentioned above, the classic example of this overcounting is for a fluid system containing various kinds of particles, where any two particles of the same kind are indistinguishable and exchangeable. When the state is written in terms of the particles' individual positions and momenta, then the overcounting related to the exchange of identical particles is corrected by using
:
This is known as "correct Boltzmann counting".
Ensembles in statistics
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
The principle of maximum entropy states that the probability distribution which best represents the current state of knowledge about a system is the one with largest entropy, in the context of precisely stated prior data (such as a proposition ...
. This principle has now been widely applied to problems in
linguistics
Linguistics is the scientific study of human language. It is called a scientific study because it entails a comprehensive, systematic, objective, and precise analysis of all aspects of language, particularly its nature and structure. Lingu ...
,
robotics
Robotics is an interdisciplinarity, interdisciplinary branch of computer science and engineering. Robotics involves design, construction, operation, and use of robots. The goal of robotics is to design machines that can help and assist human ...
, and the like.
In addition, statistical ensembles in physics are often built on a
principle of locality
In physics, the principle of locality states that an object is influenced directly only by its immediate surroundings. A theory that includes the principle of locality is said to be a "local theory". This is an alternative to the concept of ins ...
: that all interactions are only between neighboring atoms or nearby molecules. Thus, for example,
lattice models, such as the
Ising model
The Ising model () (or Lenz-Ising model or Ising-Lenz model), named after the physicists Ernst Ising and Wilhelm Lenz, is a mathematical model of ferromagnetism in statistical mechanics. The model consists of discrete variables that represent ...
, model
ferromagnetic materials by means of nearest-neighbor interactions between spins. The statistical formulation of the principle of locality is now seen to be a form of the
Markov property in the broad sense; nearest neighbors are now
Markov blankets. 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.
Ensemble average
In
statistical mechanics, the ensemble average is defined as the
mean
There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value ( magnitude and sign) of a given data set.
For a data set, the '' ari ...
of a quantity that is a function of the
microstate of a system, according to the distribution of the system on its micro-states in this
ensemble.
Since the ensemble average is dependent on the
ensemble chosen, its mathematical expression varies from ensemble to ensemble. However, the
mean
There are several kinds of mean in mathematics, especially in statistics. Each mean serves to summarize a given group of data, often to better understand the overall value ( magnitude and sign) of a given data set.
For a data set, the '' ari ...
obtained for a given physical quantity doesn't depend on the ensemble chosen at the
thermodynamic limit.
The
grand canonical ensemble is an example of an
open system.
[http://physics.gmu.edu/~pnikolic/PHYS307/lectures/ensembles.pdf ]
Classical statistical mechanics
For a classical system in
thermal equilibrium
Two physical systems are in thermal equilibrium if there is no net flow of thermal energy between them when they are connected by a path permeable to heat. Thermal equilibrium obeys the zeroth law of thermodynamics. A system is said to be in ...
with its environment, the ''ensemble average'' takes the form of an integral over the
phase space
In dynamical system theory, a phase space is a space in which all possible states of a system are represented, with each possible state corresponding to one unique point in the phase space. For mechanical systems, the phase space usual ...
of the system:
:
where:
:
is the ensemble average of the system property A,
:
is
, known as
thermodynamic beta,
:''H'' is the
Hamiltonian of the classical system in terms of the set of coordinates
and their conjugate generalized momenta
, and
:
is the
volume element of the classical phase space of interest.
The denominator in this expression is known as the
partition function, and is denoted by the letter Z.
Quantum statistical mechanics
In
quantum statistical mechanics, for a quantum system in thermal equilibrium with its environment, the weighted average takes the form of a sum over
quantum energy states, rather than a continuous integral:
:
Canonical ensemble average
The generalized version of the
partition function provides the complete framework for working with ensemble averages in thermodynamics,
information theory
Information theory is the scientific study of the quantification, storage, and communication of information. The field was originally established by the works of Harry Nyquist and Ralph Hartley, in the 1920s, and Claude Shannon in the 1940s. ...
,
statistical mechanics and
quantum mechanics
Quantum mechanics is a fundamental theory in physics that provides a description of the physical properties of nature at the scale of atoms and subatomic particles. It is the foundation of all quantum physics including quantum chemistry, q ...
.
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) as well as particles with its surroundings but the volume (V) is kept constant.
Operational interpretation
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. What has not been shown is that the ensemble ''itself'' (not the consequent results) is a precisely defined object mathematically. For instance,
* It is not clear where this ''very large set of systems'' exists (for example, is it a
''gas'' of particles inside a container?)
* It is not clear how to physically generate an ensemble.
In this section, we attempt to partially answer this question.
Suppose we have a ''preparation procedure'' for a system in a physics
lab: For example, the procedure might involve a physical apparatus and
some protocols for manipulating the apparatus. As a result of this preparation procedure, some system
is produced and maintained in isolation for some small period of time.
By repeating this laboratory preparation procedure we obtain a
sequence of systems ''X''
1, ''X''
2,
....,''X''
''k'', which in our mathematical idealization, we assume is an
infinite
Infinite may refer to:
Mathematics
*Infinite set, a set that is not a finite set
*Infinity, an abstract concept describing something without any limit
Music
*Infinite (group)
Infinite ( ko, 인피니트; stylized as INFINITE) is a South Ko ...
sequence of systems. The systems are similar in that they were all produced in the same way. This infinite sequence is an ensemble.
In a laboratory setting, each one of these prepped systems might be used as input
for ''one'' subsequent ''testing procedure''. Again, the testing procedure
involves a physical apparatus and some protocols; as a result of the
testing procedure we obtain a ''yes'' or ''no'' answer.
Given a testing procedure ''E'' applied to each prepared system, we obtain a sequence of values
Meas (''E'', ''X''
1), Meas (''E'', ''X''
2),
...., Meas (''E'', ''X''
''k''). Each one of these values is a 0 (or no) or a 1 (yes).
Assume the following time average exists:
:
For quantum mechanical systems, an important assumption made in the
quantum logic approach to quantum mechanics is the identification of ''yes-no'' questions to the
lattice of closed subspaces of a Hilbert space. With some additional
technical assumptions one can then infer that states are given by
density operators ''S'' so that:
:
We see this reflects the definition of quantum states in general: A quantum state is a mapping from the observables to their expectation values.
See also
*
Density matrix
In quantum mechanics, a density matrix (or density operator) is a matrix that describes the quantum state of a physical system. It allows for the calculation of the probabilities of the outcomes of any measurement performed upon this system, usin ...
*
Ensemble (fluid mechanics)
*
Phase space
In dynamical system theory, a phase space is a space in which all possible states of a system are represented, with each possible state corresponding to one unique point in the phase space. For mechanical systems, the phase space usual ...
*
Liouville's theorem (Hamiltonian)
*
Maxwell–Boltzmann statistics
In statistical mechanics, Maxwell–Boltzmann statistics describes the distribution of classical material particles over various energy states in thermal equilibrium. It is applicable when the temperature is high enough or the particle density ...
*
Replication (statistics)
In engineering, science, and statistics, replication is the repetition of an experimental condition so that the variability associated with the phenomenon can be estimated. ASTM, in standard E1847, defines replication as "... the repetition of th ...
Notes
References
External links
Monte Carlo applet applied in statistical physics problems.
{{commons category, Statistical ensemble
Equations of physics
Philosophy of thermal and statistical physics