PHP Class MathPHP\Probability\Distribution\Continuous\Weibull

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

Public Methods

Method Description
CDF ( number $x, number $k, number ) : float Weibull distribution - cumulative distribution function From 0 to x (lower CDF) https://en.wikipedia.org/wiki/Weibull_distribution
PDF ( number $x, number $k, number ) : float Weibull distribution - probability density function
inverse ( number $p, $params ) : number Inverse CDF (Quantile function)
mean ( number $k, number ) : number Mean of the distribution

Method Details

CDF() public static method

f(x) = 1 - ℯ⁻⁽x/λ⁾ for x ≥ 0 f(x) = 0 for x < 0
public static CDF ( number $x, number $k, number ) : float
$x number percentile (value to evaluate)
$k number shape parameter
number scale parameter
return float

PDF() public static method

https://en.wikipedia.org/wiki/Weibull_distribution k /x\ ᵏ⁻¹ ᵏ f(x) = - | - | ℯ⁻⁽x/λ⁾ for x ≥ 0 λ \λ/ f(x) = 0 for x < 0
public static PDF ( number $x, number $k, number ) : float
$x number percentile (value to evaluate)
$k number shape parameter
number scale parameter
return float

inverse() public static method

Q(p;k,λ) = λ(-ln(1 - p))¹/ᵏ
public static inverse ( number $p, $params ) : number
$p number
return number

mean() public static method

μ = λΓ(1 + 1/k)
public static mean ( number $k, number ) : number
$k number shape parameter
number scale parameter
return number