Full_Name: Kert Viele Version: 1.3 OS: Windows ME and 2000 Submission from: (NULL) (65.6.218.65) Hello! Thanks for all your efforts on R. They are appreciated! I was simulating the central limit theorem in class, but found that repeated use of mean(rbinom(100000,500,0.4)) resulted in values less than 200 (the expected mean), for example> mean(rbinom(100000,500,0.4))[1] 199.0294> mean(rbinom(100000,500,0.4))[1] 199.1077> mean(rbinom(100000,500,0.4))[1] 199.0668 and so on. I did this 1000 times and found the results to be distributed approximately N(199.0787,s=0.036). The standard deviation is pretty accurate, but the mean is significantly off from 200. Thanks for any help! (including telling me my mistakes!) - Kert Viele Assistant Professor of Statistics University of Kentucky -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
viele@ms.uky.edu writes:> I was simulating the central limit theorem in class, > but found that repeated use of > > mean(rbinom(100000,500,0.4)) > > resulted in values less than 200 (the expected mean), for example > > > mean(rbinom(100000,500,0.4)) > [1] 199.0294 > > mean(rbinom(100000,500,0.4)) > [1] 199.1077 > > mean(rbinom(100000,500,0.4)) > [1] 199.0668 > and so on. > > I did this 1000 times and found the results to be distributed > approximately N(199.0787,s=0.036). The standard deviation > is pretty accurate, but the mean is significantly off from 200.I see the same thing on Linux. Looks like it needs checking against the original CACM algorithm. -- 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-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._