PHP Class MathPHP\Probability\Distribution\Continuous\Laplace

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

Public Methods

Method Description
CDF ( number $x, number , number $b ) : float Laplace distribution - cumulative distribution function From -∞ to x (lower CDF) https://en.wikipedia.org/wiki/Laplace_distribution
PDF ( number $x, number , number $b ) : float Laplace distribution - probability density function
mean ( number , number $b ) : μ Mean of the distribution

Method Details

CDF() public static method

1 / x - μ \ F(x) = - exp| ------ | if x < μ 2 \ b / 1 / x - μ \ F(x) = 1 - - exp| - ------ | if x ≥ μ 2 \ b /
public static CDF ( number $x, number , number $b ) : float
$x number
number location parameter
$b number scale parameter (diversity) b > 0
return float

PDF() public static method

https://en.wikipedia.org/wiki/Laplace_distribution 1 / |x - μ| \ f(x|μ,b) = -- exp| - ------- | 2b \ b /
public static PDF ( number $x, number , number $b ) : float
$x number
number location parameter
$b number scale parameter (diversity) b > 0
return float

mean() public static method

μ = μ
public static mean ( number , number $b ) : μ
number location parameter
$b number scale parameter (diversity) b > 0
return μ