Skip to content

Question about biasing in sd()???

1 message · Liaw, Andy

#
Where in the help file of sd() do you see the claim that it produces
unbiased estimate?  Try the following:

sample.sizes <- 3:30
reps <- 5000
set.seed(1)
mean.vars <- sapply(sample.sizes, 
                    function(n) mean(sd(matrix(rnorm(n*reps), nc=reps))^2))
plot(sample.sizes,mean.vars)

I.e., the sample variance, or sd()^2, is unbiased for the true variance.  If
U is an unbiased estimator of a parameter theta, f(U) is _not_ necessarily
unbiased for f(theta).  It would be if f() is linear.

Andy