Some random stats facts
Bessel's Correction, adding in quadrature, SEM
Besselβs Correction
Sample variance () is said to be a βbiased estimatorβ compared to population variance (). We correct this bias by dividing the sample variance by .
The bias can be seen using computer simulations, but these articles purport to show algebraic proofs:
Sum of is times mean:
Square of mean is not the same as mean of squares, .
Simple counterexample is shown using .
Variance is mean of square minus square of mean:
- : population mean
- : sample mean
Adding in quadrature
Errors add in quadrature because, for independent errors, itβs the variances that add, not the standard deviations.
The math
Say your result is , and and each have a random error with standard deviations and . The variance of a sum is
If the errors are independent, the covariance is zero, so
That square root of a sum of squares is βadding in quadrature.β Nothing here assumes Gaussian errors. It only needs independence and finite variances.
The intuition
Adding the errors directly, , assumes the worst case every time: both errors at full size and in the same direction. Independent errors donβt conspire like that. Sometimes reads high while reads low, and they partly cancel. On average the combined error is bigger than either one alone but smaller than their plain sum.
A random walk shows the same thing. After independent steps of size , youβre typically about from where you started, not . This is also why averaging measurements shrinks the error by .
The geometric picture
You can treat each independent error source as a vector, with its length equal to its standard deviation. Independence plays the role of being perpendicular: covariance acts like a dot product, and independent errors have zero covariance. The total error is the length of the sum of perpendicular vectors, which is just the Pythagorean theorem. Thatβs where the name comes from.
The general rule
For any function with small, independent errors, a first-order (linear) approximation gives
Each error is scaled by how sensitive is to that input, and then the results add in quadrature. For products and quotients, this works out to adding the relative errors in quadrature.
When not to use it
- Correlated or systematic errors. If two inputs share an error, like the same miscalibrated instrument, the covariance term doesnβt vanish.1 When theyβre fully correlated, , so linear addition is correct. Linear addition is also a safe upper bound when you donβt know how the errors are correlated.
- Large errors or strongly nonlinear functions. The derivative formula is only a linear approximation, so it can be off when errors are big compared to how curved is.
In short, quadrature is right when the errors are independent, because independent errors partly cancel.
Where the variance of a sum comes from
It comes straight from the definition of variance plus the algebra of .
Start from the definition
The variance of a random variable is the average squared distance from its mean:
Apply it to
The mean of a sum is the sum of the means: . That follows from linearity of expectation. So
To keep it short, write each deviation as and . Then the quantity inside the square is just :
Expand the square
Expectation is linear, so take it term by term:
Identify each piece
- . This is the definition of the covariance .
Substituting those in gives
Why the covariance vanishes for independent errors
Covariance measures whether and tend to be off from their means in the same direction. If theyβre independent, the expectation of the product factors:
because each deviation averages to zero by construction.2 The cross term drops out and youβre left with .
So the covariance term is just the cross term from squaring a sum. Thatβs also why the geometric picture works. This formula has the same form as the law of cosines,
with covariance playing the role of the dot product. Independent errors make that term zero, the way perpendicular vectors do, and you get Pythagoras.
- 1Write each measurement as its true value plus an independent error plus a shared error : and , where , , are independent with mean zero. The deviations are and , so . The first three terms factor to , but the last is , which canβt factor because is not independent of itself. So : both inputs are pushed off in the same direction by the same amount, and that canβt cancel. In the extreme where is the only error, and , which is exactly .
- 2We defined , which is just shifted so that its mean sits at zero. By linearity of expectation, , and likewise . Note that independence of and carries over to and , since subtracting a constant doesnβt change how two variables depend on each other.