CleverSphere

Regression line: worked example

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.

xy
114
218
320
426
527

Worked solution

  1. 1.x̄ = 3.00, ȳ = 21.00
  2. 2.b = Σ(xᵢ − x̄)(yᵢ − ȳ) / Σ(xᵢ − x̄)² = 34.00 / 10.00 = 3.40
  3. 3.a = ȳ − 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, each time with new numbers. Comma or point; fractions like 1/6 work too.

Task 1 of 3Regression & correlation

Task

Study hours x and points y were measured. Find the regression line y = a + b·x.

xy
117
218
316
417
519

Slope b (2 decimal places)

Intercept a (2 decimal places)

Comma or point; fractions like 1/6 work too.

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.