Skip to content

Error Estimates

An error estimate is a reasoned statement of how far a numerical answer may be from the intended mathematical or physical quantity. It may come from a theorem, a residual, a refinement study, a statistical error bar, an exactly solvable benchmark, or a comparison between independent methods.

In quantum mechanics, error estimates are not optional polish. They decide whether an energy splitting is resolved, whether a wave packet has propagated accurately, whether a Monte Carlo signal is larger than noise, and whether a small symmetry breaking is physical or numerical.

This page gives the taxonomy and reporting habits. Convergence Tests gives the practical refinement workflow. Detailed mechanisms live in Floating-Point Arithmetic, Conditioning and Stability, Discretization, and Monte Carlo Basics.

A computation usually approximates a chain of problems:

physical model→continuum mathematical problem→finite numerical problem→computed answer.\text{physical model} \to \text{continuum mathematical problem} \to \text{finite numerical problem} \to \text{computed answer}.

An error estimate should say which gap it addresses. A small eigensolver residual does not estimate model error. A Monte Carlo standard error does not estimate finite-size bias. A grid-refinement trend does not estimate a coding mistake.

For a reported quantity QcompQ_{\mathrm{comp}}, a schematic decomposition is

Qcomp−Qphys=emodel+edomain+edisc+ealg+eround+estat+eimpl.\begin{aligned} Q_{\mathrm{comp}}-Q_{\mathrm{phys}} &= e_{\mathrm{model}} + e_{\mathrm{domain}} + e_{\mathrm{disc}}\\ &\quad+ e_{\mathrm{alg}} + e_{\mathrm{round}} + e_{\mathrm{stat}} + e_{\mathrm{impl}}. \end{aligned}

Not every term appears in every calculation, and the terms need not be independent. The decomposition is a checklist: it prevents one small diagnostic from being mistaken for a full uncertainty analysis.

Truncation error comes from replacing an infinite or continuum object by a finite approximation. Examples include:

  • grid spacing hh in finite differences;
  • time step Δt\Delta t in time evolution;
  • basis cutoff NN in a spectral or variational method;
  • finite box size LL for a problem on the line;
  • quadrature order or number of nodes;
  • angular momentum, occupation-number, or energy cutoffs.

If a method has leading error ChpCh^p, then

Q(h)=Q+Chp+O(hp+1)Q(h) = Q + Ch^p + O(h^{p+1})

or sometimes

Q(h)=Q+Chp+O(hp+2),Q(h) = Q + Ch^p + O(h^{p+2}),

depending on symmetry and the method. The order statement is meaningful only when the solution is smooth enough and the boundary implementation has the same accuracy as the interior scheme.

For a second-order finite-difference eigenvalue calculation, one expects low resolved levels to change by about a factor of 44 when hh is halved, after box-size error and algebraic solver error are under control.

Suppose

Q(h)=Q+Chp+O(hp+1)Q(h)=Q+Ch^p+O(h^{p+1})

and the same calculation is repeated at h/2h/2. Then

Q(h/2)−Q(h)=C(2−p−1)hp+O(hp+1).Q(h/2)-Q(h) = C\left(2^{-p}-1\right)h^p + O(h^{p+1}).

The finer-grid error is approximately

Q(h/2)−Q≈Q(h/2)−Q(h)2p−1.Q(h/2)-Q \approx \frac{Q(h/2)-Q(h)}{2^p-1}.

Thus an error estimate is

ϵh/2≈∣Q(h/2)−Q(h)∣2p−1.\epsilon_{h/2} \approx \frac{ \lvert Q(h/2)-Q(h)\rvert }{2^p-1}.

This estimate is useful only in the asymptotic refinement regime. If the observed ratios are inconsistent, another error source is probably dominating or the assumed order has not been reached.

A finite box can approximate an infinite-domain bound state, but the box position is an error source. If a localized wavefunction is not negligible at the boundary, refining the grid inside the same box will not fix the result.

Domain truncation checks include:

  • increase the box size while holding resolution fixed;
  • inspect wavefunction amplitude or probability near boundaries;
  • compare boundary conditions when they should be irrelevant;
  • estimate exponential tails in forbidden regions;
  • avoid interpreting finite-box continuum levels as continuum energies.

For scattering and continuum states, box-size dependence is often the signal rather than a nuisance. The finite box changes the spectrum, and extracting physical observables requires additional analysis.

After discretization, a finite problem still has to be solved. Eigensolvers, linear solvers, nonlinear root finders, and optimization algorithms introduce algebraic error.

For a linear system Ax=bAx=b, the residual is

r=b−Ax~.r = b-A\tilde x.

The forward error satisfies

x−x~=A−1rx-\tilde x = A^{-1}r

when AA is invertible. Therefore a small residual is reassuring only after conditioning is considered.

For an eigenpair of a Hermitian matrix, a common residual is

r=Hψ~−E~ψ~.r = H\tilde\psi - \tilde E\tilde\psi.

The residual norm measures how well the finite matrix equation is solved. It does not include grid error, basis truncation error, or physical model error.

Roundoff error comes from finite-precision arithmetic. A standard local model is

fl⁡(x∘y)=(x∘y)(1+δ),∣δ∣≤u,\operatorname{fl}(x\circ y) = (x\circ y)(1+\delta), \qquad \lvert\delta\rvert\le u,

where uu is the unit roundoff and ∘\circ is an arithmetic operation.

Roundoff becomes visible when:

  • many operations accumulate error;
  • cancellation removes leading digits;
  • derivative formulas divide by small powers of hh;
  • matrices are ill conditioned;
  • nearly degenerate subspaces are compared vector by vector;
  • tiny probabilities, splittings, or tunneling amplitudes are inferred from large intermediate quantities.

For a centered finite-difference second derivative, a schematic balance is

error∼C1h2+C2uh2.\text{error} \sim C_1h^2 + C_2\frac{u}{h^2}.

The first term decreases with refinement; the second can grow. The best grid spacing is not always the smallest grid spacing.

Statistical error appears when an answer is estimated from random samples: measurement shots, Monte Carlo integration, stochastic trajectories, or randomized numerical algorithms.

For independent samples Y1,…,YNY_1,\dots,Y_N with sample mean

YˉN=1N∑k=1NYk,\bar Y_N = \frac1N \sum_{k=1}^N Y_k,

the estimated standard error is

SE⁡^=sNN,\widehat{\operatorname{SE}} = \frac{s_N}{\sqrt N},

where sNs_N is the sample standard deviation.

If samples are correlated, replace NN by an effective sample size. For Markov chains, a common approximation is

Neff≈N2τint,N_{\mathrm{eff}} \approx \frac{N}{2\tau_{\mathrm{int}}},

where τint\tau_{\mathrm{int}} is an integrated autocorrelation time.

Statistical error bars do not automatically include bias from equilibration, time-step error, finite-size effects, trial-wavefunction choices, or sign and phase problems.

Variance is random scatter. Bias is systematic displacement.

More samples reduce the variance of an unbiased estimator:

SE⁡∝N−1/2.\operatorname{SE} \propto N^{-1/2}.

More samples do not automatically reduce bias. Examples of bias include:

  • finite time step in an imaginary-time path integral;
  • finite population or finite walker bias;
  • incomplete equilibration in a Markov chain;
  • variational bias from a restricted ansatz;
  • finite box or finite basis truncation;
  • regularization or cutoff choices.

A result with a tiny statistical error bar can still be wrong if the systematic error is larger.

Independent statistical errors are often combined in quadrature:

ϵtot≈(ϵ12+ϵ22+⋯ )1/2.\epsilon_{\mathrm{tot}} \approx \left( \epsilon_1^2+\epsilon_2^2+\cdots \right)^{1/2}.

Deterministic systematic errors are less friendly. If their signs and correlations are unknown, a conservative bound adds magnitudes:

ϵsys≤ϵ1+ϵ2+⋯ .\epsilon_{\mathrm{sys}} \le \epsilon_1+\epsilon_2+\cdots.

In practice, quote the dominant known contributions separately when possible:

E=−0.5000003±2×10grid−7±1×10solver−8.E = -0.5000003 \pm 2\times10^{-7}_{\mathrm{grid}} \pm 1\times10^{-8}_{\mathrm{solver}}.

The point is not to decorate the answer. The point is to make clear which uncertainty is controlled and which one remains the limiting source.

Suppose a normalized exact state ψ\psi is approximated by another normalized state ψ~\tilde\psi with

∥ψ~−ψ∥≤ϵ.\lVert \tilde\psi-\psi\rVert \le \epsilon.

For a bounded observable AA, a simple bound is

∣⟨ψ~,Aψ~⟩−⟨ψ,Aψ⟩∣≤2∥A∥ϵ+O(ϵ2).\left\lvert \langle\tilde\psi,A\tilde\psi\rangle - \langle\psi,A\psi\rangle \right\rvert \le 2\lVert A\rVert\epsilon + O(\epsilon^2).

This estimate is not always sharp, and many quantum observables are unbounded in the continuum. Still, it gives the right warning: a small state-vector error must be interpreted in the norm and operator scale relevant to the observable.

For eigenstates, energies can converge faster than wavefunctions in some variational settings, while local observables may converge more slowly. Estimate the error in the quantity you actually report.

If two computed energies are

E1±ϵ1,E2±ϵ2,E_1\pm\epsilon_1, \qquad E_2\pm\epsilon_2,

then the splitting

ΔE=E2−E1\Delta E=E_2-E_1

has uncertainty at least comparable to the uncertainties in the two energies. If the errors are independent statistical errors, one may estimate

ϵΔ≈(ϵ12+ϵ22)1/2.\epsilon_{\Delta} \approx \left( \epsilon_1^2+\epsilon_2^2 \right)^{1/2}.

For systematic discretization errors, cancellation is possible but must be demonstrated. A small printed ΔE\Delta E is not resolved unless it is larger than the relevant uncertainty and stable under refinement.

A mature numerical result should state:

  • the quantity being approximated;
  • the numerical method and discretization parameters;
  • the refinement or residual checks performed;
  • the dominant error estimate;
  • whether the error is statistical, deterministic, or heuristic;
  • the number of significant digits justified by the estimate;
  • known uncontrolled errors.

Avoid reporting

E=−0.499999999731E=-0.499999999731

if the grid-refinement uncertainty is 10−510^{-5}. A better report is

E=−0.50000±0.00001.E=-0.50000\pm 0.00001.

Fewer honest digits are more informative than many decorative digits.

Useful error evidence includes:

  • exact solutions such as the harmonic oscillator, infinite well, and two-level system;
  • residuals for finite equations;
  • conservation of norm, energy, trace, positivity, or symmetry labels;
  • grid, basis, box-size, and time-step refinement;
  • comparison between finite-difference, spectral, and variational methods;
  • independent random seeds and autocorrelation analysis;
  • higher precision or alternative summation for cancellation-prone calculations.

No single check is universal. The best error estimate triangulates from several checks whose failure modes are different.

For standard exact and controlled test cases, see Benchmark Problems.

  • Reporting Monte Carlo error bars while ignoring systematic bias.
  • Treating an eigensolver residual as a discretization error estimate.
  • Quoting the formal order of a method without showing observed refinement.
  • Refining hh while leaving the domain size or time step fixed and unconverged.
  • Assuming roundoff is negligible because double precision was used.
  • Reporting more digits than the uncertainty supports.
  • Combining systematic errors in quadrature without justification.
  • Using a conserved norm as the only accuracy test for time evolution.
  • Claiming a tiny splitting without showing it survives all relevant error estimates.
  • N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd ed., SIAM, 2002.
  • R. J. LeVeque, Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007.
  • J. Stoer and R. Bulirsch, Introduction to Numerical Analysis, 3rd ed., Springer, 2002.
  • L. N. Trefethen and D. Bau, Numerical Linear Algebra, SIAM, 1997.
  • J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
  • C. P. Robert and G. Casella, Monte Carlo Statistical Methods, 2nd ed., Springer, 2004.
  1. Richardson estimate for a second-order method.

Suppose a quantity is computed as Q(h)=1.024Q(h)=1.024 and Q(h/2)=1.006Q(h/2)=1.006 with leading error Ch2Ch^2. Estimate the error in the finer value.

Solution

For p=2p=2,

ϵh/2≈∣Q(h/2)−Q(h)∣22−1=∣1.006−1.024∣3=0.006.\epsilon_{h/2} \approx \frac{\lvert Q(h/2)-Q(h)\rvert}{2^2-1} = \frac{\lvert1.006-1.024\rvert}{3} = 0.006.

So the finer value is estimated as 1.006±0.0061.006\pm0.006 from this two-level refinement model.

  1. Optimal grid spacing in a schematic error balance.

Minimize

E(h)=C1h2+C2uh2E(h)=C_1h^2+C_2\frac{u}{h^2}

over h>0h\gt0.

Solution

Differentiate:

dEdh=2C1h−2C2uh−3.\frac{dE}{dh} = 2C_1h - 2C_2u h^{-3}.

Set this to zero:

C1h=C2uh−3,h4=C2uC1.C_1h = C_2u h^{-3}, \qquad h^4 = \frac{C_2u}{C_1}.

Thus

hopt=(C2uC1)1/4.h_{\mathrm{opt}} = \left( \frac{C_2u}{C_1} \right)^{1/4}.

The formula is schematic, but it shows why making hh arbitrarily small can increase roundoff-dominated error.

  1. Monte Carlo standard error.

A Monte Carlo estimate uses N=40,000N=40{,}000 independent samples with sample standard deviation sN=3s_N=3. Estimate the standard error of the mean.

Solution

Use

SE⁡^=sNN=3200=0.015.\widehat{\operatorname{SE}} = \frac{s_N}{\sqrt N} = \frac{3}{200} = 0.015.
  1. Splitting uncertainty.

Two independently estimated energies have uncertainties ϵ1=2×10−6\epsilon_1=2\times10^{-6} and ϵ2=3×10−6\epsilon_2=3\times10^{-6}. Estimate the statistical uncertainty in ΔE=E2−E1\Delta E=E_2-E_1.

Solution

For independent statistical uncertainties, combine in quadrature:

ϵΔ≈((2×10−6)2+(3×10−6)2)1/2=13×10−6≈3.6×10−6.\epsilon_\Delta \approx \left( (2\times10^{-6})^2 + (3\times10^{-6})^2 \right)^{1/2} = \sqrt{13}\times10^{-6} \approx 3.6\times10^{-6}.
  1. Why is a small residual not a full error estimate?
Solution

A residual says how well the computed answer solves the finite equations. It does not by itself include conditioning, discretization error, domain truncation, model error, roundoff amplification, or statistical uncertainty. For an ill-conditioned linear system, even a small residual can correspond to a large forward error because the error is A−1rA^{-1}r.