[Rd] [R] computing the variance

Thomas Lumley tlumley at u.washington.edu
Mon Dec 5 22:18:06 CET 2005


>
> Using the biased variance just because it is the MLE (if that is the
> argument) seems confused to me. However, there's another point:
>
>> var(sample(1:3, 100000, replace=TRUE))
> [1] 0.6680556
>
> i.e. if we are considering x as the entire population, then the
> variance when sampling from it is indeed 1/N*E(X-EX)^2, which is why
> some presentations distinguish between the "population" and "sample"
> variances. We might want to support this distinction somehow.
>

We might also consider that the purpose of computing the variance is often 
to take the square root, and that using 1/(n-1) as the divisor does not 
give any particular optimality as an estimator of the standard deviation.

 	-thomas



More information about the R-devel mailing list