Difference between Means is the Mean of the Differences

78 Views Asked by At

Suppose you have a sequence $a_{1}, \dots, a_{n}$ and another sequence $b_{1}, \dots, b_{m}$, where $n$ and $m$ may differ. I want to know whether the difference between the arithmetic means of these sequences equals the arithmetic means of the differences between the terms, in the following sense:

$${1 \over n} \sum \limits_{i=1}^n a_{i} - {1 \over m} \sum \limits_{j=1}^m b_{i} = {1\over n} \sum \limits_{i=1}^n {1 \over m} \sum \limits_{j=1}^m a_i - b_j$$

I'm not sure that I expressed that right. But here is an example of what I have in mind. Suppose you have two lists of numbers:

$$A = (1, 2, 3)$$ $$B = (1, 3)$$

The difference between the means is $${1+2+3 \over 3} - {1+3 \over 2}=0.$$ What I had in mind as the mean of the differences was something like $${{(1-1)+(1-3) \over 2}+{(2-1)+(2-3) \over 2} +{(3-1)+(3-3) \over 2} \over 3} = 0$$

I'm guessing that these two things are always equal. But I'm wondering how to prove it. (I assume the answer is really simple.) Thanks!

1

There are 1 best solutions below

1
On BEST ANSWER

It'is always the case as: $${1\over n} \sum \limits_{i=1}^n {1 \over m} \sum \limits_{j=1}^m (a_i - b_j)={1\over n} \sum \limits_{i=1}^n {1 \over m} (\sum \limits_{j=1}^m a_i - \sum \limits_{j=1}^m b_j)={1\over n} \sum \limits_{i=1}^n {1 \over m} (m a_i - \sum \limits_{j=1}^m b_j)={1\over n} \sum \limits_{i=1}^n (a_i - {1 \over m}\sum \limits_{j=1}^m b_j)={1 \over n} \sum \limits_{i=1}^n a_{i} - {1 \over m} \sum \limits_{j=1}^m b_{i}$$