Line Regression Equation Calculator

For multiple regression enter the rows one after another: x1, x2 for observation 1, then x1, x2 for observation 2, and so on.
Only used by multiple regression; the X list is read row by row in this many columns.
One weight per observation for weighted least squares. Leave blank for equal weights.
For multiple regression, list one value per predictor in "Predictor values to predict at".
Multiple regression only: one value per predictor.
Fitted equation
y = 2.2 + 0.6x
Linear Regression Calculator
Slope (b)
0.6
Intercept (a)
2.2
Number of observations
5
Correlation r
0.774597
R squared
0.6
Adjusted R squared
0.466667
Standard error of the estimate
0.894427
Standard error of the slope
0.282843
Standard error of the intercept
0.938083
t statistic for the slope
2.12132
p value for the slope
0.124027
Lower confidence limit for the slope
-0.300132
Upper confidence limit for the slope
1.500132
F statistic for the model
4.5
p value for the model
0.124027
Residual degrees of freedom
3
Total sum of squares (SST)
6
Regression sum of squares (SSR)
3.6
Residual sum of squares (SSE)
2.4
Sxx
10
Syy
6
Sxy
6
Mean of X
3
Mean of Y
4
Predicted y
5.8
Minimum mean-square error of the estimator
0.48
Worked out from NIST/SEMATECH e-Handbook of Statistical Methods, 4.1 Introduction to Process Modeling and 1.3.5.11 Linear Regression and 3 other sources.
x = 6 lies outside the fitted range [1, 5], so the prediction extrapolates beyond the data.

How this is worked out

8 steps
  1. n = 5 observations.
  2. Sxx = 10, Sxy = 6, Syy = 6.
  3. Slope b = Sxy / Sxx = 6 / 10 = 0.6
  4. Intercept a = ybar - b xbar = 4 - 0.6 x 3 = 2.2
  5. Fitted model: y = 2.2 + 0.6x
  6. SST = 6 splits into SSR = 3.6 explained and SSE = 2.4 unexplained, so R^2 = 0.6.
  7. Standard error of the estimate s = sqrt(SSE / 3) = 0.89442719.
  8. Prediction at 6: 5.8.
All coefficientstable
2.2, 0.6
Fitted valuestable
2.8, 3.4, 4, 4.6, 5.2
Residualstable
-0.8, 0.6, 1, -0.6, -0.2
Scatter points with the fittable
xyfittedresidual
122.8-0.8
243.40.6
3541
444.6-0.6
555.2-0.2

Results are general information, not financial, tax, legal, medical or engineering advice.