[R] plot - central limit theorem
Yihui Xie
xieyihui at gmail.com
Thu Oct 16 06:51:25 CEST 2008
Thanks, Roger, your demo is interesting. I'm thinking about improving it later.
I've also made a demo for the CLT in my package 'animation', in which
there's also normality testing for the sample means, because I don't
think "bell-shaped" alone means normality - so I performed the
Shapiro-Wilk test and plotted the P-values under the demo. See the
function clt.ani() in the package 'animation', or
http://animation.yihui.name/prob:central_limit_theorem
You can use any function to denote the population (specify the
argument 'FUN') in clt.ani().
Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin University of China, Beijing, 100872, China
On Thu, Oct 16, 2008 at 4:22 AM, roger koenker <rkoenker at uiuc.edu> wrote:
> Galton's 19th century mechanical version of this is the quincunx. I have a
> (very primitive) version of this for R at:
>
> http://www.econ.uiuc.edu/~roger/courses/476/routines/quincunx.R
>
>
> url: www.econ.uiuc.edu/~roger Roger Koenker
> email rkoenker at uiuc.edu Department of Economics
> vox: 217-333-4558 University of Illinois
> fax: 217-244-6678 Champaign, IL 61820
>
>
>
>> Jörg Groß wrote:
>>>
>>> Hi,
>>>
>>>
>>> Is there a way to simulate a population with R and pull out m samples,
>>> each with n values
>>> for calculating m means?
>>>
>>> I need that kind of data to plot a graphic, demonstrating the central
>>> limit theorem
>>> and I don't know how to begin.
>>>
>>> So, perhaps someone can give me some tips and hints how to start and
>>> which functions to use.
>>>
>>>
>>>
>>> thanks for any help,
>>> joerg
>>>
>
More information about the R-help
mailing list