My textbook on descriptive statistics says that when we have a data set of m members, the mean is calculated like this:
x-bar = 1/m (Σfixi) where sigma sums values from 1 to k (we have k groups in our frequency table and xi is the representative of each group)
I get the idea, but it immediately asks the reader to prove that given a data set of m members with the mean value of x-bar and another data set of n members with the mean value of y-bar, the combined mean is calculable by the following formula: [m(x-bar)+n(y-bar)]/m+n
I tried to prove this by breaking it down to the definition but I simply can't get to the final formula.
We know
$$\bar{x} = \frac{1}{m}\sum_{i=1}^m x_i \text{ and } \bar{y} = \frac{1}{n}\sum_{j=1}^n y_j.$$
So
$$\sum_{i=1}^m x_i = m\bar{x} \text{ and } \sum_{j=1}^n y_j = n\bar{y}.$$
Then, calculating the mean of all $x_i, y_j$ directly:
$$\mu = \frac{x_1 + x_2 + ... + x_m + y_1 + y_2 + ... + y_n}{m+n} = \frac{1}{m+n}\left(\sum_{i=1}^m x_i + \sum_{j=1}^n y_j\right) = \frac{m\bar{x} + n\bar{y}}{m+n}.$$