Understand the method
What does the linear regression calculation mean?
A least-squares regression line estimates the linear relationship between paired x and y observations. The correlation r gives direction and strength; r² gives the fraction of y-variation explained by this linear model.
When to use it
Use it to summarize paired quantitative data when a scatterplot suggests an approximately linear pattern.
Formula
In plain text: ŷ = mx + b
Variables and units
| Symbol | Meaning |
|---|---|
| m | estimated change in y per unit x |
| b | predicted y when x = 0 |
| r | correlation from −1 to 1 |
| r² | coefficient of determination |
How to use the calculator
- Enter each known value in its labeled field.
- Select the answer precision you want.
- Choose Calculate answer to see the result and working.
Worked example
For x = 1, 2, 3 and y = 2, 4, 6, the fitted line is ŷ = 2x, with r = 1 and r² = 1.
Common mistakes
- Pair x and y values in the same order.
- Correlation does not establish causation.
- Avoid extrapolating far beyond the observed x-range.
Interpret the result
The sign of m and r gives direction; values of |r| near 1 indicate a stronger linear association.