regression
Simple Linear Regression
Find the best-fit line ŷ = a + bx for paired data.
This is the worked example that ships with the calculator. Replace the values above with your own and press Calculate.
- X Values
- 1, 2, 3, 4, 5
- Y Values
- 2, 4, 5, 4, 5
- Simple linear regression: ŷ = a + bx
Formulab = Σ(xᵢ-x̄)(yᵢ-ȳ) / Σ(xᵢ-x̄)², a = ȳ - b·x̄n = 5
- Means
x̄ = 3.0000, ȳ = 4.0000
- Slope (b)Substituteb = 6.0000 / 10.0000
0.6000
- Intercept (a)Substitutea = 4.0000 - 0.6000 · 3.0000
2.2000
- Regression equation
ŷ = 2.2000 + 0.6000x
- Correlation coefficient (r)
0.7746
- Coefficient of determination (r²)Substituter² = 0.7746²
0.6000
- Interpretation of r²
60.00% of the variation in y is explained by the linear relationship with x.
- Residuals (yᵢ - ŷᵢ)
-0.8000, 0.6000, 1.0000, -0.6000, -0.2000