I have two sets of data - one $X$ measuring the unavailability at a site, the other $Y$ measuring the number of antennas at each site. I want to calculate the overall average unavailability as the product of $XY$, i.e. $$\frac{\sum_{i=0}^n X_iY_i}{n}$$
However, I would like to calculate the total unavailability using the average value of X and the average value of Y, e.g.
$$\frac{\sum_{i=0}^n X_i}{n}\cdot \frac{\sum_{i=0}^n Y_i}{n}$$
Clearly the above formula is wrong, but is there a correct way of doing this using the product of averages.
To give a specific example $X = (20, 30, 10, 5)$, $Y = (5, 6, 100, 4)$.
The actual sum is $100 + 180 + 1000 + 20$ and the average is $1300/4 = 325$.
If I try to use the averages of $X$ and $Y$ and then calculate the product I get $$\frac{20+30+10+5}{4} \cdot \frac{5+6+100+4}{4} = 16.25 \cdot 28.75 = 467.18.$$
If there is not a formula that can create the same number is there a way to express the margin of error introduced by trying to calculate the average in this way?
Thanks
Let $m_x=\frac{1}{n} \sum_i X_i,s_x=\left ( \frac{1}{n} \sum_i (X_i-m_x)^2 \right )^{1/2}$ and similar for $m_y,s_y$. Then $\frac{1}{n} \sum_i (X_i-m_x)(Y_i-m_y)=\frac{1}{n} \sum_i X_i Y_i - m_x m_y$. This quantity is between $-s_x s_y$ and $s_x s_y$ by the Cauchy-Schwarz inequality; moreover it can be anything in this range. Thus $\frac{1}{n} \sum_i X_i Y_i$ is between $-s_x s_y + m_x m_y$ and $s_x s_y+m_x m_y$, and it could be anything in between.