Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There is the fact that the variance of the entire population is defined [0] as

  sum i=1..N (x_i - mu)^2 / N
while, given a sample of n iid [1] samples from a distribution, the best [2] estimate of the distribution variance is

  sum i=1..n (x_i - a )^2 / (n-1)
Note that we replaced the mean mu by the sample average a, [3] and divided by (n-1) instead of N.

[0] with the mean mu := sum x_i / N being the actual mean of the population

[1] independent and identically distributed

[2] best in the sense of being unbiased. It's a tedious, but not very difficult calculation to confirm that the expectation of that second expression (with n-1) is the population variance.

[3] with the sample average a := sum x_i / n being an estimate of the population mean



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: