Skip to content

Central limit theorem

5 messages · maggy yan, Tóth Zoltán, Jeff Newmiller +2 more

#
Hi Maggy,

Sorry, I cannot help you. But as I am pretty new to R, I am interested
in this assigment. May I ask you to post it?

z
On Sun, Aug 14, 2011 at 3:16 PM, maggy yan <kiotoqq at googlemail.com> wrote:
#
Hi:

This definitely sounds like a homework problem but it's very easy to
do in R if you think about it the right way.

(1) Generate a matrix of random numbers. This is easier than it looks,
since you can generate a long vector of random numbers and then
reshape it into a matrix. Typically, a row corresponds to a single
random sample, so that should tell you how many columns you need; the
number of samples tells you the number of rows. Type ?rpois at the R
prompt to see its help page. If necessary, also read the result of
?matrix.
(2) See the help page of the function rowMeans(). Run it on your
matrix; it will return a vector.
(3) Plot the histogram. See ?hist
(4) Read the Posting Guide, which is linked at the bottom of this
e-mail, and pay attention to the policy on homework questions. (This
should be point (0), but I'm being pragmatic.)

Dennis
On Sun, Aug 14, 2011 at 6:16 AM, maggy yan <kiotoqq at googlemail.com> wrote:
#
Perhaps, we should endeavor not to provide any kind of help for
such homework problems, especially to untraceable e-mail addresses
(such as gmail, hotmail, yahoo and the like)? After all, conceptualizing
a solution before writing R code is very much a part of the learning
process, no?

Ranjan

On Sun, 14 Aug 2011 17:57:38 -0500 Dennis Murphy <djmuser at gmail.com>
wrote: