Probability Density Function

Truncated normal distribution probability density function (PDF).

A normally distributed random variable X conditional on a < X < b is called a truncated normal distribution. The probability density function (PDF) for a truncated normal random variable is

f left-parenthesis x semicolon mu comma sigma comma a comma b right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column StartStartFraction StartFraction 1 Over sigma EndFraction phi left-parenthesis StartFraction x minus mu Over sigma EndFraction right-parenthesis OverOver normal upper Phi left-parenthesis StartFraction b minus mu Over sigma EndFraction right-parenthesis minus normal upper Phi left-parenthesis StartFraction a minus mu Over sigma EndFraction right-parenthesis EndEndFraction 2nd Column if a less-than x less-than b 2nd Row 1st Column 0 2nd Column otherwise EndLayout

where Phi and phi denote the cumulative distribution function and density function of the normal distribution, respectively, mu is the location and sigma > 0 is the scale parameter of the distribution. a and b are the minimum and maximum support.

Usage

var pdf = require( '@stdlib/math/base/dists/truncated-normal/pdf' );

pdf( x, a, b, mu, sigma )

pdf.factory( a, b, mu, sigma )

Examples