haya.Learning made clear
Unit VIII · Statistics, operations and operations research
10 min readConcept sheetMCQ · compute r, R or a regression estimate

Correlation and regression

Correlation measures the strength and direction of a linear link, from −1 to +1. Regression fits a line to predict the dependent variable: Y = a + bX.

Karl Pearson's rr = Σxy ÷ √(Σx² × Σy²), with x and y as deviations from the means; −1 ≤ r ≤ +1
Spearman's rank correlationR = 1 − 6Σd² ÷ [n(n² − 1)] (Charles Spearman, 1904)
r from regression coefficientsr = ±√(bYX × bXY); r, bYX and bXY always share the same sign
Coefficient of determinationr²: the share of the variation in Y explained by X

Kinds and measures of correlation

ItemMeaning
Positive or negativeVariables move together, or in opposite directions (price and quantity demanded: negative)
Linear or non-linearA constant ratio of change, or a changing one (curvilinear)
Simple, partial or multipleTwo variables; two with others held constant; one with two or more taken together
Scatter diagramA plot of the points; the quickest visual check
Karl Pearson's coefficientProduct-moment r for interval or ratio data
Spearman's rank coefficientFor ranks or qualities such as honesty or taste
Concurrent deviation methodUses only the direction of change; quick and rough
Probable errorPE = 0.6745 × (1 − r²) ÷ √n; r is significant if it exceeds 6 PE

Correlation vs regression

CorrelationMeasures the degree of association. Symmetric (rXY = rYX), unit-free, lies between −1 and +1, and does not prove cause and effect.
RegressionGives the average relationship for prediction. Not symmetric: there are two lines, Y on X and X on Y. Coefficients carry units; one may exceed 1, but not both.

Sir Francis Galton coined 'regression' after finding that children's heights regressed towards the average of the population.

Properties NET tests

  • r is independent of change of origin and scale; only its sign flips if one variable is multiplied by a negative number.
  • Regression coefficients are independent of change of origin but not of scale.
  • r is the geometric mean of bYX and bXY. When both are positive, their arithmetic mean is at least r.
  • bYX × bXY = r² ≤ 1, so the two coefficients cannot both exceed 1 in absolute value.
  • bYX = r × σY ÷ σX and bXY = r × σX ÷ σY.
  • The two regression lines cross at (x̄, ȳ). If r = 0 they are perpendicular; if r = ±1 they coincide.
  • r = 0 means no linear relation; a curved relation may still exist. A high r between unrelated series is spurious (nonsense) correlation.
  • Tied ranks: give each tied item the average of the ranks it shares, then add (m³ − m) ÷ 12 to Σd² for each group of m ties before using Spearman's formula.

Worked example 1: Pearson's r and the regression line

Problem

Advertising spend X (₹ lakh) and sales Y (₹ crore) for five months: X = 1, 2, 3, 4, 5; Y = 2, 4, 5, 4, 5. Find r and the regression of Y on X, and estimate Y when X = 6.

Working
  1. x̄ = 15 ÷ 5 = 3; ȳ = 20 ÷ 5 = 4.
  2. Deviations: x = −2, −1, 0, 1, 2; y = −2, 0, 1, 0, 1.
  3. Σxy = 4 + 0 + 0 + 0 + 2 = 6; Σx² = 10; Σy² = 4 + 0 + 1 + 0 + 1 = 6.
  4. r = 6 ÷ √(10 × 6) = 6 ÷ 7.746 = 0.7746 (4 decimal places), so r² = 0.6.
  5. bYX = Σxy ÷ Σx² = 6 ÷ 10 = 0.6; a = ȳ − b x̄ = 4 − 0.6 × 3 = 2.2. So Y = 2.2 + 0.6X.
  6. At X = 6: Y = 2.2 + 0.6 × 6 = 2.2 + 3.6 = 5.8.
Answer

r ≈ 0.77, a strong positive link; advertising explains 60% of the variation in sales. Y = 2.2 + 0.6X gives ₹5.8 crore at X = 6.

Worked example 2: Spearman's rank correlation

Problem

Two judges rank five TV ads for an FMCG brand. Judge 1: 1, 2, 3, 4, 5. Judge 2: 2, 1, 4, 3, 5. Find the rank correlation.

Working
  1. d = R1 − R2 = −1, 1, −1, 1, 0.
  2. Σd² = 1 + 1 + 1 + 1 + 0 = 4; n = 5.
  3. R = 1 − (6 × 4) ÷ [5 × (25 − 1)] = 1 − 24 ÷ 120 = 1 − 0.2 = 0.8.
Answer

R = 0.8: the judges largely agree.

Worked example 3: from regression coefficients to r and a line

Problem

bYX = 0.8, bXY = 0.45, x̄ = 10 and ȳ = 20. Find r and the regression equation of Y on X.

Working
  1. r² = bYX × bXY = 0.8 × 0.45 = 0.36, so r = +0.6, positive because both coefficients are positive.
  2. Y − ȳ = bYX(X − x̄): Y − 20 = 0.8(X − 10).
  3. Y = 20 + 0.8X − 8 = 12 + 0.8X.
Answer

r = 0.6; Y = 12 + 0.8X.

How NET asks this

NET asks for r from the two regression coefficients, Spearman's R from Σd², a prediction from a regression line, and properties: the limits of r, the effect of origin and scale, and where the two lines meet.

Exam angle

Typical MCQ: “bYX = −0.6 and bXY = −0.6. Find r.” r = −√0.36 = −0.6. Trap: giving +0.6; r takes the sign of the coefficients.

Typical MCQ: “Can bYX = 1.6 and bXY = 0.8 hold for the same data?” No. Their product, 1.28, would be r², which cannot exceed 1. Trap: rejecting 1.6 alone; one coefficient may exceed 1, but the product may not.

Typical MCQ: “r = 0 between X and Y. Are they unrelated?” Only linearly. A curved relation may still exist. Trap: reading r = 0 as 'no relation at all'.

Remember it

Correlation = how closely; regression = how much. r is the geometric mean of the two b's, and both regression lines pass through the means.