Confidence Interval Calculator for a Regression Prediction


Instructions: Use this confidence interval calculator for the mean response of a regression prediction. Please input the data for the independent variable (X)(X) and the dependent variable (YY), the confidence level and the X-value for the prediction, in the form below:

Independent variable XX sample data (comma or space separated) =
Dependent variable YY sample data (comma or space separated) =
Confidence Level (Ex: 0.95, 95, 99, 99%) =
X value for prediction X0X_0 =
Independent variable Name (optional) =
Dependent variable Name (optional) =

Confidence Interval for the Mean Response

The Confidence Interval for the Mean Response corresponds to the calculated confidence interval for the mean predicted response μYX0\mu_{Y|X_0} for a given value X=X0X = X_0. First, we need to know the mean squared error:

σ^2=SSEn2\hat{\sigma}^2 = \displaystyle \frac{SSE}{n-2}

Then, the 1α)×1001-\alpha)\times 100 % confidence interval for the mean response μYX0\mu_{Y|X_0} is

CI=(μ^YX0tα/2;n2σ^2(1n+(X0Xˉ)2SSXX),μ^YX0+tα/2;n2σ^2(1n+(X0Xˉ)2SSXX))CI = \displaystyle \left( \hat\mu_{Y|X_0} - t_{\alpha/2; n-2} \sqrt{ \hat{\sigma}^2 \left(\frac{1}{n} + \frac{\left(X_0 - \bar X\right)^2}{SS_{XX}}\right) }, \hat\mu_{Y|X_0} + t_{\alpha/2; n-2} \sqrt{ \hat{\sigma}^2 \left(\frac{1}{n} + \frac{\left(X_0 - \bar X\right)^2}{SS_{XX}}\right) } \right)

If you are interested rather in a confidence interval for the prediction itself, please use instead this prediction interval calculator for regression predictions .

log in to your account

Don't have a membership account?
REGISTER

reset password

Back to
log in

sign up

Back to
log in