A little context. A clearer answer.
When this calculator is useful
Enter one x y pair per line. Fit an ordinary least-squares line, inspect residuals and estimate y at a chosen x. For a related calculation, try Variance, Standard Deviation & MAD Calculator.
What to enter
| Input | What it means | Example value |
|---|---|---|
| x ; y | Enter one x y pair per line. Fit an ordinary least-squares line, inspect residuals and estimate y at a chosen x. | 1 1 2 2 3 3 4 4 |
| x* | x*: -1000000000…1000000000 | 5 |
How the calculation works
- Enter one x y pair per line. Fit an ordinary least-squares line, inspect residuals and estimate y at a chosen x.
- b=Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; a=ȳ−bx̄; eᵢ=yᵢ−(a+bxᵢ); R²=1−SSE/SST
- 2–500 pairs with decimal points. Constant x is invalid; constant y has undefined R². Residual standard deviation requires at least three points. No causality or prediction interval.
b=Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; a=ȳ−bx̄; eᵢ=yᵢ−(a+bxᵢ); R²=1−SSE/SSTA worked example
ŷ(x*) · x = 5 · 1 × 5 = 5 → 2.2 × 5 − 2 = 9
Example you can load
What to enterThis is a fixed example; changing the form above does not change these numbers.
Assumptions & limits
2–500 pairs with decimal points. Constant x is invalid; constant y has undefined R². Residual standard deviation requires at least three points. No causality or prediction interval.
Frequently asked questions
Linear regression and residuals — How is the result calculated?
b=Σ(x−x̄)(y−ȳ)/Σ(x−x̄)²; a=ȳ−bx̄; eᵢ=yᵢ−(a+bxᵢ); R²=1−SSE/SST
x ; y / x*?
Enter one x y pair per line. Fit an ordinary least-squares line, inspect residuals and estimate y at a chosen x.
Linear regression and residuals — What assumptions apply?
2–500 pairs with decimal points. Constant x is invalid; constant y has undefined R². Residual standard deviation requires at least three points. No causality or prediction interval.