Foundations: Algorithms, Approximation & Error

a priori vs a posteriori error estimates

/ ah-pree-OR-ee vs ah-pos-tair-ee-OR-ee /

These are the two complementary ways to say how big a numerical error is. An a priori error estimate is worked out beforehand, from theory alone, before (or without) running the computation: it bounds the error in terms of known quantities like the step size h, the problem's smoothness, or a condition number — for example, 'the trapezoidal rule's error is at most (b-a) h^2 max|f''| / 12'. An a posteriori error estimate is computed afterward, from the actual computed solution and its leftover residual, telling you how good this particular answer turned out to be.

The trade-off is theory versus practicality. An a priori bound is reassuring and reveals the order of the method (it shows the error is O(h^2), so you know halving h helps fourfold), but it is often loose and may need quantities you do not have, like max|f''| or the true solution. An a posteriori estimate is sharp and uses real, available data: the residual r = b - A x~ of a computed solution, or the difference between solutions on two grids, or a fine-grid estimate of the local error. It is the basis of adaptive methods — adaptive quadrature, adaptive time-stepping, adaptive mesh refinement — where the algorithm measures its own error as it goes and refines only where the a posteriori estimate is large.

Both matter, and good practice uses them together. A priori analysis chooses the method and explains why it should converge; a posteriori estimation certifies the answer you actually got and drives where to spend more effort. A caution worth remembering: an a posteriori residual being small does not by itself guarantee a small forward error — on an ill-conditioned problem a tiny residual can hide a large error in the solution, because residual and error are linked through the condition number.

Adaptive quadrature compares an integral estimate on a panel against a finer estimate; the gap is an a posteriori error estimate. Where it exceeds tolerance, the panel is subdivided — error measured from the actual computation, not predicted in advance.

A priori = bounded in advance from theory; a posteriori = measured afterward from the computed result and its residual.

A small a posteriori residual does not guarantee a small forward error. On an ill-conditioned problem the residual can be tiny while the solution error is large, because the two are linked through the condition number.

Also called
a-priori error bounda-posteriori error bound事前與事後誤差估計先驗誤差界後驗誤差界