A brief note on Correlation and Cause . Read it before a test. Try each question at the end before you open its answer.
Why two variables move together Cause: x x x causes y y y . Reverse cause: y y y causes x x x . Lurking (confounding) variable: a third variable drives both. Mixed groups: groups that differ in both variables. Time or chance: two quantities that both grow over the years. Evidence of cause: a randomised experiment, or many agreeing studies with a sensible mechanism. Simpson's paradox What: a comparison holds in every group but reverses when the groups are combined. Why: the groups are mixed in different proportions, and their rates differ a lot. What to do: compare within groups when the grouping affects the outcome. Curved patterns Log scale: growth by an equal factor gives log 10 y = a + b x \log_{10} y = a + bx log 10 y = a + b x , a straight line. Growth factor: 10 b 10^{b} 1 0 b for each unit of x x x . Doubling time: log 10 2 b \dfrac{\log_{10} 2}{b} b log 10 2 . Square root: straightens a quantity that grows like a square. Predict: on the log scale, then undo with y = 10 a + b x y = 10^{a + bx} y = 1 0 a + b x . A worked example Two made-up bus companies record trips on time. Company P: 45 45 45 of 50 50 50 in dry weather, 90 90 90 of 150 150 150 in rain. Company Q: 136 136 136 of 160 160 160 dry, 22 22 22 of 40 40 40 in rain.
Dry. P has 90 % 90\% 90% and Q has 85 % 85\% 85% . Rain. P has 60 % 60\% 60% and Q has 55 % 55\% 55% . Overall. P has 135 200 = 67.5 % \dfrac{135}{200} = 67.5\% 200 135 = 67.5% and Q has 158 200 = 79 % \dfrac{158}{200} = 79\% 200 158 = 79% . P wins in both kinds of weather but loses overall, because most of its trips were in rain. Practice with new numbers
A program to try The program finds the rates of the worked example in each kind of weather and overall.
Run it. Which lines show the paradox?
1. Give P the same mix as Q: (144, 160) dry and (24, 40) in rain. Who wins overall now?
Mistakes to avoid Reading cause into a correlation. Averaging rates of groups with different sizes. Forgetting to undo the logarithm in a prediction. Extrapolating growth beyond the data. Check yourself Towns with more swimming pools have more drownings. Name a lurking variable. Stuck? Show a hint Show the answer20 20 20 of 25 25 25 members of one group and 15 15 15 of 75 75 75 of another say yes. What is the overall percentage? Stuck? Show a hint Show the answerA count follows log 10 y = 2 + 0.5 x \log_{10} y = 2 + 0.5x log 10 y = 2 + 0.5 x . Predict y y y at x = 2 x = 2 x = 2 . Stuck? Show a hint Show the answerWhy does a randomised experiment protect against lurking variables? Stuck? Show a hint Show the answerSources OpenStax, Introductory Statistics , Chapters 1, 3 and 12.