[][src]Function r_stats::normal_pdf

pub fn normal_pdf(x: f64, mu: f64, sigma: f64, give_log: bool) -> f64

Evaluate the probability density function of the normal distribution with mean mu and variance sigma2 at x.

The formula for this function is 1 σ e - 1 2 ( x - μ σ ) where μ is the mean, and σ2 is the variance.

If give_log is true, the natural logarithm of the value will be returned, with potentially higher numerical accuracy than calling .ln() on the result.