# [R] graphing the normal distribution

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sun Jun 24 22:21:47 CEST 2001

```David White <dwhite at ling.ohio-state.edu> writes:

> Hello,
>
> I'd like to make some simple example graphs of the normal distribution,
> varying standard deviation, mean, and kurtosis across examples.
>
> I have been able to manipulate mean and sd using rnorm and hist:
> y_hist(rnorm(1000000, mean=100, sd=50), 50, plot=F)
> plot(y\$mid,y\$count,type="l")
>
> Two questions:
>
> 1) n=100000 seems like a lot of samples to approach a smooth
> curve. Is there a way to make the curve smooth, but computationally less
> demanding?

Perhaps

curve(dnorm(x,mean=0,sd=1),from=-3,to=3)

etc.?

> 2) What can I do to change the "peakiness" of the distribution?

Nothing within the Normal distribution family since it has constant
shape... the t-distributions have bigger kurtosis for given variance
as far as I recall, and uniform distributions have less. (Don't shoot
me if I got that wrong, it's not like I need to use it every day.)

--
O__  ---- Peter Dalgaard             Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics     2200 Cph. N
(*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```