Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
svenhof
· 7y ago · 0 comments
Unfortunately, by averaging the averages you skew the results. Average of averages does not produce the same result as averaging the whole list.
Comments
[–]
sokoloff
7y ago
Average of equal size chunks' averages does. (mathematically)
[–]
svenhof
OP
7y ago
Ah my bad. Thanks for that correction
[–]
BubRoss
7y ago
It does if you weight the chunks correctly. Combine pairs of numbers and keep a weight of the remaining odd number. Either cut the weight in half of the odd number every time or use it in the average if an iteration has an even number of numbers.
[–]
svenhof
OP
7y ago
Thanks for that, didn't know.
[–]
umdiff
7y ago
\left( \sum_{i=1}^m x_i/m + \sum_{i=m+1}^{2m} x_i/m \right) / 2 = \sum_{i=1}^{2m} x_i /(2m)