Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-24 Thread Thomas Lumley
On Mon, 23 Mar 2009, pfc_ivan wrote: I tried using the for (i..) to make 1000 differents sets of numbers, but then I dont know how to get the mean value of all of them... because I dont even think 1000 different sets of numbers were made, because when i print it it always shows me the same valu

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread G. Jay Kerns
Dear Ivan, On 3/23/09, pfc_ivan wrote: > > Hello guys, I am stuck here: > > How do I make 1000 samples of n = 10 observations from an Exponential > distribution and then compute the mean for all those 1000 samples? > The R Commander will do this. See the menus Distributions -> Continuous -> Exp

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread j verzani
Greg Snow imail.org> writes: > > There is also the clt.examp function in the TeachingDemos package. > An interactive demo can also be found at http://www.math.csi.cuny.edu/gWidgetsWWW/ex-clt.html>http://www.math.csi.cuny.edu/gWidgetsWWW/ex-clt.html. __

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread Greg Snow
t.org] On Behalf Of Charles Annis, P.E. > Sent: Monday, March 23, 2009 1:14 PM > To: 'pfc_ivan'; r-help@r-project.org > Subject: Re: [R] How to set up a function for "Central Limit Theorem" > > Ivan: > > While you're figuring out how to execute the CL

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread Charles Annis, P.E.
http://www.StatisticalEngineering.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of pfc_ivan Sent: Monday, March 23, 2009 1:31 PM To: r-help@r-project.org Subject: [R] How to set up a function for "Central Limit Theorem" Hello guys,

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread Peter Dalgaard
pfc_ivan wrote: I tried using the for (i..) to make 1000 differents sets of numbers, but then I dont know how to get the mean value of all of them... because I dont even think 1000 different sets of numbers were made, because when i print it it always shows me the same values, basically I dont kn

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread baptiste auguie
(a <- replicate(5,rnorm(10))) colMeans(a) should get you started. HTH, baptiste On 23 Mar 2009, at 18:29, pfc_ivan wrote: I tried using the for (i..) to make 1000 differents sets of numbers, but then I dont know how to get the mean value of all of them... because I dont even think 1000

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread pfc_ivan
I tried using the for (i..) to make 1000 differents sets of numbers, but then I dont know how to get the mean value of all of them... because I dont even think 1000 different sets of numbers were made, because when i print it it always shows me the same values, basically I dont know how to replica

Re: [R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread stephen sefick
homework? On Mon, Mar 23, 2009 at 1:30 PM, pfc_ivan wrote: > > Hello guys, I am stuck here: > > How do I make 1000 samples of n = 10 observations from an Exponential > distribution and then compute the mean for all those 1000 samples? > > Basically I need to prove the Central Limit theorem, which

[R] How to set up a function for "Central Limit Theorem"

2009-03-23 Thread pfc_ivan
Hello guys, I am stuck here: How do I make 1000 samples of n = 10 observations from an Exponential distribution and then compute the mean for all those 1000 samples? Basically I need to prove the Central Limit theorem, which states: http://www.nabble.com/file/p22664113/d175f06cbf200bd52a2c27a2