MathPHP\Functions\Special::γ PHP Метод

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

γ - Convenience method for lower incomplete gamma function https://en.wikipedia.org/wiki/Incomplete_gamma_function#Lower_incomplete_Gamma_function
public static γ ( $s, $x ) : number
$s
$x
Результат number
    public static function γ($s, $x)
    {
        return self::lowerIncompleteGamma($s, $x);
    }

Usage Example

Пример #1
0
 /**
  * Cumulative distribution function
  *
  * Cumulative t value up to a point, left tail.
  *
  *          / k   x  \
  *       γ |  - , -  |
  *          \ 2   2 /
  * CDF = -------------
  *            / k \
  *         Γ |  -  |
  *            \ 2 /
  *
  * @param number $x Chi-square critical value (CV) > 0
  * @param int    $k degrees of freedom > 0
  *
  * @return number cumulative probability
  */
 public static function CDF($x, int $k)
 {
     Support::checkLimits(self::LIMITS, ['x' => $x, 'k' => $k]);
     // Numerator
     $γ⟮k/2、x/2⟯ = Special::γ($k / 2, $x / 2);
     // Demoninator
     $Γ⟮k/2⟯ = Special::Γ($k / 2);
     return $γ⟮k/2、x/2⟯ / $Γ⟮k/2⟯;
 }