Skip to content

graphing the normal distribution

2 messages · David White, Peter Dalgaard

#
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?

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

Many thanks in advance.

David

S. David White
sdavidwhite at bigfoot.com
Columbus, Ohio

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
David White <dwhite at ling.ohio-state.edu> writes:
Perhaps

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

etc.?
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.)