PHP Class MathPHP\Probability\Distribution\Continuous\Normal

Inheritance: extends Continuous
Show file Open project: markrogoyski/math-php Class Usage Examples

Public Methods

Method Description
CDF ( number $x, number , number ) : float Cumulative distribution function Probability of being below X.
PDF ( number $x, number , number ) : float Probability density function
mean ( number , number ) : number Mean of the distribution

Method Details

CDF() public static method

Area under the normal distribution from -∞ to X. _ _ 1 | / x - μ \ | cdf(x) = - | 1 + erf| ----- | | 2 |_ \ σ√2 / _|
public static CDF ( number $x, number , number ) : float
$x number upper bound
number mean
number standard deviation
return float cdf(x) below

PDF() public static method

1 f(x|μ,σ) = ----- ℯ^−⟮x − μ⟯²∕2σ² σ√⟮2π⟯
public static PDF ( number $x, number , number ) : float
$x number random variable
number mean
number standard deviation
return float f(x|μ,σ)

mean() public static method

μ = μ
public static mean ( number , number ) : number
number mean
number standard deviation
return number