[R] dnorm() lead to a probability >1

Douglas Bates bates at stat.wisc.edu
Fri Oct 31 20:41:26 CET 2003


"Marc Belisle" <marc.m.belisle at usherbrooke.ca> writes:

> One of my student spotted something I can't explain: a probability >1 vs a
> normal probability density function.
> 
> > dnorm(x=1, mean=1, sd=0.4)
> [1] 0.9973557
> 
> > dnorm(x=1, mean=1, sd=0.39)
> [1] 1.022929
> 
> > dnorm(x=1, mean=1, sd=0.3)
> [1] 1.329808
> 
> > dnorm(x=1, mean=1, sd=0.1)
> [1] 3.989423
> 
> > dnorm(x=1, mean=1, sd=0.01)
> [1] 39.89423
> 
> > dnorm(x=1, mean=1, sd=0.001)
> [1] 398.9423
> 
> Is there a bug with the algorithm?

No.  dnorm does not return probabilities - it returns a probability
density which can be greater than 1.




More information about the R-help mailing list