Linear regression calculator

Enter your values. The answer and the full worked solution update as you type.

Result

Slope b1.99
Intercept a0.05
Correlation r0.9987
r²0.9973

Step-by-step solution

Means

x̄ = 3, ȳ = 6.02

Sums of squares

Sxy = 19.9, Sxx = 10, Syy = 39.71

Line and correlation

b = Sxy/Sxx = 1.99, a = ȳ − b·x̄ = 0.05
ŷ = 0.05 + 1.99·x
r = Sxy/√(Sxx·Syy) = 0.9987

Key formulas

Sums of squares
Sxx = Σ(x − x̄)² = Σx² − (Σx)²/n, Sxy = Σxy − ΣxΣy/n
Slope
b = Sxy/Sxx
Intercept
a = ȳ − b·x̄
Correlation
r = Sxy/√(SxxSyy)
Residual
e = y − ŷ

Practise Linear regression & correlation

A calculator gives the answer. In the exam you need the method: practise it with new problems, hints and worked solutions.

</> Embed

Free for teachers and schools: paste this code into your course page, LMS or website. Students can use the calculator and its worked solution without an account.

More calculators