I have two sets of averaged data I am working with, which account for a score and the average amount of users that achieved this.
For example:
Average Score $4$,
Total Number of participants (which the average is derived from): $835$
Average Score $3.5$,
Total Number of participants: $4,579$
Can I calculate a weighted mean from these two averages and participant counts, or would that be inaccurate?
Best Answer
I assume you want to calculate the average score of all participants, which is (given your data) equal to $$\frac{835}{835+4579} \cdot 4 + \frac{4579}{835+4579}\cdot 3.5$$
so the answer is yes.
In general, if you have $n$ numbers $\{a_1,\dots, a_n\}$ with an average of $a$, and $m$ numbers $\{b_1,\dots, b_m\}$ with an average of $b$, you know that
$$\frac{a_1+\cdots + a_n}{n}=a\\ \frac{b_1+\cdots + b_m}{m}=b$$
or, in other words, $$a_1+\cdots + a_n = n\cdot a\\b_1+\cdots + b_m = m\cdot b$$
and you are looking for the number $\frac{a_1+\cdots + a_n+ b_1 + \cdots + b_m}{m+n}$
Now this simplifies to $$\frac{a_1+\cdots + a_n+ b_1 + \cdots + b_m}{m+n} = \frac{n\cdot a + m\cdot b}{m+n}=\frac{n}{m+n}a + \frac{m}{m+n} b$$
which is a weighted average of $a$ (the first average) and $b$ (the second average). The weights are determined by the size of each group.