a modest upward fit
- X values
- 1, 2, 3, 4, 5, 6
- Y values
- 2, 4, 5, 4, 5, 7
- Predict y at x =
- 7
Line of best fity = 0.7714x + 1.8
Least squares computed independently
Open this exampleLeast-squares line of best fit, with R squared and a prediction. The line always passes through the mean of both variables, which is a useful check on any regression.
Also called: least squares calculator, line of best fit.
y = 0.7714x + 1.8. It explains 77.14% of the variation. At x = 7 the line predicts y = 7.2, though that is outside the data you fitted.
Least squares finds the line minimising the sum of squared vertical distances to the points. The slope is the covariance over the variance of x, and the intercept follows from the line passing through the point of both means, which is worth remembering as a sanity check. R squared says how much of the variation the line accounts for, and the standard error says how far a typical point sits from it.
least squares: the slope is covariance over the variance of x, and the line passes through both meansEach of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.
Line of best fity = 0.7714x + 1.8
Least squares computed independently
Open this exampleLine of best fity = 2x + 0
boundary
Open this exampleFormula version 1.0.0 · definition 1.0.0 · India · Report a problem with this calculator