Linear Regression Sandbox

STA-215 · Semester III · Statistics II

Linear Regression

Fit ŷ = a + bx by least squares and predict.

Best-fit line through the scatter

ŷ = 0.64 + 1.54·x

Predict score for

8 hours → 12.928571428571429 marks

Slope formula

b = (n·Σxy − Σx·Σy) / (n·Σx² − (Σx)²)

= (8·61752·85) / (8·3802704) = 1.54

Every extra hour of study adds about 1.5 marks, on average. Intercept a = 0.64.