Noise sensitivity of a quadrature rule (source code)

= Noise sensitivity of a quadrature rule
{title2=$|\Delta Q|\leq\delta\sum_i|w_i|$}

If the observed samples are $y_i=f(x_i)+\varepsilon_i$, the resulting <quadrature rule> changes by $\Delta Q=\sum_iw_i\varepsilon_i$. Bounded sample perturbations $|\varepsilon_i|\leq\delta$ therefore satisfy
$$
|\Delta Q|\leq\delta\sum_i|w_i|.
$$
For ordinary <numerical integration> with nonnegative <quadrature weights> exact on <constant functions>, the bound is $(b-a)\delta$, independent of panel refinement. A common bias $\varepsilon_i=\delta$ attains it: the <quadrature error> due to the <function> approximation may vanish while this sample error persists. Interpolating a fixed data set onto a finer grid likewise does not create new observations or remove its uncertainty.

With new samples whose errors are <independent random variables> of zero <expectation> and common <variance> $\sigma^2$, a different model gives
$$
\operatorname{Var}(\Delta Q)=\sigma^2\sum_iw_i^2.
$$
For equal panels this is $\sigma^2(b-a)^2/n$ for the <composite midpoint quadrature rule> and $\sigma^2h^2(n-1/2)$ for the <composite trapezoidal rule>. These <variance> reductions require the stated independence and unbiasedness assumptions; a common bias or correlated sample errors need not shrink. The two displayed perturbation formulas follow directly from the <triangle inequality> and the <variance additivity for independent random variables>, respectively.