MathPHP\Probability\Distribution\Continuous\Normal::CDF PHP Метод

CDF() публичный статический Метод

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
Результат float cdf(x) below
    public static function CDF($x, $μ, $σ) : float
    {
        Support::checkLimits(self::LIMITS, ['x' => $x, 'μ' => $μ, 'σ' => $σ]);
        return 1 / 2 * (1 + Special::erf(($x - $μ) / ($σ * sqrt(2))));
    }

Usage Example

Пример #1
0
 /**
  * Cumulative distribution function
  * P value for a z score.
  *
  * @param number $z random variable
  *
  * @return float f(z|μ,σ)
  */
 public static function CDF($z)
 {
     Support::checkLimits(self::LIMITS, ['z' => $z]);
     return Normal::CDF($z, self::μ, self::σ);
 }