MathPHP\Statistics\Regression\Methods\LeastSquares::CI PHP Метод

CI() публичный Метод

Where: t is the critical t for the p value sy is the estimated standard deviation of y 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 the actual regression line will be within an interval of evaluate($x) ± CI($x, .05).
public CI ( number $x, $p ) : number
$x number
Результат number
    public function CI($x, $p)
    {
        $V = $this->regressionVariance($x);
        $σ² = $this->meanSquareResidual();
        // The t-value
        $t = StudentT::inverse2Tails($p, $this->ν);
        return $t * sqrt($σ² * $V);
    }