The ensemble average of a dynamical variable O(q,p) over an ensemble is the weighted average over all possible microstates of the system in the thermodynamic limit:
⟨O⟩=∫ρ(q,p,t)dpdq∫ρ(q,p,t)O(q,p)dpdq=Z1∫Oρ dpdq
where ρ is the density function of the ensemble and Z is the partition function. For discrete states, this becomes
⟨O⟩=∑ρ(t)∑ρ(t)O=Z1∑Oρ
where the sums go over some label to index the states.
In the quantum case, the average in a system state ∣ψ⟩ for an observable O^, expressed in a basis of eigenstates {∣n⟩}n∈N, is
⟨O^⟩=Tr(ρ^)Tr(O^ρ^)=n∑p(n)⟨n∣O^∣n⟩
where ρ^ is the density matrix of the system and p(n) is the Probability of being in the microstate ∣n⟩1 . Note that this is just the weighted sum of state averages ⟨n∣O^∣n⟩ where the likeliness of each state is the weight. The probabilities can be computed from the coefficients of the Fourier series expansion of ∣ψ⟩ in the ∣n⟩ basis:
∣ψ⟩=n∑cn∣n⟩→p(n)=∣cn∣2
Time independence#
Note how ⟨O⟩ is in general time dependent, as it depends on ρ(q,p,t). When ⟨O⟩ does not depend on time, the system is in thermal equilibrium. Knowing when ⟨O⟩ isn't time dependent can be useful. For instance, if ρ is itself time independent (ρ(q,p) instead of ρ(q,p,t)), then it follows that ⟨O⟩ is itself independent. But then the question is, when does ρ not depend on time? One such case is when
ρ(q,p)=ρ′(H(q,p))
where H is the Hamiltonian of the system. In this case the prime means differentiation. In fact, if this is true then
dtdρ=−i=1∑3N(∂H∂ρ′∂qi∂H∂pi∂H−∂H∂ρ′∂pi∂H∂qi∂H)=0
This verifies Liouville's theorem.