/** * 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⟯; }