Skip to content

Statistical ensembles and probability repair

Statistical reasoning in field theory becomes unreliable when three different questions are answered with the same formula. A probability law determines expectations once the law is given. A physical ensemble explains why a particular law models the system. An estimator and its uncertainty describe what finite data can reveal about a target quantity. This lesson separates those layers through one finite canonical ensemble, one dependence example, and one correlated-sample calculation.

Required background. Linear and tensor methods supplies finite sums, quadratic forms, and covariance matrices. If those operations are comfortable, no measure theory or thermodynamic limit is needed to begin.

Probability laws, ensembles, and samples answer different questions

Section titled “Probability laws, ensembles, and samples answer different questions”

Suppose a finite set of configurations is labeled by ii, a normalized law is pip_i, and an observable has value AiA_i. Then

Ep[A]=ipiAi,Varp(A)=ipi(AiEp[A])2\mathbb E_p[A]=\sum_i p_iA_i, \qquad \operatorname{Var}_p(A) =\sum_i p_i\left(A_i-\mathbb E_p[A]\right)^2

are probability identities. They are true for any declared normalized law; they do not explain where pip_i came from.

A canonical ensemble adds physical content:

pi(β)=eβEiZ(β),Z(β)=ieβEi.p_i(\beta)=\frac{e^{-\beta E_i}}{Z(\beta)}, \qquad Z(\beta)=\sum_i e^{-\beta E_i}.

This law represents equilibrium with a heat bath at fixed inverse temperature under specified Hamiltonian, volume, conserved quantities, and boundary conditions. The algebra that follows from pi(β)p_i(\beta) is exact, but the claim that a laboratory system or simulation is described by that law is a model assumption requiring separate support.

Finally, observations A(1),,A(N)A^{(1)},\ldots,A^{(N)} introduce an inference problem. The sample mean

AN=1Nn=1NA(n)\overline A_N=\frac1N\sum_{n=1}^N A^{(n)}

is an estimator of an ensemble mean only after its sampling process is specified. Independent equilibrium draws, a correlated stationary Markov chain, and a chain that has not equilibrated can have the same list of recorded values but justify different uncertainty statements.

Keep this classification visible:

LayerQuestionTypical statement
ProbabilityWhat follows from the declared law?Var(A)=E[A2]E[A]2\operatorname{Var}(A)=\mathbb E[A^2]-\mathbb E[A]^2
Physical ensembleWhy should this law describe the system?The system is in canonical equilibrium at fixed β\beta and volume.
InferenceWhat does finite, possibly dependent data establish?AN\overline A_N estimates E[A]\mathbb E[A] with a covariance-aware standard error.

The first statement can be proved algebraically, the second is part of the physical model, and the third needs sampling assumptions. None can substitute for the others.

A finite canonical ensemble gives an exact response identity

Section titled “A finite canonical ensemble gives an exact response identity”

Consider three nondegenerate configurations with energies

E0=0,E1=Δ,E2=2Δ,Δ>0.E_0=0, \qquad E_1=\Delta, \qquad E_2=2\Delta, \qquad \Delta>0.

Assume canonical equilibrium at inverse temperature β>0\beta>0, fixed volume, and kB=1k_{\mathrm B}=1. These are the physical assumptions. No samples or estimators have entered. Writing x=eβΔx=e^{-\beta\Delta} gives

Z=1+x+x2,(p0,p1,p2)=(1,x,x2)Z.Z=1+x+x^2, \qquad (p_0,p_1,p_2)=\frac{(1,x,x^2)}{Z}.

The mean and second moment are

E=Δx+2x2Z,E2=Δ2x+4x2Z,\langle E\rangle =\Delta\frac{x+2x^2}{Z}, \qquad \langle E^2\rangle =\Delta^2\frac{x+4x^2}{Z},

so

Var(E)=Δ2[x+4x2Z(x+2x2Z)2].\operatorname{Var}(E) =\Delta^2\left[ \frac{x+4x^2}{Z} -\left(\frac{x+2x^2}{Z}\right)^2 \right].

For any finite canonical law,

piβ=(EiE)pi.\frac{\partial p_i}{\partial\beta} =-\left(E_i-\langle E\rangle\right)p_i.

Multiplying by EiE_i and summing gives

Eβ=Var(E)=2logZβ2.-\frac{\partial\langle E\rangle}{\partial\beta} =\operatorname{Var}(E) =\frac{\partial^2\log Z}{\partial\beta^2}.

Because β=1/T\beta=1/T in the chosen units, the heat capacity at fixed external parameters is

C=ET=β2Var(E)0.C=\frac{\partial\langle E\rangle}{\partial T} =\beta^2\operatorname{Var}(E)\geq0.

This response–fluctuation identity is exact for the declared finite canonical ensemble. It is not evidence that an arbitrary dataset has equilibrated, and it does not hold unchanged after replacing the canonical law by a different ensemble. The general partition-function method is developed in Partition functions and thermodynamic response and Kardar 2007, chs. 1–3.

Two limits check the arithmetic. As βΔ\beta\Delta\to\infty, x0x\to0 and the ground state dominates:

E0,Var(E)0.\langle E\rangle\longrightarrow0, \qquad \operatorname{Var}(E)\longrightarrow0.

As βΔ0\beta\Delta\to0, all three configurations become equally weighted:

EΔ,Var(E)2Δ23.\langle E\rangle\longrightarrow\Delta, \qquad \operatorname{Var}(E)\longrightarrow\frac{2\Delta^2}{3}.

These are temperature limits of a fixed finite system. Since ZZ is a finite sum of positive analytic functions for real β\beta, it has no finite-system thermodynamic nonanalyticity. A phase transition, spontaneous symmetry breaking, or equivalence of ensembles requires an appropriate infinite-system limit and its hypotheses.

Zero covariance does not imply independence

Section titled “Zero covariance does not imply independence”

Let XX be uniform on {1,0,1}\{-1,0,1\} and set Y=X2Y=X^2. Then

E[X]=0,E[Y]=23,E[XY]=E[X3]=0,\mathbb E[X]=0, \qquad \mathbb E[Y]=\frac23, \qquad \mathbb E[XY]=\mathbb E[X^3]=0,

so

Cov(X,Y)=E[XY]E[X]E[Y]=0.\operatorname{Cov}(X,Y) =\mathbb E[XY]-\mathbb E[X]\mathbb E[Y]=0.

Nevertheless, XX and YY are dependent: YY is determined by XX, and

P(Y=0X=0)=1whileP(Y=0)=13.\mathbb P(Y=0\mid X=0)=1 \quad\text{while}\quad \mathbb P(Y=0)=\frac13.

Covariance tests one bilinear moment. Independence requires the entire joint law to factorize, equivalently P(XB,YC)=P(XB)P(YC)\mathbb P(X\in B,Y\in C)=\mathbb P(X\in B)\mathbb P(Y\in C) for all relevant events. In a Gaussian model, zero covariance has stronger consequences, but that is an additional distributional assumption, not the definition of independence. See Durrett 2019, § 2.1, pp. 43–49, PDF for the standard independence criteria.

This example is purely probabilistic. It makes no physical ensemble claim and uses no finite-data inference.

Correlated samples change the uncertainty of the mean

Section titled “Correlated samples change the uncertainty of the mean”

Let A1,,ANA_1,\ldots,A_N be a stationary sequence with common mean μ\mu, variance σ2\sigma^2, and autocorrelation

ρk=Cov(An,An+k)σ2.\rho_k =\frac{\operatorname{Cov}(A_n,A_{n+k})}{\sigma^2}.

Stationarity and the common mean imply E[AN]=μ\mathbb E[\overline A_N]=\mu, so correlation alone does not bias this estimator. It does change its variance:

Var(AN)=1N2i,j=1NCov(Ai,Aj)=σ2N[1+2k=1N1(1kN)ρk].\begin{aligned} \operatorname{Var}(\overline A_N) &=\frac1{N^2}\sum_{i,j=1}^N \operatorname{Cov}(A_i,A_j)\\ &=\frac{\sigma^2}{N} \left[ 1+2\sum_{k=1}^{N-1} \left(1-\frac{k}{N}\right)\rho_k \right]. \end{aligned}

Define the finite-NN integrated autocorrelation time and a variance-equivalent effective sample size by

τint,N=12+k=1N1(1kN)ρk,Neff=N2τint,N.\tau_{\mathrm{int},N} =\frac12+ \sum_{k=1}^{N-1} \left(1-\frac{k}{N}\right)\rho_k, \qquad N_{\mathrm{eff}}=\frac{N}{2\tau_{\mathrm{int},N}}.

Then

SE(AN)=σNeff.\operatorname{SE}(\overline A_N) =\frac{\sigma}{\sqrt{N_{\mathrm{eff}}}}.

For the covariance model ρk=ρk\rho_k=\rho^k with 0ρ<10\leq\rho<1,

Neff=N1+2k=1N1(1k/N)ρkN1ρ1+ρN_{\mathrm{eff}} =\frac{N}{ 1+2\sum_{k=1}^{N-1}(1-k/N)\rho^k} \sim N\frac{1-\rho}{1+\rho}

at fixed ρ\rho and large NN. With N=100N=100 and ρ=0.8\rho=0.8, the exact finite sum gives Neff11.6N_{\mathrm{eff}}\approx11.6. The correlation-aware standard error is therefore about 0.293σ0.293\sigma, almost three times the independent-sample value 0.1σ0.1\sigma.

Effective sample size is a summary of the variance for this estimator and observable; it is not a literal count of independent configurations. Negative correlations can even produce Neff>NN_{\mathrm{eff}}>N. When σ2\sigma^2 and the autocorrelation tail are estimated from the same finite series, window or block choices add uncertainty. Stationarity, equilibration, and a suitable central limit theorem must be justified separately before turning a standard error into a confidence interval. Autocorrelation sums, window selection, and error-estimate stability are treated in Wolff 2004/2006, §§ 2 and 3.1–3.3, pp. 4–13.

Do not confuse these quantities:

  • σ2\sigma^2 is the ensemble fluctuation of one draw;
  • Var(AN)\operatorname{Var}(\overline A_N) is the sampling variance of an estimator;
  • a confidence interval needs a sampling-distribution argument as well as an estimated standard error; and
  • discretization, finite-volume, model, and equilibration errors are distinct possible biases, not contributions automatically captured by the standard error.

Finite-data and thermodynamic limits are different

Section titled “Finite-data and thermodynamic limits are different”

Several limits can appear in one field-theory calculation. State which one is being taken and what remains fixed.

LimitQuestion answeredWhat it does not establish by itself
NN\to\infty samplesDoes an estimator converge under the sampling law?That the physical ensemble or simulation algorithm is correct
Volume VV\to\inftyDoes a thermodynamic state, phase, or nonanalyticity emerge?A central limit theorem for the recorded samples
Lattice spacing a0a\to0Does a continuum observable exist after tuning and renormalization?Ensemble equivalence or equilibration
Source h0h\to0Does a response or order parameter persist?That the order of h0h\to0 and VV\to\infty is interchangeable

For the finite three-state example, a microcanonical law at exact energy E=ΔE=\Delta places all probability on the middle configuration and gives zero energy variance. The canonical law mixes all three energies and generally has nonzero variance. Relating those descriptions requires additional degrees of freedom, a declared thermodynamic limit, and appropriate regularity or concavity conditions. Use Thermodynamic limits, phases, and ensemble equivalence before making an equivalence or phase-transition claim.

Three outcomes a,b,ca,b,c have weights 1,2,31,2,3, respectively. Let the observable XX take values 0,1,20,1,2 on those outcomes. Normalize the law, compute E[X]\mathbb E[X] and Var(X)\operatorname{Var}(X), and find P(X=2X1)\mathbb P(X=2\mid X\geq1). Classify the calculation by layer.

Solution

The total weight is 66, so

(pa,pb,pc)=(16,13,12).(p_a,p_b,p_c)=\left(\frac16,\frac13,\frac12\right).

The first two moments are

E[X]=016+113+212=43,\mathbb E[X] =0\cdot\frac16+1\cdot\frac13+2\cdot\frac12 =\frac43,

and

E[X2]=0+13+412=73.\mathbb E[X^2] =0+\frac13+4\cdot\frac12 =\frac73.

Therefore

Var(X)=73(43)2=59.\operatorname{Var}(X) =\frac73-\left(\frac43\right)^2 =\frac59.

The conditioning event has probability P(X1)=1/3+1/2=5/6\mathbb P(X\geq1)=1/3+1/2=5/6, so

P(X=2X1)=1/25/6=35.\mathbb P(X=2\mid X\geq1) =\frac{1/2}{5/6}=\frac35.

Every step is a probability identity once the weights and observable are declared. No physical reason for those weights and no sample-based estimator has been supplied.

For finite configurations with energy EiE_i and another observable AiA_i, set

Z(β,h)=ieβEi+hAi.Z(\beta,h)=\sum_i e^{-\beta E_i+hA_i}.

Show that derivatives of logZ\log Z generate A\langle A\rangle, Var(A)\operatorname{Var}(A), and Cov(E,A)\operatorname{Cov}(E,A). Identify the physical assumption and the probability identities.

Solution

The normalized law is

pi(β,h)=eβEi+hAiZ(β,h).p_i(\beta,h) =\frac{e^{-\beta E_i+hA_i}}{Z(\beta,h)}.

Differentiating once gives

logZh=1ZiAieβEi+hAi=A.\frac{\partial\log Z}{\partial h} =\frac1Z\sum_i A_i e^{-\beta E_i+hA_i} =\langle A\rangle.

A second hh derivative differentiates both the numerator and the normalization:

2logZh2=A2A2=Var(A).\frac{\partial^2\log Z}{\partial h^2} =\langle A^2\rangle-\langle A\rangle^2 =\operatorname{Var}(A).

Similarly,

2logZβh=EAEA=Cov(E,A).-\frac{\partial^2\log Z}{\partial\beta\,\partial h} =\langle EA\rangle-\langle E\rangle\langle A\rangle =\operatorname{Cov}(E,A).

Choosing the Boltzmann form as a model of canonical equilibrium is the physical ensemble assumption. Once that normalized law is accepted, the derivative relations are probability identities. No inference choice appears because no finite sample has been introduced.

Let N=3N=3, Var(Ai)=σ2\operatorname{Var}(A_i)=\sigma^2, and Cov(Ai,Aj)=σ2(1/2)ij\operatorname{Cov}(A_i,A_j)=\sigma^2(1/2)^{\lvert i-j\rvert}. Compute Var(A3)\operatorname{Var}(\overline A_3), NeffN_{\mathrm{eff}}, and the ratio of the correct standard error to the independent-sample standard error.

Solution

There are three diagonal terms, four ordered pairs at lag one, and two ordered pairs at lag two. Hence

Var(A3)=σ29[3+4(12)+2(14)]=1118σ2.\begin{aligned} \operatorname{Var}(\overline A_3) &=\frac{\sigma^2}{9} \left[3+4\left(\frac12\right) +2\left(\frac14\right)\right]\\ &=\frac{11}{18}\sigma^2. \end{aligned}

Matching this to σ2/Neff\sigma^2/N_{\mathrm{eff}} gives

Neff=18111.64,N_{\mathrm{eff}}=\frac{18}{11}\approx1.64,

well below the three recorded observations. The independent formula would give variance σ2/3\sigma^2/3, so the standard-error ratio is

11/18σσ/3=1161.35.\frac{\sqrt{11/18}\,\sigma}{\sigma/\sqrt3} =\sqrt{\frac{11}{6}} \approx1.35.

Thus the correct standard error is about 35%35\% larger than the independent-sample value for this finite covariance model. This conclusion assumes the stated stationary covariance law is known; estimating it from three data points would not be credible.

Return when the three layers stay separate

Section titled “Return when the three layers stay separate”

You are ready to return when you can do all three of the following without looking back:

  1. normalize a finite law, compute moments or conditional probabilities, and test independence from the joint law rather than covariance alone;
  2. state the physical assumptions selecting an ensemble and derive one response–fluctuation identity without treating it as evidence of equilibration; and
  3. name an estimand, retain covariance terms in its uncertainty, and state which theorem or sampling assumptions would be needed for an interval or large-NN claim.

Re-run the statistical and probability diagnostic with a different finite spectrum and correlation parameter. If all three tasks are Demonstrated, return to the page that sent you here. If correlated uncertainty is now clear but precision, convergence, testing, or reproducibility is still blocking the work, continue to Numerical and reproducibility repair and then repeat the computational and evidence diagnostic.

  • Durrett, Rick. Probability: Theory and Examples. 5th ed. Cambridge University Press, 2019. Official open PDF.
  • Kardar, Mehran. Statistical Physics of Particles. Cambridge University Press, 2007. DOI.
  • Wolff, Ulli. “Monte Carlo Errors with Less Errors.” Computer Physics Communications 156, no. 2 (2004): 143–153. DOI; arXiv:hep-lat/0306017.