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

From: Roy Werkman <roy.werkman_at_asml.com>
Date: Thu 10 Mar 2005 - 00:30:16 EST


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))


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()?  


The information contained in this communication and any atta...{{dropped}}

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 10 00:37:11 2005

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