Fit a least-squares line and find slope, intercept, correlation, R-squared, and standard error. Make predictions at chosen x values.
Direct solving is free and needs no account. Have a word problem instead? Submit it as text.
Worked examples
These are the solver's own reference problems — the answers come from published sources or independent hand computation, never from the solver itself. The solution below is the live solver output for each.
Example 1
perfect proportional fit: (1,2),(2,4),(3,6)
Given
points
1.x 1y 2
2.x 2y 4
3.x 3y 6
Assumptions
Simple least squares: errors in y only, equal weight per point, straight-line model.
Solution steps
Fit the line with centered sums
The slope is the ratio of the x–y co-variation to the x variation; the line passes through (x̄, ȳ).
b = Sxy/Sxx; a = ȳ − b·x̄
x̄ = 2; ȳ = 4; Sxx = 2; Sxy = 4; slope b = 2; intercept a = 0
= 2
Goodness of fit
r² is the fraction of the y variation explained by the line; the standard error of the estimate is the typical residual size.