By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
"Mastering regression and correlation lets you predict exam scores from study hours, forecast stock trends, or even prove whether taller people earn more—skills that could earn you 10+ marks on your IB Math AI exam and set you up for university stats."
Formula: [ r = \frac{S_{xy}}{\sqrt{S_{xx} \cdot S_{yy}}} ] - Sₓᵧ = Σ(x - x̄)(y - ȳ) → "Covariance" - Sₓₓ = Σ(x - x̄)² → "Sum of squares for x" - Sᵧᵧ = Σ(y - ȳ)² → "Sum of squares for y" MEMORISE THIS (but check if given on your exam sheet).
Formula: [ y = a + bx ] - Slope (b): [ b = \frac{S_{xy}}{S_{xx}} ] - Intercept (a): [ a = \bar{y} - b\bar{x} ] MEMORISE THIS (or derive from Sₓᵧ/Sₓₓ).
Linearised form: [ \ln(y) = \ln(a) + x \cdot \ln(b) ] - Let Y = ln(y), A = ln(a), B = ln(b) → becomes Y = A + Bx. Given on exam sheet (but know how to use it).
Linearised form: - Let X = ln(x) → becomes y = a + bX. Given on exam sheet.
Data: | x (Study Hours) | y (Exam Score) | |-----------------|----------------| | 1 | 50 | | 2 | 55 | | 3 | 65 | | 4 | 70 |
Step 1: Plot → Linear trend. Step 2: Means → x̄ = 2.5, ȳ = 60. Step 3: - Sₓₓ = (1-2.5)² + (2-2.5)² + (3-2.5)² + (4-2.5)² = 5 - Sᵧᵧ = (50-60)² + (55-60)² + (65-60)² + (70-60)² = 250 - Sₓᵧ = (1-2.5)(50-60) + (2-2.5)(55-60) + (3-2.5)(65-60) + (4-2.5)(70-60) = 35 Step 4: r = 35 / √(5 × 250) = 0.99 → Very strong correlation. Step 5: - b = 35 / 5 = 7 - a = 60 - 7(2.5) = 42.5 - Regression line: y = 42.5 + 7x Step 6: Predict y when x = 5 → y = 42.5 + 7(5) = 77.5. What we did and why: - Calculated means to centre the data. - Used Sₓₓ, Sᵧᵧ, Sₓᵧ to find the best-fit line. - Predicted a score for 5 study hours.
Data: | x (Years) | y (Population) | |-----------|----------------| | 1 | 2 | | 2 | 4 | | 3 | 8 | | 4 | 16 |
Step 1: Plot → Exponential growth (curved). Step 2: Linearise → Take ln(y): | x | ln(y) | |---|-------| | 1 | 0.693 | | 2 | 1.386 | | 3 | 2.079 | | 4 | 2.773 |
Step 3: Means → x̄ = 2.5, ln(y)̄ = 1.733. Step 4: - Sₓₓ = 5, Sₗₙᵧₗₙᵧ = 2.25, Sₓₗₙᵧ = 3.465 - r = 3.465 / √(5 × 2.25) = 1 → Perfect fit. Step 5: - b = 3.465 / 5 = 0.693 - a = 1.733 - 0.693(2.5) = 0 - Regression line: ln(y) = 0 + 0.693x Step 6: Convert back → y = e⁰·⁶⁹³ˣ = 2ˣ (since e⁰·⁶⁹³ ≈ 2). What we did and why: - Recognised exponential growth → linearised with logs. - Regressed ln(y) on x to find the model y = 2ˣ.
Question: "The table shows the relationship between advertising spend (x, in $1000s) and sales (y, in $1000s). Find the logarithmic regression model y = a + b·ln(x) and predict sales when $5000 is spent."
Step 1: Plot → Logarithmic trend (curve flattens). Step 2: Linearise → Let X = ln(x): | X = ln(x) | y | |-----------|---| | 0 | 10| | 0.693 | 15| | 1.099 | 18| | 1.386 | 20|
Step 3: Means → X̄ = 0.794, ȳ = 15.75. Step 4: - Sₓₓ = 1.147, Sᵧᵧ = 56.75, Sₓᵧ = 7.97 - r = 7.97 / √(1.147 × 56.75) = 0.99 → Strong fit. Step 5: - b = 7.97 / 1.147 = 6.95 - a = 15.75 - 6.95(0.794) = 10.2 - Regression line: y = 10.2 + 6.95·ln(x) Step 6: Predict x = 5 → y = 10.2 + 6.95·ln(5) = 21.5. What we did and why: - Recognised logarithmic trend → linearised with ln(x). - Regressed y on ln(x) to find the model. - Predicted sales for $5000 spend.
MISTAKE: Forgetting to calculate means (x̄, ȳ). WHY IT HAPPENS: Skipping steps to save time. CORRECT APPROACH: Always find means first—they’re needed for Sₓₓ, Sᵧᵧ, Sₓᵧ.
MISTAKE: Mixing up Sₓₓ and Sᵧᵧ in Pearson’s formula. WHY IT HAPPENS: Confusing the order of variables. CORRECT APPROACH: Remember: r = Sₓᵧ / √(Sₓₓ·Sᵧᵧ).
MISTAKE: Using the wrong linearisation (e.g., taking ln(x) for exponential data). WHY IT HAPPENS: Not checking the scatter plot first. CORRECT APPROACH: Exponential → ln(y). Logarithmic → ln(x).
MISTAKE: Extrapolating too far outside the data range. WHY IT HAPPENS: Assuming trends continue forever. CORRECT APPROACH: State predictions are only valid within the given x-range.
MISTAKE: Rounding intermediate values too early. WHY IT HAPPENS: Trying to simplify calculations. CORRECT APPROACH: Keep 4+ decimal places until the final answer.
Trap: Giving r = 1.5 (impossible, since |r| ≤ 1). How to Spot it: Check if r is between -1 and 1. How to Avoid it: Recalculate Sₓₓ, Sᵧᵧ, Sₓᵧ—you likely made a sign error.
Trap: Being asked for the interpretation of r but only giving the number. How to Spot it: The question says "describe the correlation". How to Avoid it: Always add: "Strong/weak, positive/negative correlation."
Trap: Forgetting to convert back from ln(y) to y in exponential models. How to Spot it: The question asks for y, but your answer is ln(y). How to Avoid it: Write: "Exponentiate both sides: y = e^(ln(y))".
"Here’s the night-before cheat sheet for regression and correlation: 1. Plot first—if it’s curved, linearise with logs. 2. Calculate means (x̄, ȳ) and sums (Sₓₓ, Sᵧᵧ, Sₓᵧ). 3. Pearson’s r = Sₓᵧ / √(Sₓₓ·Sᵧᵧ). Closer to 1 or -1 = stronger link. 4. Regression line: y = a + bx, where b = Sₓᵧ/Sₓₓ and a = ȳ - b·x̄. 5. Exponential? Take ln(y) and regress on x. Logarithmic? Take ln(x) and regress on y. 6. Predict by plugging x into the equation—but don’t extrapolate wildly! Double-check units, round at the end, and always interpret r. You’ve got this!
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.