PrajaPrep

Arithmetic · 8 min

NDA: correlation and regression, r, regression lines and their coefficients

Lesson

Correlation measures how closely two variables move together along a straight line. Karl Pearson's coefficient is r = cov(x, y)/(σx σy). It always lies between −1 and 1. r = 1 or −1 means every point is on one line. r = 0 means no linear relation, though a curved one may still exist.

There are two regression lines. y on x is y − ȳ = b_yx(x − x̄), used to predict y from x, with b_yx = r σy/σx = cov/σx². x on y is x − x̄ = b_xy(y − ȳ) with b_xy = r σx/σy. Both lines pass through (x̄, ȳ), so solving the two equations together gives the means.

The coefficients are tied to r: b_yx × b_xy = r², and r has the same sign as both. So the two coefficients must share a sign, and their product cannot exceed 1. This rule also tells you which given line is which: take one assignment, find the product, and if it comes out above 1, swap.

Change of origin and scale: if U = (X − a)/h and V = (Y − b)/k, then r(U, V) = r(X, Y) when h and k have the same sign, and −r(X, Y) otherwise. Regression coefficients do change with scale: b_XY = (h/k) b_UV. When r = ±1 the two lines coincide. When r = 0 they are perpendicular, one parallel to each axis. r² is the share of variation in y explained by the line.

Remember these

r = cov/(σx σy), −1 ≤ r ≤ 1; b_yx = r σy/σx, b_xy = r σx/σy; b_yx × b_xy = r².

Both lines pass through (x̄, ȳ); r = ±1 lines coincide, r = 0 perpendicular; r is unchanged by origin, sign flips with opposite scales.

Why the paper asks this

Correlation and regression are listed at the end of the NDA Statistics unit. Paper items ask for r from coefficients or covariance, the means from two lines, which line is which, a missing standard deviation, and change of origin and scale.

Worked example

The regression lines are x + 2y = 5 and 2x + 3y = 8. Means: solving gives x̄ = 1, ȳ = 2. Now assign. Take x + 2y = 5 as y on x: b_yx = −1/2. Then 2x + 3y = 8 as x on y: b_xy = −3/2. Product 3/4 ≤ 1, so this works. The other assignment gives (−2/3)(−2) = 4/3, impossible. So r = −√(3/4) = −√3/2.

Common trap

r takes the sign of the regression coefficients, so never report +√(product) when both are negative. And a scale change flips the sign of r only when the two scale factors have opposite signs; it never multiplies r.

Source: Original PrajaPrep practice note. Public exam pattern (not affiliated).

Sign up to continue learning

This lesson is free to read. Sign up free to open the next lesson in the app, keep your progress, and practise questions on this topic.

Sign up to continue learning