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]

[math]\displaystyle{ \hat{y} = \frac{\sum_i y_i / \sigma_i^2}{\sum_i 1/\sigma_i^2} . }[/math]

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

[math]\displaystyle{ Var(\hat{y}) = \frac{1}{\sum_i 1/\sigma_i^2} . }[/math]

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 [math]\displaystyle{ \mu }[/math]. A careful experimenter makes multiple measurements, which we denote with [math]\displaystyle{ n }[/math] random variables [math]\displaystyle{ X_1, X_2 , ... , X_n }[/math]. 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 [math]\displaystyle{ E[X_i] = \mu }[/math] [math]\displaystyle{ \forall i }[/math]. The scatter in the measurement is then characterised by the variance of the random variables [math]\displaystyle{ Var(X_i) := \sigma_i^2 }[/math], and if the measurements are performed under identical scenarios, then all the [math]\displaystyle{ \sigma_i }[/math] are the same, which we shall refer to by [math]\displaystyle{ \sigma }[/math]. Given the [math]\displaystyle{ n }[/math] measurements, a typical estimator for [math]\displaystyle{ \mu }[/math], denoted as [math]\displaystyle{ \hat{\mu} }[/math], is given by the simple average [math]\displaystyle{ \overline{X} = \frac{1}{n} \sum_i X_i }[/math]. Note that this empirical average is also a random variable, whose expectation value [math]\displaystyle{ E[\overline{X}] }[/math] is [math]\displaystyle{ \mu }[/math] but also has a scatter. If the individual measurements are uncorrelated, the square of the error in the estimate is given by [math]\displaystyle{ Var(\overline{X}) = \frac{1}{n^2}\sum_i \sigma_i^2 = \left(\frac{\sigma}{\sqrt{n}}\right)^2 }[/math]. Hence, if all the [math]\displaystyle{ \sigma_i }[/math] are equal, then the error in the estimate decreases with increase in [math]\displaystyle{ n }[/math] as [math]\displaystyle{ 1/\sqrt{n} }[/math], thus making more observations preferred.

Instead of [math]\displaystyle{ n }[/math] repeated measurements with one instrument, if the experimenter makes [math]\displaystyle{ n }[/math] of the same quantity with [math]\displaystyle{ n }[/math] different instruments with varying quality of measurements, then there is no reason to expect the different [math]\displaystyle{ \sigma_i }[/math] 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 [math]\displaystyle{ g }[/math] from a simple pendulum, from analysing a projectile motion etc. The simple average is no longer an optimal estimator, since the error in [math]\displaystyle{ \overline{X} }[/math] 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 [math]\displaystyle{ \sigma_1^2, \sigma_2^2, ... , \sigma_n^2 }[/math], an optimal estimator to measure [math]\displaystyle{ \mu }[/math] would be a weighted mean of the measurements [math]\displaystyle{ \hat{\mu} = \frac{\sum_i w_i X_i}{\sum_i w_i} }[/math], for the particular choice of the weights [math]\displaystyle{ w_i = 1/\sigma_i^2 }[/math]. The variance of the estimator [math]\displaystyle{ Var(\hat{\mu}) = \frac{ \sum_i w_i^2 \sigma_i^2 }{ \left( \sum_i w_i \right)^2 } }[/math], which for the optimal choice of the weights become [math]\displaystyle{ Var(\hat{\mu}_\text{opt}) = \left( \sum_{i} \sigma_i^{-2} \right)^{-1} . }[/math]

Note that since [math]\displaystyle{ Var(\hat{\mu}_\text{opt}) \lt \min_j \sigma_j^2 }[/math], the estimator has a scatter smaller than the scatter in any individual measurement. Furthermore, the scatter in [math]\displaystyle{ \hat{\mu}_\text{opt} }[/math] decreases with adding more measurements, however noisier those measurements may be.

Derivation

Consider a generic weighted sum [math]\displaystyle{ Y= \sum_i w_i X_i }[/math], where the weights [math]\displaystyle{ w_i }[/math] are normalised such that [math]\displaystyle{ \sum_i w_i = 1 }[/math]. If the [math]\displaystyle{ X_i }[/math] are all independent, the variance of [math]\displaystyle{ Y }[/math] is given by

[math]\displaystyle{ Var(Y) = \sum_i w_i^2 \sigma_i^2. }[/math]

For optimality, we wish to minimise [math]\displaystyle{ Var(Y) }[/math] which can be done by equating the gradient with respect to the weights of [math]\displaystyle{ Var(Y) }[/math] to zero, while maintaining the constraint that [math]\displaystyle{ \sum_i w_i = 1 }[/math]. Using a Lagrange multiplier [math]\displaystyle{ w_0 }[/math] to enforce the constraint, we express the variance:

[math]\displaystyle{ Var(Y) = \sum_i w_i^2 \sigma_i^2 - w_0(\sum_i w_i - 1). }[/math]

For [math]\displaystyle{ k\gt 0 }[/math],

[math]\displaystyle{ 0 = \frac{\partial}{\partial w_k} Var(Y) = 2w_k\sigma_k^2 - w_0, }[/math]

which implies that:

[math]\displaystyle{ w_k = \frac{w_0/2}{\sigma_k^2}. }[/math]

The main takeaway here is that [math]\displaystyle{ w_k \propto 1/\sigma_k^2 }[/math]. Since [math]\displaystyle{ \sum_i w_i = 1 }[/math],

[math]\displaystyle{ \frac{2}{w_0} = \sum_i \frac{1}{\sigma_i^2} := \frac{1}{\sigma_0^2}. }[/math]

The individual normalised weights are:

[math]\displaystyle{ w_k = \frac{1}{\sigma_k^2}\left( \sum_i \frac{1}{\sigma_i^2} \right)^{-1}. }[/math]

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:

[math]\displaystyle{ Var(Y) = \sum_i \frac{\sigma_0^4}{\sigma_i^4}\sigma_i^2 = \sigma_0^4\sum_i \frac{1}{\sigma_i^2} = \sigma_0^4\frac{1}{\sigma_0^2} = \sigma_0^2 = \frac{1}{\sum_i 1/\sigma_i^2}. }[/math]

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 [math]\displaystyle{ y_i }[/math] and a flat prior is a normal distribution with the inverse-variance weighted average as a mean and variance [math]\displaystyle{ Var(Y) }[/math]

Multivariate case

For multivariate distributions an equivalent argument leads to an optimal weighting based on the covariance matrices [math]\displaystyle{ \mathbf{C}_i }[/math] of the individual vector-valued estimates [math]\displaystyle{ \mathbf{x}_i }[/math]:

[math]\displaystyle{ \mathbf{\hat{x}} = \left(\sum_i \mathbf{C}_i^{-1}\right)^{-1}\sum_i \mathbf{C}_i^{-1} \mathbf{x}_i }[/math]
[math]\displaystyle{ \mathbf{\hat{C}} = \left(\sum_i \mathbf{C}_i^{-1}\right)^{-1} }[/math]

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

See also

References