**From:** Adaikalavan Ramasamy (*gisar@nus.edu.sg*)

**Date:** Wed 19 Mar 2003 - 16:14:34 EST

**Next message:**Ott Toomet: "Re: [R] How to free memory"**Previous message:**Murray Jorgensen: "Re: [R] r-help using random generating"**Maybe in reply to:**Cheryl H.: "[R] r-help using random generating"**Next in thread:**Wiener, Matthew: "RE: [R] r-help using random generating"

Message-id: <024D6AEFCB92CB47BA1085751D184BB80105F22F@MBXSRV03.stf.nus.edu.sg>

Yes it looks like a really good student exercise into the sampling

properties of a distribution.

What you need to do is initialize vectors beforehand that will contain

the mean and variance values. Then simply use a for() loop that

generates 5 random numbers. Use the mean(), var() and store the values

into the vector. Then a simple plot() should suffice.

Since it is a simple problem, I will leave you to it.

-----Original Message-----

From: Murray Jorgensen [mailto:maj@stats.waikato.ac.nz]

Sent: Wednesday, March 19, 2003 12:39 PM

Cc: R-help@stat.math.ethz.ch

Subject: Re: [R] r-help using random generating

Student Exercise?!

Cheryl H. wrote:

*> To whom it may concern:
*

*> Given that my sample size is n, my mean is 100, and my sd is 10, I
*

*> need
*

*> to use a random number generator (which I believe is the function
*

*> rnorm(5,100,10)), but I need to repeat it a large number of times, and
*

*> then plot the sampling distributions of the sample means, sd's, and
*

*> variances of those generated sets. I'm having a real hard time trying
*

to

*> figure out how to do this easily. Please help if possible! Thanks,
*

*> Cheryl
*

*>
*

*> ______________________________________________
*

*> R-help@stat.math.ethz.ch mailing list
*

*> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
*

*>
*

-- Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html Department of Statistics, University of Waikato, Hamilton, New Zealand Email: maj@waikato.ac.nz Fax 7 838 4155 Phone +64 7 838 4773 wk +64 7 849 6486 home Mobile 021 1395 862______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

**Next message:**Ott Toomet: "Re: [R] How to free memory"**Previous message:**Murray Jorgensen: "Re: [R] r-help using random generating"**Maybe in reply to:**Cheryl H.: "[R] r-help using random generating"**Next in thread:**Wiener, Matthew: "RE: [R] r-help using random generating"

*
This archive was generated by hypermail 2.1.3
: Tue 01 Jul 2003 - 09:11:25 EST
*