Re: [R] Question about biasing in sd()???

From: Peter Dalgaard <p.dalgaard_at_biostat.ku.dk>
Date: Thu 10 Mar 2005 - 01:04:51 EST

"Roy Werkman" <roy.werkman@asml.com> writes:

> Hi,
>
> Can anyone help me with the following. I have been using R for Monte
> Carlo simulations and got some results I couldn't explain. Therefor I
> performed following short test:
>
> --------------
> mean.sds <- NULL
> sample.sizes <- 3:30
>
> for(N in sample.sizes){
> dum <- NULL
> for(I in 1:5000){
> x <- rnorm(N,0,1)
> dum <- c(dum,sd(x))
> }
> mean.sds<- c(mean.sds,mean(dum))
> }
> plot(sample.sizes,mean.sds)
> --------------
>
> My question is why don't I get 1 as a result from my sd() for small
> sample sizes? According to the help, sd() is unbiased, which anyway
> would not explain the small offset... Is it something in rnorm()?

According to *what* help? In ?sd, it isn't there and it wouldn't be true if it was there. Please don't spread rumors like that.

The _variance_, var(x) is unbiased, and sd(x) is the square root of that. It is not possible for a concave function of an unbiased estimator to be unbiased (unless you're talking median unbiasedness which is clearly not the case). This is first-year math-stat theory.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 10 01:32:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:42 EST