PHP Class MathPHP\Probability\Distribution\Continuous\Continuous

Inheritance: extends MathPHP\Probability\Distribution\Distribution
Show file Open project: markrogoyski/math-php

Public Methods

Method Description
above ( number $x, $params ) : number CDF above - Probability of being above x to ∞ Area under a continuous distribution, that lies above a specified point.
between ( number $x₁, number $x₂, $params ) : number CDF between - probability of being between two points, x₁ and x₂ The area under a continuous distribution, that lies between two specified points.
inverse ( number $target, $params ) The Inverse CDF of the distribution
outside ( number $x₁, number $x₂, $params ) : number CDF outside - Probability of being below x₁ and above x₂.
rand ( $params ) Produce a random number with a particular distribution

Method Details

above() public static method

P(above) = 1 - CDF(x)
public static above ( number $x, $params ) : number
$x number
$params Remaining parameters for each distribution
return number

between() public static method

P(between) = CDF($x₂) - CDF($x₁)
public static between ( number $x₁, number $x₂, $params ) : number
$x₁ number Lower bound
$x₂ number Upper bound
$params Remaining parameters for each distribution
return number

inverse() public static method

For example, if the calling class CDF definition is CDF($x, $d1, $d2) than the inverse is called as inverse($target, $d1, $d2)
public static inverse ( number $target, $params )
$target number The area for which we are trying to find the $x
$params List of all the parameters that are needed for the CDF of the calling class. This list must be absent the $x parameter.

outside() public static method

The area under a continuous distribution, that lies above and below two points. P(outside) = 1 - P(between) = 1 - (CDF($x₂) - CDF($x₁))
public static outside ( number $x₁, number $x₂, $params ) : number
$x₁ number Lower bound
$x₂ number Upper bound
$params Remaining parameters for each distribution
return number

rand() public static method

Produce a random number with a particular distribution
public static rand ( $params )