3

Let's say I have this set of numbers:

565 212 812 895 443 73 468 900 299 993 252 740 291 112
(average 503.9285714286) 

I'd like to split them apart into 3 sets of unequal size:

565 212 812
(529.6666666667) 

443 73 468 900 299 895
(513) 


993 252 740 291 112
(477.6)

Then take the average of each set and (somehow) get the average of the entire set from the 3 averages. Assume that the number of subsets is variable and the number of values in each set is also variable.

jcollum
  • 163

2 Answers2

7

If there are $n$ disjoint subsets $X_i$, $1\le i\le n$ of a finite set $X\subset\mathbb{R}$, then

$$\mathrm{Average(X)}=\sum\limits_{i=1}^n\left(\frac{|X_i|}{|X|}\right)\mathrm{Average}(X_i)$$

Effectively you just weight each average by how many elements were used to calculate it.

  • 1
    For those who aren't math inclined (e.g me), that's [number in subset]/[total numbers]*[average for subset] – jcollum Jul 11 '14 at 21:58
0

If you have the number of elements of each subset you are fine. Multiplying the average of the subset by the number of elements gives the total of the elements of that subset. Adding these totals gives the total of all the elements and adding the number of elements in each subset gives the number of elements. Then divide. For your data $$\frac {3 \cdot 529\frac 23 + 6\cdot 513 + 5\cdot 477\frac 35}{3+6+5}=\frac {1589+3078+2388}{14}=\frac{7055}{14}\approx 503.93$$

Ross Millikan
  • 374,822