Missing negative from the normal
A normal function isn’t so normal
The normal density function is:
It doesn’t make sense to calculate the probability for a single value in a continuous probability function, it is by definition zero, but you can calculate relative likelihoods (heights). dnorm
simply gives the value of the function for a given x, not the area under the curve for that x (which is basically nothing for a single value). To find the density (height) for a single x value on the normal distribution, use dnorm()
in the following way (here each x value is treated as separate and vectorized over),