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.
Different checks control different errors. Convergence Tests gives the practical refinement workflow. Detailed mechanisms live in Floating-Point Arithmetic, Conditioning and Stability, Discretization, and Monte Carlo Basics.
Helpful background. Review conditioning and stability to interpret a residual separately from the error in a solution.
From a physical model to a computed answer
Section titled “From a physical model to a computed answer”A computation usually passes from a physical model to a continuum mathematical problem, then to a finite numerical problem, and finally to a 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 , a schematic decomposition is
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 and Discretization Error
Section titled “Truncation and Discretization Error”Truncation error comes from replacing an infinite or continuum object by a finite approximation. Examples include:
- grid spacing in finite differences;
- time step in time evolution;
- basis cutoff in a spectral or variational method;
- finite box size 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 , then
or sometimes
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 when is halved, after box-size error and algebraic solver error are under control.
Richardson Error Estimate
Section titled “Richardson Error Estimate”Suppose
and the same calculation is repeated at . Then
The finer-grid error is approximately
Thus an error estimate is
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.
Domain Truncation Error
Section titled “Domain Truncation Error”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.
Algebraic Solver Error
Section titled “Algebraic Solver Error”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 , the residual is
The forward error satisfies
when is invertible. Therefore a small residual is reassuring only after conditioning is considered.
For an eigenpair of a Hermitian matrix, a common residual is
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
Section titled “Roundoff Error”Roundoff error comes from finite-precision arithmetic. A standard local model is
where is the unit roundoff and is a correctly rounded basic operation, assuming no overflow or underflow and a nonzero exact result.
Roundoff becomes visible when:
- many operations accumulate error;
- cancellation removes leading digits;
- derivative formulas divide by small powers of ;
- 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
The first term decreases with refinement; the second can grow. The best grid spacing is not always the smallest grid spacing.
Statistical Error
Section titled “Statistical Error”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 with sample mean
the estimated standard error is
where is the sample standard deviation.
If samples are correlated, replace by an effective sample size. For Markov chains, a common approximation is
where for the sampled observable, assuming a stationary process with summable autocorrelations. Independent samples have .
Statistical error bars do not automatically include bias from equilibration, time-step error, finite-size effects, trial-wavefunction choices, or sign and phase problems.
Bias Versus Variance
Section titled “Bias Versus Variance”Variance is random scatter. Bias is systematic displacement.
More samples reduce the variance of an unbiased estimator:
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.
Combining Error Estimates
Section titled “Combining Error Estimates”Independent statistical errors are often combined in quadrature:
Deterministic systematic errors are less friendly. If their signs and correlations are unknown, a conservative bound adds magnitudes:
In practice, quote the dominant known contributions separately when possible:
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.
Error in Observables
Section titled “Error in Observables”Suppose a normalized exact state is approximated by another normalized state with
For a bounded observable , a simple bound is
The bound follows by adding and subtracting and applying Cauchy–Schwarz to the two differences. It is exact for normalized states; 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.
Small Splittings and Resolved Digits
Section titled “Small Splittings and Resolved Digits”If two computed energies are
then the splitting
has uncertainty that depends on correlations between the two estimates. Common errors can cancel, while errors of opposite signs can add. If the errors are independent statistical errors, one may estimate
For systematic discretization errors, cancellation is possible but must be demonstrated. A small printed is not resolved unless it is larger than the relevant uncertainty and stable under refinement.
Reporting Numerical Results
Section titled “Reporting Numerical Results”To make a numerical result interpretable, 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
if the grid-refinement uncertainty is . A better report is
Fewer honest digits are more informative than many decorative digits.
Independent checks
Section titled “Independent checks”Useful checks include:
- 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.
Common Mistakes
Section titled “Common Mistakes”- 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 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.
References
Section titled “References”- 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.
- C. P. Robert and G. Casella, Monte Carlo Statistical Methods, 2nd ed., Springer, 2004.
- J. Stoer and R. Bulirsch, Introduction to Numerical Analysis, 3rd ed., Springer, 2002.
- J. M. Thijssen, Computational Physics, 2nd ed., Cambridge University Press, 2007.
- L. N. Trefethen and D. Bau, Numerical Linear Algebra, SIAM, 1997.
Exercises
Section titled “Exercises”- Richardson estimate for a second-order method.
Suppose a quantity is computed as and with leading error . Estimate the error in the finer value.
Solution
For ,
So the finer value is estimated as from this two-level refinement model.
- Optimal grid spacing in a schematic error balance.
Minimize
over .
Solution
Differentiate:
Set this to zero:
Thus
The formula is schematic, but it shows why making arbitrarily small can increase roundoff-dominated error.
- Monte Carlo standard error.
A Monte Carlo estimate uses independent samples with sample standard deviation . Estimate the standard error of the mean.
Solution
Use
- Splitting uncertainty.
Two independently estimated energies have uncertainties and . Estimate the statistical uncertainty in .
Solution
For independent statistical uncertainties, combine in quadrature:
- Why is a small residual not a full error estimate?
In particular, a normalized computed eigenvector has residual norm in the chosen energy units, but halving the grid spacing changes its eigenvalue by in the same units. Is it reasonable to report twelve correct decimal places for the continuum energy?
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 .
The eigenvalue example therefore does not justify twelve correct decimal places. The finite matrix equation is solved much more accurately than the grid approximates the continuum problem. Continue refining the grid, test the domain size, and estimate the remaining error from the observed convergence. One difference between grids is a useful warning, not yet a reliable error bound.