Weighted arithmetic mean with samples having zero variance

271 Views Asked by At

I have three samples of measures of an observable. Each sample has a different number of elements. I want to know the expected value and the variance of the observable. I assume that the probability density function of the measures follows a normal distribution.

If I only know the mean value and the variance in each sample, I believe that the expected value and the variance of the observable should be obtained using the weighted arithmetic mean. But what happens when the variance of a sample is zero (which is more possible the smaller is the sample)?

Do I need to know the values of the measures in each sample in order to calculate expected value and variance of the observable?

Update:

I used the inverse of the sample variance as weight. Should I follow the answer below?

Can I get weighted sample variance from the individual variances?

1

There are 1 best solutions below

0
On

Suppose you have three samples of sizes $n_1 = 20, n_2 = 30, n_3 = 10$ and respective sample means $\bar X_1 = 35, \bar X_2 = 45, \bar X_3 = 60.$ Then the sample mean of all $n_a = n_1 + n_2 + n_3 = 20 + 30 + 10 = 60$ individuals is

$$\bar X_a = \frac{\sum_{1=1}^{60} X_i}{n_a} = \frac{2550}{60}=\frac{n_1 \bar X_1 + n_2 \bar X_2 + n_3 \bar X_3}{n_a} = \frac{n_1}{n_a}\bar X_1 = \frac{n_2}{n_a}\bar X_2 + \frac{n_3}{n_a}\bar X_3 =42.5.$$

In other words, you need to weight according to sample sizes. not inverse variances.

It is possible, but somewhat messier, to combine sample variances. That process is based on the last member of the general formula

$$S^2 = \frac{\sum_{i=1}^n (X_i - \bar X)^2}{n-1}= \frac{\sum_{i=1}^{n}X_i^2\,\; -\; n\bar X^2}{n - 1}.$$

You would need to back-solve for the term $Q_j =\sum X_i^2$ for each sample using its sample variance $S_j^2,$ mean $\bar X_j,$ and size $n_j,$ for $j = 1,2,3.$ Then get the combined $Q_a = \sum X_i^2 = Q_1+Q_2+Q_3$ for all three samples. Finally, along with $\bar X_a$ and $n_a,$ you could use the general formula again to get $S_a^2.$ (if you need to do this, please be careful. I recently assigned a similar problem to a class. Not liking my procedure, various ones of them found four different, and completely wrong, formulas on the Internet.)