[R] Help with normal distributions

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Mon Oct 4 12:04:49 CEST 2004


Hi

I have two questions, the first perhaps dumber than the second.

Firstly, I have a data set, and when I plot a histogram it looks like a
normal distribution.  So I want to overlay a bell-shaped normal
distribution on top of it, to demonstrate how similar it is to the
normal distribution.  I have read the help on dnorm(), rnorm(), pnorm()
etc but still can't figure out how to plot a normal distribution.  Any
code would be appreciated....

Secondly, and perhaps more difficult, is a second data set.  This, when
plotted as a histogram, has two clear peaks, perhaps even three, all of
which look as though they are normally distributed.  So the theory is
that my data set is actually made up of two, possibly three, underlying
sub-sets of data which are normally distributed, but with different
means and standard deviations.  So 1) how do I test for this? And 2) how
can I estimate the parameters (mean and SD) for the underlying
distributions?

Thanks in advance for your help

Mick




More information about the R-help mailing list