Approximation of weighted sum (sum of a product)

128 Views Asked by At

(This is my first question here, so I hope my question and phrasing is appropriate.)

Consider $X_i$ and $a_i$. They are real scalars, and they are independent random variables (picked from a finite distribution, for example a Gaussian distribution). When taking the ensemble average $\langle ... \rangle_{\text{ens. avg.}}$ over multiple sets of $[a_1, ..., a_N]$ and $[X_1, ..., X_N]$, is it true that the approximation below holds and that for an infinite number of averages in the ensemble the equation becomes exact?

$$\langle \sum_i^N(a_i\cdot X_i) \rangle_{\text{ens. avg.}} \stackrel{?}{\approx} \langle \text{mean}(a_i) \sum_i X_i \rangle_{\text{ens. avg.}} = \langle(\frac{\sum_i^N a_i}{N}) \cdot \sum_i X_i\rangle_{\text{ens. avg.}}$$

I arrived at this, considering the case where $a_i = a = const.$ for all $i$. In that case the equation $\sum_i^N(a\cdot X_i) = a\cdot X_1 + a\cdot X_2 + a\cdot X_3 + ... = a\cdot(X_1 + X_2 + X_3 + ...) = a \sum_i X_i$ holds due to distributivity of scalar multiplication. So it seems, that for finite distributions of $a_i$, it should be possible to take the mean value of $a_i$ out of the sum. I also ran some numerical tests, indicating that this should be possible. However, I was unable to find a good source for this approximation.

  • Can someone verify or refute that this is a valid approximation?
  • Does someone have a good reference (i.e. a book or a paper) to why the approximation holds/is wrong?

Thanks for the help!

P.S. The code I used to numerically check this (matlab). As an example I am using two normal distributions around 10 with Sigma = 1:

EnsembleAverages = 10000;
Error = zeros(1,EnsembleAverages);

for i = 1:EnsembleAverages
    N = 100;
    X = random('Normal',10,1,1,N);
    a = random('Normal',10,1,1,N);

    Real = sum(a.*X);
    Approx = mean(a)*sum(X);
    Error(i) = (Real-Approx)/Real;
end

MeanError = abs(mean(Error));

This yields a MeanError = 0.00015313 %. For larger ensemble averages the MeanError approaches zero.