MathPHP\Statistics\Regression\Methods\LeastSquares::PI PHP Méthode

PI() public méthode

Where: t is the critical t for the p value sy is the estimated standard deviation of y q is the number of replications n is the number of data points x̄ is the average of the x values SSx = ∑(x - x̄)² If $p = .05, then we can say we are 95% confidence that the future averages of $q trials at $x will be within an interval of evaluate($x) ± PI($x, .05, $q).
public PI ( number $x, number $p, integer $q = 1 ) : number
$x number
$p number 0 < p < 1 The P value to use
$q integer Number of trials
Résultat number
    public function PI($x, $p, $q = 1)
    {
        $V = $this->regressionVariance($x) + 1 / $q;
        $σ² = $this->meanSquareResidual();
        // The t-value
        $t = StudentT::inverse2Tails($p, $this->ν);
        return $t * sqrt($σ² * $V);
    }