Predictive Modeling: Ordinary Least Squares Regression
The Least Squares Linear Regression Calculator models linear bivariate trends ($y = mx + b$) across paired data points. Essential for economics econometrics, laboratory calibration, machine learning baselines, and trend forecasting.
Core Mathematical Relationships
Formulate optimal least-squares line parameters:
- Slope Formulation: $m = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2} = r \frac{s_y}{s_x}$.
- Y-Intercept: $b = \bar{y} - m \bar{x}$.
- Pearson Correlation: $r = \frac{n\sum xy - \sum x \sum y}{\sqrt{[n\sum x^2 - (\sum x)^2][n\sum y^2 - (\sum y)^2]}}$.
- Coefficient of Determination: $R^2 = r^2$.
How to Use the Calculator
- Enter paired (x, y) coordinates or paste spreadsheet columns.
- Click Compute Linear Regression to inspect slope $m$, intercept $b$, $r$, and $R^2$.
- Input test $x$ values to evaluate fitted prediction $y$ outcomes.
