Back to Numerical Methods repository
Numerical Methods2D

Curve Fitting and Interpolation - Theory & Concepts - Linear Regression

Techniques for approximating discrete data points with continuous functions.

Open the complete lesson

Least-Squares Linear Regression

Drag the points or click on the graph to add new points. Observe how the best-fit line y=a0+a1xy = a_0 + a_1x minimizes the sum of squared residuals.

1122334455667788991010
Click to add points (max 15). Drag to move.

Regression Statistics

Equation of the Line
y = 0.329 + 1.032x
Intercept (a0a_0)
0.3286
Slope (a1a_1)
1.0321
R-squared (r2r^2)
0.9820
Sum of Squares (SrS_r)
0.5482
Pointxy
11.001.50
22.002.20
33.003.10
44.004.80
55.005.50
66.006.90
77.007.20