Prediction Interval Calculator Formula
Understand the math behind the prediction interval calculator. Each variable explained with a worked example.
Formulas Used
Prediction Margin
margin = t_value * se_reg * sqrt(1 + 1/n)Lower Prediction Limit
lower = y_hat - t_value * se_reg * sqrt(1 + 1/n)Upper Prediction Limit
upper = y_hat + t_value * se_reg * sqrt(1 + 1/n)Variables
| Variable | Description | Default |
|---|---|---|
y_hat | Predicted Value (y-hat) | 50 |
se_reg | Standard Error of Regression (Se) | 5 |
n | Sample Size (n) | 30 |
t_value | t-Critical Value (e.g., 2.048 for 95%, df=28) | 2.048 |
How It Works
Prediction Interval for New Observation
A prediction interval estimates the range where a single new observation is likely to fall, accounting for both estimation uncertainty and individual variability.
Simplified Formula (at x-bar)
PI = y-hat ± t × Se × sqrt(1 + 1/n)
Prediction intervals are always wider than confidence intervals for the mean because they must account for individual observation scatter. The full formula also includes a term for distance from x-bar.
Worked Example
Predicted value 50, Se = 5, n = 30, 95% confidence (t = 2.048).
y_hat = 50se_reg = 5n = 30t_value = 2.048
- 01sqrt(1 + 1/30) = sqrt(1.0333) = 1.0165
- 02Margin = 2.048 × 5 × 1.0165 = 10.41
- 03PI: 50 ± 10.41 = (39.59, 60.41)
Ready to run the numbers?
Open Prediction Interval Calculator