TransWikia.com

Uncertainty of a Weighted Mean with Uncertain Weights

Mathematics Asked by Alex Howard on December 1, 2021

I have a program which creates a model of a non-isothermal system where masses are distributed throughout a number of pre-defined, discrete temperature bins. You can look at each bin individually to see how much mass is at a given temperature, or marginalise out the temperature axis to obtain an estimate of the total mass of the system. The program also returns the uncertainty associated with the mass in each temperature bin.

A useful metric is to obtain the "line-of-sight" temperature, which is achieved by creating a weighted mean of the temperature, where the mass in each band is used as the weighting factor. For a model with n bins, we have

$$
bar{T} = frac{sumlimits_{i=1}^n{m_i T_i}}{sumlimits_{i=1}^n{m_i}}.
$$

As you can see from the description, the temperature values, $T_i$, are pre-determined and exactly known. It’s the masses, $m_i$, that have an associated uncertainty ($sigma_i$).

Is there an analytic expression for the uncertainty/error/standard deviation (not totally sure on proper nomenclature) on $bar{T}$, or am I reduced to bootstrapping the answer?

One Answer

One way to proceed: the variance of a sum is the sum of the variances plus the sum of all the ordered covariances. So first you can get the variance of the denominator, then you can get the variance of the numerator, just by adding variances, which winds up with $sum_{i=1}^n sigma_i^2$ and $sum_{i=1}^n T_i^2 sigma_i^2$ respectively. Now you can linearize the quotient to attempt to estimate uncertainty, assuming that the error in the denominator is much smaller than its true value. So you end up with $frac{1}{D} Delta N + left ( frac{-N}{D^2} right ) Delta D$, where $N,D$ are the numerator and denominator. So now this is going to have variance

$$frac{1}{D^2} sigma_N^2 + frac{N^2}{D^4} sigma_D^2 - 2 mathrm{Cov} left ( frac{1}{D} Delta N,frac{N}{D^2} Delta D right ) \ =frac{1}{left ( sum_{i=1}^n m_i right )^2} sum_{i=1}^n T_i^2 sigma_i^2 + frac{left ( sum_{i=1}^n T_i m_i right )^2}{left ( sum_{i=1}^n m_i right )^4}sum_{i=1}^n sigma_i^2 - 2frac{sum_{i=1}^n T_i m_i}{left ( sum_{i=1}^n m_i right )^3} sum_{i=1}^n T_i sigma_i^2.$$

You might write this as

$$sum_{i=1}^n T_i^2 left ( frac{sigma_i}{M} right )^2 + overline{T}^2 sum_{i=1}^n left ( frac{sigma_i}{M} right )^2 - overline{T} sum_{i=1}^n T_i left ( frac{sigma_i}{M} right )^2$$

where $overline{T}=frac{sum_{i=1}^n m_i T_i}{sum_{i=1}^n m_i}$ and $M=sum_{i=1}^n m_i$. This way of writing it makes it more obvious that the units are right.

This is approximate, but only because of the assumptions that the errors in the masses are independent, and that the errors in the masses are much smaller than the masses themselves.

One nice feature of this approach that is easily checked is that if all the $T_i$ are the same then you get zero.

Answered by Ian on December 1, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP