Inverse-variance weighting

From HandWiki

In statistics, inverse-variance weighting is a method of aggregating two or more random variables to minimize the variance of the weighted average. Each random variable is weighted in inverse proportion to its variance, i.e., proportional to its precision. Given a sequence of independent observations yi with variances σi2, the inverse-variance weighted average is given by[1]

y^=iyi/σi2i1/σi2.

The inverse-variance weighted average has the least variance among all weighted averages, which can be calculated as

Var(y^)=1i1/σi2.

If the variances of the measurements are all equal, then the inverse-variance weighted average becomes the simple average.

Inverse-variance weighting is typically used in statistical meta-analysis or sensor fusion to combine the results from independent measurements.

Context

Suppose an experimenter wishes to measure the value of a quantity, say the acceleration due to gravity of Earth, whose true value happens to be μ. A careful experimenter makes multiple measurements, which we denote with n random variables X1,X2,...,Xn. If they are all noisy but unbiased, i.e., the measuring device does not systematically overestimate or underestimate the true value and the errors are scattered symmetrically, then the expectation value E[Xi]=μ i. The scatter in the measurement is then characterised by the variance of the random variables Var(Xi):=σi2, and if the measurements are performed under identical scenarios, then all the σi are the same, which we shall refer to by σ. Given the n measurements, a typical estimator for μ, denoted as μ^, is given by the simple average X=1niXi. Note that this empirical average is also a random variable, whose expectation value E[X] is μ but also has a scatter. If the individual measurements are uncorrelated, the square of the error in the estimate is given by Var(X)=1n2iσi2=(σn)2. Hence, if all the σi are equal, then the error in the estimate decreases with increase in n as 1/n, thus making more observations preferred.

Instead of n repeated measurements with one instrument, if the experimenter makes n of the same quantity with n different instruments with varying quality of measurements, then there is no reason to expect the different σi to be the same. Some instruments could be noisier than others. In the example of measuring the acceleration due to gravity, the different "instruments" could be measuring g from a simple pendulum, from analysing a projectile motion etc. The simple average is no longer an optimal estimator, since the error in X might actually exceed the error in the least noisy measurement if different measurements have very different errors. Instead of discarding the noisy measurements that increase the final error, the experimenter can combine all the measurements with appropriate weights so as to give more importance to the least noisy measurements and vice versa. Given the knowledge of σ12,σ22,...,σn2, an optimal estimator to measure μ would be a weighted mean of the measurements μ^=iwiXiiwi, for the particular choice of the weights wi=1/σi2. The variance of the estimator Var(μ^)=iwi2σi2(iwi)2, which for the optimal choice of the weights become Var(μ^opt)=(iσi2)1.

Note that since Var(μ^opt)<minjσj2, the estimator has a scatter smaller than the scatter in any individual measurement. Furthermore, the scatter in μ^opt decreases with adding more measurements, however noisier those measurements may be.

Derivation

Consider a generic weighted sum Y=iwiXi, where the weights wi are normalised such that iwi=1. If the Xi are all independent, the variance of Y is given by

Var(Y)=iwi2σi2.

For optimality, we wish to minimise Var(Y) which can be done by equating the gradient with respect to the weights of Var(Y) to zero, while maintaining the constraint that iwi=1. Using a Lagrange multiplier w0 to enforce the constraint, we express the variance:

Var(Y)=iwi2σi2w0(iwi1).

For k>0,

0=wkVar(Y)=2wkσk2w0,

which implies that:

wk=w0/2σk2.

The main takeaway here is that wk1/σk2. Since iwi=1,

2w0=i1σi2:=1σ02.

The individual normalised weights are:

wk=1σk2(i1σi2)1.

It is easy to see that this extremum solution corresponds to the minimum from the second partial derivative test by noting that the variance is a quadratic function of the weights. Thus, the minimum variance of the estimator is then given by:

Var(Y)=iσ04σi4σi2=σ04i1σi2=σ041σ02=σ02=1i1/σi2.

Normal distributions

For normally distributed random variables inverse-variance weighted averages can also be derived as the maximum likelihood estimate for the true value. Furthermore, from a Bayesian perspective the posterior distribution for the true value given normally distributed observations yi and a flat prior is a normal distribution with the inverse-variance weighted average as a mean and variance Var(Y)

Multivariate case

For multivariate distributions an equivalent argument leads to an optimal weighting based on the covariance matrices 𝐂i of the individual vector-valued estimates 𝐱i:

x^=(i𝐂i1)1i𝐂i1𝐱i
C^=(i𝐂i1)1

For multivariate distributions the term "precision-weighted" average is more commonly used.

See also

References