[R] distributional properties of rnorm

Ko-Kang@xtra.co.nz Ko-Kang at xtra.co.nz
Thu Aug 24 03:43:32 CEST 2000

Really?  I tried it five times in R vand I get the following  in R v1.1.0 and get the following means:
[1] 505.5867
[1] 507.1512
[1] 505.6406
[1] 503.9704
[1] 506.2367
which is within my expectation.  The standard deviation is also very close to what one would expect (almost always in the range of [14, 16].

Don't know why you cannot generate the expected mean and standard deviation, maybe you are using an older version?
>From: Marc Feldesman <feldesmanm at pdx.edu>
>Date: Wed, 23 Aug 2000 18:05:10 -0700
>To: r-help at stat.math.ethz.ch
>Subject: [R] distributional properties of rnorm
>I've been trying to generate a series of random normal distributions using 
>the rnorm function.  After I generated the first set:
>set1<-rnorm(150, 505.5, 15.2)
>I checked the mean and standard deviation of set1.  I was surprised to find 
>the mean at 502.37 (rounded) and the standard deviation at 13.3 (again, 
>rounded).  While I know that it is unrealistic to expect the distribution 
>of the simulated data to match the given mean and standard deviation, I 
>expected the results to be closer.  I then generated 20 more samples.  In 
>no case did the mean exceed 505.5 (the highest value was 504.8).  The 
>standard deviation ranged from a low of 12.4 to a high of 18.
>Am I being unrealistic in expecting the results to approximate the given 
>values of the mean and standard deviation?
>Dr. Marc R. Feldesman
>Professor and Chair
>Anthropology Department
>Portland State University
>Portland, Oregon 97207
>email: feldesmanm at pdx.edu
><a href="http://odin.pdx.edu/~h1mf">http://odin.pdx.edu/~h1mf</a>
>Powered by Inspirochoerus
>"Indecision may or may not be my problem"
>r-help mailing list -- Read <a href="http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html">http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html</a>
>Send "info", "help", or "[un]subscribe"
>(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list