![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^6: standard deviation accuracy questionby polettix (Vicar) |
on Jul 24, 2005 at 13:45 UTC ( [id://477561]=note: print w/replies, xml ) | Need Help?? |
This is no explaination, but it may help. When you concentrate on a sample instead of the entire population, you're doing two estimates: the mean and the variance (square of standard deviation). The issue is that when you estimate the variance, you're subtracting the estimated mean from each item in the sample: you're using an estimation inside another estimation.
Which leads us to the concept of degree of freedom. The sample has N degrees of freedom, i.e. N possibility to be modified: you can have different values for each of the N items. Thus, when you estimate the mean value, you divide by N. When you estimate the variance, you're using the mean value evaluated over the sample, as said. Given the fact that you're implicitly trusting that mean value to be correct (otherwise you'd not use it to evaluate the variance!), you're stealing a degree of freedom. I mean: if you fix the value of the mean, you can move only (N-1) items, and the N-th will be bound to have a value that leads to the given mean value. Thus, a variance evaluated in this way only takes into account the variations brought by (N-1) items, not N. Hope that this intuitively helps :) Flavio
In Section
Seekers of Perl Wisdom
|
|