Calculators
Home › Calculators › Regression CI

Regression Confidence Interval Calculator

Slope interval, mean response interval, prediction interval: all three, side by side.

Intervals on the fitted line

Paired data, a confidence level, and an x0 to predict at.

Quick answer: Slope 5.70 (SE 0.322): 95% CI 4.677 to 6.723. At x0 = 5.5 the mean response CI is 67.441 to 71.659; the prediction interval is wider, 65.688 to 73.412.

Three intervals live on one regression line

A fitted line carries three distinct uncertainties, and confusing them is the classic regression reporting error. The slope interval asks how steep the true line might be: b ± t* × SE(b), with SE(b) = s ÷ √Sxx. The mean response interval asks where the average Y at a given x0 sits: ŷ ± t* × s√(1/n + (x0 − x̄)²/Sxx). The prediction interval asks where one future observation will land, and adds a whole extra 1 under the root, because the future point brings its own noise on top of the line's uncertainty.

Worked example

Hours studied against marks (2, 50), (3, 55), (4, 60), (5, 68), (6, 72): slope 5.70, SE 0.322, t* on 3 degrees of freedom 3.182. Slope interval: 5.70 ± 1.023 = 4.677 to 6.723 marks per hour. At x0 = 5.5, ŷ = 69.55; the mean response interval is 67.441 to 71.659, while the prediction interval stretches to 65.688 to 73.412. Same centre, three different claims: read which interval a report used before trusting its width.

The leverage penalty

Both response intervals widen as x0 moves away from x̄, the data's centre of mass, through the (x0 − x̄)²/Sxx term. The fitted line pivots around its centre, so it is pinned best exactly there and swings most at the edges. Extrapolation beyond the data range inherits the widest intervals and the least trustworthy line shape: the interval formula warns you even when the point estimate refuses to.

Watch out

Quoting the mean response interval as where individual outcomes fall. Individuals scatter around the mean by the residual SD, which the prediction interval includes and the mean interval omits. Using the wrong one understates forecast uncertainty, in the example by nearly a factor of two in width.

Frequently asked questions

What does the slope confidence interval mean?

The range of slopes compatible with the data at the chosen level. If it excludes zero, the linear relationship is significant at the matching alpha, with the interval showing how much slope uncertainty remains.

Why is the prediction interval always wider?

It accounts for two uncertainties: where the line is, and where a single noisy observation falls around the line. The mean response interval only prices the first.

Where is the mean response interval narrowest?

At x-bar, the mean of the predictor, where the leverage term is zero. It flares toward the edges of the data like a bowtie.