Linear Regression Calculator
Calculate the linear regression equation using the least squares method. Enter your summary statistics to find the slope, y-intercept, R-squared value, and make predictions.
Linear regression finds the best-fit straight line through a set of data points.
Formulas:
- Slope: m = (nΣxy - ΣxΣy) / (nΣx² - (Σx)²)
- Intercept: b = (Σy - mΣx) / n
- R² measures how well the line fits the data (0 = no fit, 1 = perfect fit)
Interpretation:
- m > 0: positive relationship (y increases as x increases)
- m < 0: negative relationship
- R² > 0.7: strong fit
- R² < 0.3: weak fit