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

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

d₁ d₂ \ I | --, -- | ᵈ¹ˣ \ 2 2 / ------ ᵈ¹ˣ⁺ᵈ² Where I is the regularized incomplete beta function.
public static CDF ( number $x, integer $d₁, integer $d₂ ) : number
$x number percentile ≥ 0
$d₁ integer degree of freedom v1 > 0
$d₂ integer degree of freedom v2 > 0
Результат number
    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);
    }

Usage Example

Пример #1
0
 /**
  * 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₂);
 }