Skip to main content
University Physics V

University Physics V · The Quantum Wavefunction · 3.4

Expectation Values, Variances & Moments

Once a state is normalised, every prediction you can take to a laboratory is a number obtained by sandwiching an operator between the state and itself. This is the machinery that turns ψ into measurable statistics: a mean, a spread, and an honest account of how many runs you need before the mean means anything.

01

Build the model

Connect the measurement to the mechanism.

An expectation value is not a measurement; it is a functional. Feed a normalised |ψ⟩ and a self-adjoint operator A into ⟨A⟩ = ⟨ψ|A|ψ⟩ and one real number comes out, and because an inner product is basis-free that number does not care whether you compute it as an integral over x, an integral over p, or a vector-matrix-vector product on a grid. Expand |ψ⟩ in the eigenbasis of A and the same number reappears as Σ aₙ|cₙ|², a probability-weighted average of the outcomes an apparatus can actually record — which is why ⟨A⟩ is real, why it lies inside the range of the spectrum, and why it is usually not itself an eigenvalue.

The second moment buys the spread: σA² = ⟨A²⟩ − ⟨A⟩² is the squared norm of the vector (A − ⟨A⟩)|ψ⟩, so it is non-negative and vanishes exactly when |ψ⟩ is an eigenvector of A. The cost is that all of this is ensemble language. ⟨A⟩ and σA describe many identically prepared runs, never one of them; σA belongs to the state and no better apparatus reduces it, while only σA/√N, the uncertainty of the estimated mean, shrinks with data. The second cost is convergence: normalisation fixes the zeroth moment and nothing else, so a state with heavy tails can be a perfectly respectable vector in L2 whose ⟨x²⟩ is infinite.

Simple definition
The expectation value of an observable A in the state |ψ⟩ is the number ⟨A⟩ = ⟨ψ|A|ψ⟩: the mean of the outcomes A would give over a large ensemble of systems all prepared in |ψ⟩, weighted by the Born probabilities.
Example
For |ψ⟩ = (3|↑⟩ + 4i|↓⟩)/5 the Born probabilities are 9/25 and 16/25, so ⟨Sz⟩ = 0.36(ℏ/2) + 0.64(−ℏ/2) = −0.14ℏ — a number no single measurement, which returns only ±ℏ/2, can ever produce.
Expectation value as an inner product⟨A⟩ = ⟨ψ|A|ψ⟩ = ∫ ψ*(x) (Aψ)(x) dx

Basis-free: the position integral, the momentum integral and a grid matrix product all return the same number.

Written for ⟨ψ|ψ⟩ = 1; divide by ⟨ψ|ψ⟩ otherwise. ⟨A⟩ carries the units of A itself.

A probability-weighted average of outcomes⟨A⟩ = Σₙ aₙ |⟨aₙ|ψ⟩|² = Σₙ aₙ |cₙ|²

⟨A⟩ lies between the smallest and the largest eigenvalue, but is rarely equal to any of them.

aₙ the eigenvalues of A, cₙ = ⟨aₙ|ψ⟩, Σ|cₙ|² = 1; a continuous spectrum replaces the sum by ∫ da.

The two representations⟨x⟩ = ∫ x |ψ(x)|² dx⟨p⟩ = ∫ ψ* (−iℏ dψ/dx) dx = ∫ p |φ(p)|² dp

Weighting by a density works only for the operator diagonal in that basis: p must be applied, never multiplied.

|ψ|² in m⁻¹ and |φ|² in (kg m s⁻¹)⁻¹; φ(p) = ⟨p|ψ⟩ is the Fourier transform of ψ.

Variance as a squared normσA² = ⟨A²⟩ − ⟨A⟩² = ‖(A − ⟨A⟩)|ψ⟩‖² ≥ 0

The norm form proves non-negativity without an integral, and is the first line of the uncertainty derivation.

σA carries the units of A; equality holds exactly when |ψ⟩ is an eigenvector of A.

Reality is Hermiticity⟨A⟩* = ⟨ψ|A†|ψ⟩⟨A⟩ real for every |ψ⟩ ⟺ A = A†

An imaginary part is never rounding error: it is a dropped boundary term, or an operator that is not Hermitian.

A† must share the domain of A; for p on the half-line [0, ∞), Im⟨p⟩ = ℏ|ψ(0)|²/2.

When a moment fails to exist⟨xn⟩ exists ⟺ ∫ |x|n |ψ(x)|² dx converges

Normalisation fixes the zeroth moment alone; a heavy tail can leave ⟨x²⟩ infinite while ⟨p²⟩ stays finite.

The Lorentzian density |ψ|² = (a/π)/(x² + a²) is normalised, yet its ⟨x²⟩ diverges.

01

Operate first, then overlap

The bracket ⟨ψ|A|ψ⟩ is an instruction with an order: act with A on |ψ⟩, then take the inner product of the result with ⟨ψ|. In the position representation that is ∫ψ*(Aψ)dx, which equals ∫A|ψ|²dx only when A is multiplication by a function of x. Position qualifies, momentum does not. Take the box ground state ψ₁ = √(2/L) sin(πx/L), which is real. Then ⟨p⟩ = ∫ψ₁(−iℏψ₁′)dx = −iℏ[ψ₁²/2] evaluated at the walls, which is zero because Dirichlet conditions kill ψ₁ there. The expression ∫p|ψ|²dx is not merely wrong, it is not well formed: p is not a function of x, so there is nothing to put in the integrand. And the second moment is emphatically not the square of the first — ⟨p²⟩ = (πℏ/L)² while ⟨p⟩² = 0, and it is that gap that gives a confined electron its zero-point energy.

02

In an eigenbasis it is an average over outcomes

Insert the resolution of the identity Σ|n⟩⟨n| = 1 on both sides of A and use A|n⟩ = aₙ|n⟩. Everything collapses to ⟨A⟩ = Σ aₙ|cₙ|² with cₙ = ⟨n|ψ⟩. Three facts follow at once: ⟨A⟩ is real because the aₙ are; it lies between the smallest and largest aₙ; and it is generally not an eigenvalue, so it is not a possible reading. Numbers make the point. An electron in a well of width L = 0.50 nm has E₁ = h²/(8mL²) = 1.50 eV, so the levels are 1.50 eV, 6.02 eV, 13.5 eV. Prepare |ψ⟩ = (|1⟩ + i|2⟩)/√2 and ⟨H⟩ = ½(1.50) + ½(6.02) = 3.76 eV, with σH = 1.5E₁ = 2.26 eV. No apparatus ever displays 3.76 eV; each run returns 1.50 eV or 6.02 eV, half the time each. Notice too that the factor i vanished: H is diagonal in this basis, so only |cₙ|² enters and a relative phase cannot touch any energy statistic.

03

Reality is a boundary condition in disguise

Subtracting the conjugate gives ⟨A⟩ − ⟨A⟩* = ⟨ψ|(A − A†)|ψ⟩, so a real expectation value is a statement about the adjoint, and the adjoint is a statement about the domain. Test it on p = −iℏ d/dx. On the whole line, one integration by parts gives ⟨p⟩ − ⟨p⟩* = −iℏ[|ψ|²] between ±∞, which vanishes because a square-integrable ψ dies at infinity. Restrict the same operator to the half-line [0, ∞) and the boundary term at the origin survives: ⟨p⟩ − ⟨p⟩* = iℏ|ψ(0)|², so Im⟨p⟩ = ℏ|ψ(0)|²/2. For a state with |ψ(0)|² = 1.0 nm⁻¹ that is 5.3 × 10⁻²⁶ kg m s⁻¹ of imaginary momentum. The symbol −iℏ d/dx did not change; the domain did. So an imaginary part in a numerical expectation value is a diagnostic, not noise: go and find the boundary term you discarded.

04

The variance is the length of a deviation vector

Define |δ⟩ = (A − ⟨A⟩)|ψ⟩. Because A is Hermitian and ⟨A⟩ is a real number, ⟨δ|δ⟩ = ⟨ψ|(A − ⟨A⟩)²|ψ⟩ = ⟨A²⟩ − ⟨A⟩², so the variance is a squared norm. Two consequences are free: it can never be negative, and it is zero only if |δ⟩ is the zero vector, that is if A|ψ⟩ = ⟨A⟩|ψ⟩ — an eigenvector. A spread of zero is therefore not a well-run experiment but a statement about which eigenbasis the state sits in. For the ground state of a 1.00 nm box, ⟨x⟩ = 0.500 nm and ⟨x²⟩ = L²(1/3 − 1/(2π²)) = 0.2827 nm², so σₓ = √(0.2827 − 0.2500) = 0.181 nm, and with σₚ = πℏ/L the product is 0.568ℏ: above ℏ/2, not at it. One numerical warning follows from the same algebra. ⟨A²⟩ − ⟨A⟩² subtracts two nearly equal large numbers, so on a grid accumulate Σ(x − ⟨x⟩)²|ψ|²Δx instead and keep your digits.

05

An ensemble mean, not a prediction for one run

The Born rule delivers frequencies, so ⟨A⟩ and σA describe N systems identically prepared in |ψ⟩ and each measured once. They are not properties of a single run, and a run is not repeatable within one system: the Luders projection replaces |ψ⟩ by the outcome eigenvector, so a second measurement samples the collapsed state instead. Estimating ⟨A⟩ from N runs carries a standard error σA/√N, and this is the only quantity in sight that improves with data. To pin ⟨x⟩ for the 1.00 nm box ground state to ±0.010 nm you need N = (0.181/0.010)² ≈ 3.3 × 10² runs. Meanwhile σₓ itself stays at 0.181 nm however many runs you take and however good the detector is, because it is a property of ψ. Keep the two apart in your notation: σA is the width of the distribution, σA/√N the width of your ignorance about its centre.

06

Moments that do not exist, and the grid that hides it

⟨ψ|ψ⟩ = 1 is one convergent integral and it certifies nothing about the others. Take ψ(x) = √(a/π)/√(x² + a²). It is normalised, since ∫dx/(x² + a²) = π/a, but its density is a Lorentzian falling only as x⁻², so x²|ψ|² tends to the constant a/π and ⟨x²⟩ diverges linearly. Even ⟨x⟩ is only conditionally zero: the integrand is odd, but ∫|x||ψ|²dx diverges logarithmically, so the cancellation is a convention rather than a value. Momentum is untroubled — ⟨p²⟩ = ℏ²∫|ψ′|²dx = ℏ²/(8a²) is finite, so ψ sits in the domain of p but not in the domain of x. The numerical trap is that a grid never reports infinity. On [−X, X] the truncated moment is ⟨x²⟩ = (2a/π)(X − a arctan(X/a)), which for a = 1.0 nm gives 11.8 nm² at X = 20 nm and 24.5 nm² at X = 40 nm. A number that doubles when the box doubles has not converged.

02

Change one variable at a time

Make the relationship visible.

Interactive model
45 °
0 °

Hold θ at 45° and sweep the relative phase φ: the density slides across the box and ⟨x⟩ follows it, while ⟨H⟩ and σH never move — φ lives only in the interference term, off-diagonal in the energy basis. Then set θ to 0° or 90° and φ stops mattering: an eigenvector has no interference term to shift.

Interactive physics modelProbability density L|ψ(x)|² across an infinite well of width L for |ψ⟩ = cos θ|1⟩ + e^(iφ) sin θ|2⟩, with the classical uniform density 1/L dashed across it. The solid vertical line marks ⟨x⟩ = 0.320 L and the dashed pair marks ⟨x⟩ ± σₓ. The energy statistics read ⟨H⟩ = 2.50 E₁ with spread σ_H = 1.50 E₁.|ψ⟩ = cos θ|1⟩ + e(iφ) sin θ|2⟩θ = 45° φ = 0°density L|ψ(x)|²10L⟨x⟩ = 0.320 Ldashed pair: ⟨x⟩ − σₓ and ⟨x⟩ + σₓ

MEAN ⟨x⟩ / L0.320

SPREAD σₓ / L0.139

MEAN ⟨H⟩ / E₁2.50

SPREAD σH / E₁1.50

Live interpretationMEAN ⟨x⟩ / L: 0.320. SPREAD σₓ / L: 0.139. MEAN ⟨H⟩ / E₁: 2.50. SPREAD σH / E₁: 1.50

03

Catch the common trap

Explain before calculating.

An electron in an infinite well is prepared as |ψ⟩ = (|1⟩ + 2|2⟩)/√5, where H|n⟩ = n²E₁|n⟩. What is ⟨H⟩?

Choose an answer to test the model.

04

Practice & worked examples

Reason from the model, then test the result.

EasyA spin-½ particle is prepared in |ψ⟩ = (3|↑⟩ + 4i|↓⟩)/5, with Sz|↑⟩ = +(ℏ/2)|↑⟩ and Sz|↓⟩ = −(ℏ/2)|↓⟩. Find ⟨Sz⟩ and the spread σ in Sz.
  1. Check the norm first: |3/5|² + |4i/5|² = 9/25 + 16/25 = 1, so no division by ⟨ψ|ψ⟩ is needed. The i is a relative phase and disappears from every squared modulus.
  2. Born probabilities: P(+ℏ/2) = 9/25 = 0.36 and P(−ℏ/2) = 16/25 = 0.64.
  3. ⟨Sz⟩ = Σ aₙ|cₙ|² = 0.36(+ℏ/2) + 0.64(−ℏ/2) = (0.36 − 0.64)(ℏ/2) = −0.14ℏ.
  4. Second moment: both eigenvalues square to ℏ²/4, so ⟨Sz²⟩ = 0.25ℏ² in every state whatsoever.
  5. σ² = ⟨Sz²⟩ − ⟨Sz⟩² = 0.25ℏ² − 0.0196ℏ² = 0.2304ℏ², so σ = 0.48ℏ.

Answer⟨Sz⟩ = −0.14ℏ and σ = 0.48ℏ. The mean is neither of the two possible readings ±ℏ/2, and σ is large because the state is far from an Sz eigenvector.

MediumAn electron occupies the ground state of an infinite square well of width L = 0.50 nm, ψ₁(x) = √(2/L) sin(πx/L). Compute ⟨x⟩, σₓ, ⟨p⟩ and σₚ, and form the product σₓ σₚ. Use ⟨x²⟩ = L²(1/3 − 1/(2π²)).
  1. ⟨x⟩ = ∫x|ψ₁|²dx = L/2 = 0.250 nm, by the symmetry of sin²(πx/L) about x = L/2.
  2. ⟨x²⟩ = L²(1/3 − 1/(2π²)) = (0.250 nm²)(0.33333 − 0.05066) = 0.07067 nm². Then σₓ² = 0.07067 − 0.06250 = 0.00817 nm², so σₓ = 0.0904 nm.
  3. ⟨p⟩ = ∫ψ₁(−iℏψ₁′)dx = −iℏ[ψ₁²/2] at the walls = 0, since ψ₁ is real and vanishes at x = 0 and x = L. Do not write ∫p|ψ|²dx: p is not a function of x.
  4. ⟨p²⟩ = 2m⟨H⟩ = 2mE₁ = (πℏ/L)², and since ⟨p⟩ = 0 that is already the variance: σₚ = πℏ/L = π(1.0546 × 10⁻³⁴)/(0.50 × 10⁻⁹) = 6.63 × 10⁻²⁵ kg m s⁻¹.
  5. σₓ σₚ = (0.0904 × 10⁻⁹)(6.63 × 10⁻²⁵) = 5.99 × 10⁻³⁵ J s = 0.568ℏ, above the bound ℏ/2 = 0.500ℏ but not at it.

Answer⟨x⟩ = 0.250 nm, σₓ = 0.0904 nm, ⟨p⟩ = 0, σₚ = 6.63 × 10⁻²⁵ kg m s⁻¹, and σₓ σₚ = 0.568ℏ.

HardA one-dimensional state has ψ(x) = √(a/π)/√(x² + a²) with a = 1.0 nm. Show that it is normalised, decide which of ⟨x²⟩ and ⟨p²⟩ exists, and say what a numerical grid on [−X, X] would report for ⟨x²⟩ at X = 20 nm and at X = 40 nm.
  1. Normalisation: ∫dx/(x² + a²) = π/a, so ∫|ψ|²dx = (a/π)(π/a) = 1. The density is the Lorentzian |ψ(x)|² = (a/π)/(x² + a²), whose tail falls only as x⁻².
  2. Position: x²|ψ|² tends to a/π as |x| grows, so ∫x²|ψ|²dx diverges linearly and ⟨x²⟩ does not exist. ⟨x⟩ is only conditionally zero, since ∫|x||ψ|²dx diverges logarithmically.
  3. Momentum: ψ′ = −√(a/π) x (x² + a²)⁻³⁄², and ∫x²dx/(x² + a²)³ = π/(8a³), so ⟨p²⟩ = ℏ²∫(ψ′)²dx = ℏ²(a/π)(π/(8a³)) = ℏ²/(8a²). Hence σₚ = ℏ/(2√2 a) = 3.73 × 10⁻²⁶ kg m s⁻¹.
  4. Truncating to [−X, X] makes the integral finite: ⟨x²⟩ = (2a/π)(X − a arctan(X/a)). With a = 1.0 nm this gives 11.8 nm² at X = 20 nm and 24.5 nm² at X = 40 nm.
  5. Doubling the box nearly doubles the answer instead of leaving it fixed, and that linear growth in X is exactly how a divergent moment presents itself numerically. Convergence in box size is a test to run, never an assumption.

Answerψ is normalised. ⟨p²⟩ = ℏ²/(8a²) is finite, giving σₚ = 3.73 × 10⁻²⁶ kg m s⁻¹, while ⟨x²⟩ diverges. A grid returns 11.8 nm² at X = 20 nm and 24.5 nm² at X = 40 nm — growth linear in X, not convergence.