Statistics & Probability
Linear Regression (full)
Least-squares fit y = m·x + b.
Formula
Formula
y = m·x + b
Variables
| Symbol | Definition | Type & range | Units | Role |
|---|---|---|---|---|
| m | slope | computed result | — | result |
| b | intercept | computed result | — | result |
Try it yourself
Interactive calculator
Worked examples
Example 1
Givenx = 1, 2, 3, 4, 5, y = 2, 4, 5, 4, 5
Result
slope
0.6
intercept
2.2
Example 2
Givenx = 0, 1, 2, y = 1, 3, 5
Result
slope
2
intercept
1