Regression Line
First the slope b from the cross-products of deviations, then the intercept a through the means.
Worked example
Study hours x and points y were measured. Find the regression line y = a + b·x.
| x | y |
|---|---|
| 1 | 14 |
| 2 | 18 |
| 3 | 20 |
| 4 | 26 |
| 5 | 27 |
Worked solution
- 1x̄ = 3.00, ȳ = 21.00
- 2b = Σ(xᵢ − x̄)(yᵢ − ȳ) / Σ(xᵢ − x̄)² = 34.00 / 10.00 = 3.40
- 3a = ȳ − b · x̄ = 21.00 − 3.40 · 3.00 = 10.80
Typical mistake: Dividing by Σ(yᵢ − ȳ)² instead of Σ(xᵢ − x̄)² for b.
Your turn
Three problems of exactly this type with new numbers: first one to tap, then two to work out. Comma or point; fractions like 1/6 work too.
- 1 · Regression & correlation
- 2
- 3
Study hours x and points y were measured. Find the regression line y = a + b·x.
| x | y |
|---|---|
| 1 | 17 |
| 2 | 18 |
| 3 | 16 |
| 4 | 17 |
| 5 | 19 |
Slope b
Formulas for this topic
- b = Σ(xᵢ − x̄)(yᵢ − ȳ) / Σ(xᵢ − x̄)²
- a = ȳ − b · x̄
- r = Σ(xᵢ − x̄)(yᵢ − ȳ) / √(Σ(xᵢ − x̄)² · Σ(yᵢ − ȳ)²), −1 ≤ r ≤ 1
Typical mistake: Dividing by Σ(yᵢ − ȳ)² instead of Σ(xᵢ − x̄)² for b.
Frequently asked questions
What is the typical mistake in "Regression line: worked example"?
Dividing by Σ(yᵢ − ȳ)² instead of Σ(xᵢ − x̄)² for b.
Does high correlation mean causation?
No. A relation can come from a third variable or chance.
