The canonical ensemble is not the only ensemble encountered in statistical mechanics. Commonly encountered ensembles include two (slightly different) microcanonical ensembles, the grand canonical ensemble, the isothermal-isobaric ensemble, and the representative ensemble. Of some importance is the isodynamic-polythermal ensemble, which allows a rational interpretation of error in temperature measurements.
In the microcanonical ensembles, instead of fixing T the total energy E of the system is constrained. The microcanonical ensemble includes all phase states having given N, V, and total energy . The statistical weight for the microcanonical ensemble is
Eq. 3.4 is often referred to as the Law of Equal a priori Probabilities. It applies to the microcanonical ensemble, not the canonical ensemble, a point scrambled by some authors. In the Nineteenth Century interpretation, only phase points having exactly some energy were treated as belonging to a given microcanonical ensemble. Tolman  refers to this ensemble as a surface ensemble. In the Twentieth Century interpretation, the laws of quantum mechanics lead to two sorts of complication for surface ensembles:
First, if a system obeys quantum mechanics the uncertainty relation on becomes relevant. If one only measures the energy of a system once, one can take forever to go about doing so. If the measurement period , is possible, so one can in principle say that a system has exactly energy . A few applications require repeated determinations of the energy of the same element of the ensemble, in which case the route is unavailable.
Second, in many quantum systems the allowed values of the total energy do not form a continuum. Instead, the allowed energies are quantized: limited to a series of values , , ..., as seen in Bohr model for the hydrogen atom. If the total energy does not exactly match one of the allowed energies, the ensemble contains no allowed states. Otherwise, the ensemble contains as many states as there are degeneracies of the energy levels having energy . In a many-particle system, calculating exactly which sets of molecular quantum numbers give an energy totalling to can be a difficult problem in combinatorics. An apparent simplification occurs if a single component of the total energy has a continuum of values. Namely, if all components of the energy other than are quantized, and if the total energy can be written as a sum of components, the system's total energy is a continuum. However, for a given , has somewhat odd properties. If one of the quantized energies changes, must change so as to keep the total energy fixed. If the total energy is fixed, is effectively quantized, since its value must complement the sum of the discretely quantized energies, so as to give the correct total energy.
Complications are avoided by using a quantum microcanical ensemble in which E is constrained to the interval . For a macroscopic system, the skin depth may be made incredibly small by comparison with , so that all states of the quantum microcanonical ensemble have very nearly the same energy. If is large by comparison with the separations between the system's quantized energy levels, the above difficulties with the surface ensemble vanish.
Either microcanonical ensemble (surface or quantum) may be envisioned as a section of a corresponding canonical ensemble. For a system with N and V fixed, the canonical ensemble includes all states of the system with any energy E, . A microcanonical ensemble includes only those states of given N and V that have prescribed energy . If the canonical ensemble is envisioned as a volume, a microcanonical ensemble may be envisioned as a sheet (a surface for the surface ensemble, or an exceedingly thin volume for the quantum microcanonical ensemble) cut out from the canonical ensemble. Equivalently, the canonical ensemble may be envisioned as being constructed from microcanonical ensembles the way an onion is constructed from concentric shells of onionskin, each layer of onion corresponding to those states of the canonical ensemble which have a particular value of the energy. From eq. 3.1, in a constant-energy ( isodynamic) subspace of the canonical ensemble, is a constant, exactly as required by eq. 3.4.
If one adopts certain conventions, one can create a system very much like a canonical ensemble out of a microcanonical ensemble. Essentially, one views the canonical ensemble as being a small part (small N, small V) of a much larger (large N, large V) microcanonical ensemble. Details are found in Lecture ; suffice now to say that if a large system of fixed energy follows eq. 3.4 then a small region of it comes close to following eq. 3.1.
Some authors prefer to view the microcanonical ensemble as being the more fundamental, the canonical ensemble being derived from the microcanonical. These Lectures follow an alternative approach, taking the canonical ensemble as being the most fundamental. Gibbs discusses at great length (at least for him!) why our approach is to be preferred; the largest advantage is that results based on the canonical ensemble remain valid for systems of few particles, while results based on the microcanonical ensemble show anomalies as .
A major argument in favor of eq. 3.4 as the core equation is that it is ``more fundamental'' than eq. 3.1, where by ``fundamental'' most authors mean ``simple''. The importance of simplicity, and the relative merits of largely equivalent equations, are matters of theology. Whether one begins with the canonical or the microcanonical ensemble, one needs the same number of assumptions and special entities to obtain thermodynamic behavior, so the usual form of Occam's razor will not separate them.
Some sources claim that eq. 3.4 can be derived from theoretical considerations. The usual argument is that the Law of Equal a priori Probabilities must be correct, because there is no reason for any state to be preferred to any other. To this argument, an adequate response is the child's simple ``Why? Why is there no reason?''. After all, every state of the system has some variable(s) whose value(s) distinguishes it from every other state. Furthermore, could have a non-trivial functional dependence on those variables that differ from state to state, in which case some states could be preferred to some other states. Furthermore, the italicized argument for the Law of Equal a priori Probabilities has no feature which causes the argument to refer specifically to the microcanonical ensemble. If the argument ``there is no reason ...'' were correct without qualification for the microcanonical ensemble, it would also be correct for the canonical ensemble. However, of the canonical ensemble is not a constant, so the argument must be wrong for the canonical ensemble. Since the argument is wrong for the canonical ensemble, and has no feature which depends on which ensemble one is using, the argument must also be wrong for the microcanonical ensemble. [The argument's conclusion -- that is a constant in the microcanonical ensemble -- is still correct, but the argument does not prove the conclusion.] [Some sources are easy to misread as claiming that the Assumption of Equal a Priori Probabilities is equally true for the canonical and microcanonical ensembles. This claim is mathematically impossible. For the canonical ensemble, is a function of , not a constant.]
The grand canonical, isobaric-isothermal, and isodynamic-polythermal ensembles differ from the canonical ensemble in the variables that are held fixed, and in the statistical weights assigned to different states. In the grand canonical ensemble, N is allowed to vary, V, T, and the chemical potential being held constant. In the isothermal-isobaric ensemble, N, T, and the pressure P are fixed, V not being held rigid. The isodynamic-polythermal ensemble holds N, V, and E fixed, but differs from the microcanonical ensemble in its statistical weights and list of elements.
Each of these other ensembles may be constructed from a series of canonical ensembles having different N, V, and T. The grand canonical ensemble represents the union of all canonical ensembles having fixed V and T, but any value of N, the relative statistical weights of ensemble elements of different N depending on . The isothermal-isobaric ensemble represents the union of all canonical ensembles having fixed N and T, but any value of V, the relative statistical weights of ensemble elements of different V depending on P. The isodynamic-polythermal ensemble represents states of fixed E drawn from all ensembles having fixed N and V,but any value of T, ensemble elements having the same particle positions and momenta but different T being given equal statistical weight.
The representative ensemble appears in Gibbs as a tool for imagining, though only imperfectly, the canonical ensemble. Gibbs' idea was that for many purposes the canonical ensemble could be treated as consisting of a very large but finite number N of replicas of a given system, all replicas having the same N and V. Corresponding to each replica would be a point in phase space. If the replicas were appropriately scattered throughout phase space, as N became very large the representative ensemble would become more and more like the canonical ensemble, except that the representative ensemble contains at most a countably infinite number of points, while the number of points in the canonical ensemble is uncountably infinite. The similarity of the two ensembles is enhanced by making the local density of points in the representative ensemble proportional to , in which case a simple unweighted average over all points in the representative ensemble gives (as N ) the same result as does a properly-weighted average over all points of the canonical ensemble.
The representative and canonical ensembles are not the same. In the representative ensemble, the likelihood of a system occupying a specific state of the ensemble is independent of E, the statistical weight arising from the density of points in phase space, all points in the representative ensemble having the same statistical weight. On the other hand, in the canonical ensemble the density of phase points is determined by the physical nature of the system, in a way independent of temperature, the statistical weight of a single phase point being . We'll discuss this difference below when we've developed some examples. It is entirely clear from his writings that Gibbs viewed the representative ensemble as a mental crutch. In particular, the Liouville theorem, which is a fundamental result of equilibrium statistical mechanics, is correct for the canonical ensemble but only an approximation for the representative ensemble.