samedi 23 janvier 2016

mean and sd in R (normal distribution)

In an exercise for beginner in R, the asked question is to generate a random sample of size 100 with the mean = 10 and sd = 3, so for this I used the rnorm(n=100,mean=10,sd=3). But, when I try to generate the mean and the sd of the generated sample I obtain a mean = 9.998 and sd = 3.478. My question is: Why there is a difference between the two mean and the two sd (a silly question I know) ?

Have a nice day




Aucun commentaire:

Enregistrer un commentaire