public static function CDF($x, int $d₁, int $d₂) { Support::checkLimits(self::LIMITS, ['x' => $x, 'd₁' => $d₁, 'd₂' => $d₂]); $ᵈ¹ˣ/d₁x+d₂ = $d₁ * $x / ($d₁ * $x + $d₂); return Special::regularizedIncompleteBeta($ᵈ¹ˣ/d₁x+d₂, $d₁ / 2, $d₂ / 2); }
/** * The probabilty associated with the regression F Statistic * * F probability = F distribution CDF(F,d₁,d₂) * * where: * F = F statistic * d₁ = degrees of freedom 1 * d₂ = degrees of freedom 2 * * ν = degrees of freedom * * @return number */ public function FProbability() { $F = $this->FStatistic(); $n = $this->n; // Degrees of freedom // Need to make sure the 1 in $d₁ should not be $this->fit_parameters; $ν = $this->ν; $d₁ = $n - $ν - 1; $d₂ = $ν; return F::CDF($F, $d₁, $d₂); }