Linear Regression Prediction Interval
Produce an immediate interval around your regression forecast. Supply the predicted value, residual standard error, sample size, and leverage terms to bracket where the next observation should land.
Examples
- Sales forecast with ŷ = 56, residual SE 2.1, n = 36, x₀ = 15, x̄ = 11, sₓ = 3.4 at 95 % ⇒ Prediction interval: 51.59 to 60.41
- Temperature regression with ŷ = 22.6, SE 1.8, n = 60, x₀ = 30, x̄ = 27, sₓ = 5.1 at 90 % ⇒ Prediction interval: 19.56 to 25.64
FAQ
Do I need slope and intercept as inputs?
No. Enter the point estimate ŷ produced by your model at the desired x₀ and the calculator handles the rest.
What if my x-values are already standardised?
Leave the mean at 0 and the standard deviation at 1 so leverage is computed against the scaled features.
How accurate is the t-critical approximation?
For df ≥ 5 the approximation is within a few thousandths of tables, which is sufficient for applied forecasting.
Additional Information
- The leverage term ( (x₀ − x̄)² / ((n−1)·sₓ²) ) widens the interval when you extrapolate beyond the centre of your data.
- Student’s t is approximated from the normal quantile with higher-order corrections, keeping accuracy for typical sample sizes.
- Prediction intervals cover individual future observations, so they are wider than confidence intervals for the mean response.