2

I was trying to plot a probability density function curve in R for normal distribution. I have used the following codes but am not getting the normal curve shape in the graph. Anyone can help? This is the code.

#generating normal variables using R
x=rnorm(10,mean=0,sd=0.5)
x
y <- dnorm(rnorm(, mean = 0, sd = 0.5)
plot(x,y, type = "l")
Maurits Evers
  • 49,617
  • 4
  • 47
  • 68

0 Answers0