Upload points or type them in easily here. Choose confidence level and prediction x value. See the interval instantly, then download clean summaries below.
| x | y | Context |
|---|---|---|
| 10 | 15 | Early baseline observation |
| 15 | 22 | Mid-range measurement |
| 20 | 30 | High-range measurement |
| 22 | 29 | Potential mild deviation |
For n observations, the fitted line is: ŷ = b0 + b1·x, where b1 = Sxy/Sxx and b0 = ȳ − b1·x̄.
Residual standard error: s = √(SSE/(n−2)), where SSE = Σ(yi − ŷi)².
Mean response confidence interval at x0: ŷ0 ± t·s·√(1/n + (x0−x̄)²/Sxx).
Prediction interval for a new observation at x0: ŷ0 ± t·s·√(1 + 1/n + (x0−x̄)²/Sxx), with t = t(1−α/2, n−2).
Point forecasts hide uncertainty. A prediction interval estimates the range where a single future observation may land, given the fitted line and the residual spread. In operations, a 95% interval can guide safety stock, service levels, and exception thresholds when demand or sensor readings vary.
Interval width depends on sample size n, leverage at x0, and residual standard error s. With larger n, the 1/n term shrinks and intervals tighten. When x0 is far from x̄, the leverage term (x0−x̄)²/Sxx grows, widening both confidence and prediction intervals.
Because the calculator uses df = n−2, very small datasets produce larger t critical values, which further widens intervals. As a quick reference, when df is near 8–10, t at 95% is roughly around 2.2–2.3, while at df above 30 it is close to 2.0.
The mean response interval targets E[Y|x0]. It is useful for estimating the expected outcome at a feature value, such as average revenue at a given marketing spend. It will always be narrower than the prediction interval because it excludes one‑off noise around the mean.
The prediction interval adds a “+1” inside the square root, accounting for irreducible variability in individual outcomes. For example, two products with the same x can yield different y due to randomness, measurement error, or omitted variables. Use the PI when planning for a single future case.
R² summarizes how much variance is explained by the line, but it does not guarantee reliable intervals. Check residuals: large residual magnitudes or patterns across x suggest nonlinearity or heteroskedasticity. If s is inflated by outliers, the PI becomes overly wide and less actionable.
Start with clean x,y pairs and ensure x spans the region of interest. Choose a confidence level aligned with risk appetite (0.90 for exploratory, 0.95 for standard reporting, 0.99 for conservative policies). Export the results table to CSV for audits and to PDF for stakeholders. Document x0, interval bounds, and assumptions to make reruns consistent across teams today.
A confidence interval estimates the mean response at x0. A prediction interval estimates where one new future observation may fall at x0, so it is wider due to added observation noise.
Points far from x̄ have higher leverage. The term (x0−x̄)²/Sxx increases the standard error, widening both the mean confidence interval and the prediction interval.
The calculator requires at least three (x,y) pairs. More points improve stability, reduce uncertainty through the 1/n term, and increase degrees of freedom, which typically lowers the critical t value.
This version implements simple linear regression with one predictor. For multiple regression, you need matrix-based formulas, leverage from (X'X)⁻¹, and an updated degrees-of-freedom definition.
Review residuals for outliers and patterns, and confirm the relationship looks roughly linear. Large non-constant variance or strong curvature can make intervals misleading unless the model is improved.
Small differences can come from rounding, data parsing, and the internal t critical approximation used here. With moderate-to-large df, the approximation is typically very close to standard library values.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.