# Calculating the variance of a weight-average when the weights also have a variance

Assume there is a series of random variables $$X_1$$, $$X_2$$, ..., $$X_N$$ representing a series of values to be weight-averaged, and a corresponding series of random variables $$W_1$$, $$W_2$$, ..., $$W_N$$ representing the weights themselves.

Let us define the random variable $$Z$$ to be the result of the weight-average, that is:

$$Z = \frac{\sum_i X_i W_i}{\sum_i W_i}$$

If we assume that all the random variables are independent, and we know that expected value and variance of all the random variables (other than $$Z$$), is it possible to calculate the expected value and variance of $$Z$$ analytically?

My intuition tells me that $$E[Z] = \frac{\sum_i E[X_i] E[W_i]}{\sum_i E[W_i]}$$, and I have run experiments that suggest this is the case, but I'm unable to prove it.

Is there an analytic solution to calculating $$VAR[Z]$$ and $$E[Z]$$?

• Is there any restriction on the distribution of the random variables? Are they all normally distributed for example? I'm not sure this will affect the answer but it might be helpful to know. Jun 13, 2019 at 4:08
• It's safe to assume that all the variables are normally distributed about their means. Jun 13, 2019 at 5:03

If your two random variables $$W_i$$ and $$X_i$$ are independent, then from the law of total expectation the expectation of the product of two random variables is the product of their expectations, eg $$E[X_i W_i] = E[X_i] E[W_i]$$.
$$\text{Var}(Z_i) = E[Z_i^2] - E[Z_i]^2$$