How to draw a standard normal distribution in R
distribution, draw, plot, r
Solution
I am pretty sure this is a duplicate. Anyway, have a look at the following piece of code
x <- seq(5, 15, length=1000)
y <- dnorm(x, mean=10, sd=3)
plot(x, y, type="l", lwd=1)
I'm sure you can work the rest out yourself, for the title you might want to look for something called `main=` and `y-axis` labels are also up to you.
If you want to see more of the tails of the distribution, why don't you try playing with the `seq(5, 15, )` section? Finally, if you want to know more about what `dnorm` is doing I suggest you look here
Problem
Possible Duplicate: Making a standard normal distribution in R Using R, draw a standard normal distribution. Label the mean and 3 standard deviations above and below the (10) mean. Include an informative title and labels on the x and y axes. This is a homework problem. I'm not sure how to get going with the code. How should I get started?