openintro-statistics icon indicating copy to clipboard operation
openintro-statistics copied to clipboard

incorrect explanation of variance increase for exercise 2.27

Open goretkin opened this issue 6 years ago • 0 comments

The exercise here: https://github.com/OpenIntroStat/openintro-statistics/blob/master/ch_summarizing_data/TeX/review_exercises.tex#L5

has a solution here: https://github.com/OpenIntroStat/openintro-statistics/blob/70b58fc14b3218796d30df8bd0882c4654f775cc/extraTeX/eoceSolutions/eoceSolutions.tex#L381

But the justification is incorrect.

The update equation for the unbiased sample variance, supposing n-1 old measurements, and given the mean and sample variance on n-1 measurements, and a new nth measurement is:

sampvar_{new}&=\frac{n-2}{n-1}sampvar_{old}+\frac{1}{n}\left(x_{n}-\bar{x}_{old}\right)^{2}

(you can see this is identical to the second equation at https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm)

So the critical value of x_n so that the sample variance stays the same is

\frac{n}{n-1}sampvar&=\left(x_{n}-\bar{x}_{old}\right)^{2}

therefore, the there is a factor of 25/24 missing in the justification. I would submit a pull request, but I am not sure if the textbook covers these equations.

goretkin avatar Oct 03 '19 16:10 goretkin