normalDensity: The probability density function of the normal distribution

View source: R/RVCompare.R

normalDensityR Documentation

The probability density function of the normal distribution

Description

Returns the density function of the normal distribution with mean mu and standard deviation sigma. The returned function is a single parameter function that returns the probability of the normal distribution in that point. It is just a convinient wrapper of dnorm from the package 'stat' with some parameter checks.

Usage

normalDensity(mu, sigma)

Arguments

mu

the mean of the normal distribution.

sigma

the standard deviation of the normal distribution.

Value

Returns a callable function with a single parameter that describes the probability of the normal distribution in that point.

See Also

Other probability density distributions: uniformDensity()

Examples

dist <- normalDensity(0,1)
dist(0)

RVCompare documentation built on Aug. 21, 2023, 5:13 p.m.