Hi.
I need to show that the average density of the standard regular distribution is as below in the 0.5 intervals from –4 to 4, but these numbers are not available, so I have a problem.
Which part should I correct to get that number?
The number I need to prove : 0.000 0.002 0.010 0.033 0.088 0.184 0.300 0.383 0.383 0.300 0.184 0.088 0.033 0.010 0.002 0.000
The code that I made
x_dnorm <- seq (-4, 4, 0.5)
y_dnorm <- dnorm(x_dnorm)
round(y_dnorm,3)
Then I get 0.000 0.001 0.004 0.018 0.054 0.130 0.242 0.352 0.399 0.352 0.242 0.130
0.054 0.018 0.004 0.001 0.000
R is correct, it gives you the density at each of the 17 values of x you requested.
You are trying to prove something about 16 values of y (at presumably 16 values of x ?)
or you mean by average density that you want to calculate an average of the densities between the intervals, rather that the actual densities at the break points.