Confounding: a link is not a cause · Statistics & Data… | StemPy Lab
Course 1.3·Lesson 3 of 3
Confounding: a link is not a cause
Two things can rise and fall together without one causing the other. A confounding variable is linked to both, and its effect is mixed up with the effect we want to see. This lesson finds confounders, compares like with like, and reads the words "the study found a link" with care, including the difference between relative and absolute risk.
about 30 min1 simulation1 practice question
Lesson 3 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
name a confounding variable and explain how it makes a link;
compare like with like inside groups;
read a news claim about a link, and turn a relative risk into an absolute one.
Ice cream and swimming
In a made-up seaside town, the weeks with more ice-cream sales are also the weeks with more swimming accidents. Does ice cream make people unsafe in the water? Of course not. Hot weather brings more people to buy ice cream and more people to swim. The weather is linked to both.
Confounding
A confounding variable (also called a lurking variable) is linked to the explanatory variable and also affects the response. Its effect gets mixed up with the effect we are trying to see.
A diagram with three labelled boxes: hot weather at the top, ice-cream sales at the lower left and swimming accidents at the lower right. Solid arrows run from hot weather down to each of the other two boxes. A dashed line with a question mark joins ice-cream sales and swimming accidents.
A link between two variables is called an association or a correlation. A link alone never proves a cause. There are other explanations.
A confounder drives both, as the weather does.
Reverse cause. The response may cause the "explanatory" variable. People who feel ill may exercise less, so "less exercise" and "illness" go together, partly the other way round.
Luck. In a small study, a link may appear by chance.
Chapter 5 of this book measures a link with the correlation coefficient. This lesson is about where a link comes from.
Like with like
Here is a made-up study of laptops at home and test marks. Students from higher-income families score more marks on average. They are also more likely to have a laptop.
The fix is to compare like with like. Inside the higher-income group, compare owners with non-owners. Then do the same inside the lower-income group. If the gaps vanish inside both groups, the laptop was not the cause. Better still, run an experiment: random assignment cuts the tie between the laptop and income.
Reading "the study found a link"
Ask these questions about any claim.
What kind of study? An experiment can show a cause. An observational study shows a link.
Who was studied, and how many? A sample of 12 volunteers says little about everyone.
What else could explain it? Name a confounder, and think of reverse cause.
How big is the effect, in real numbers?
The last question needs care. A story says, "Eating late raises the risk of a stomach problem by 50%." Suppose 2 people in 1000 have the problem without the habit. A rise of 50% takes it to 3 in 1000. The relative risk rose by 50%, but the absolute risk rose by only 1 person in 1000. Both numbers are true. The second is the one that helps you decide.
Practise with new numbers
Try it in Python
The program holds a made-up table of laptops and marks in two income groups. It finds the mean marks of owners and non-owners, first for all students together and then inside each income group.
Your turn.
The usual mistakes
Reading a cause into a link. Ask what else could drive both.
Forgetting reverse cause. Which came first?
Being alarmed by a relative risk. Ask for the absolute numbers.
Thinking that a confounder must be measured to matter. The worst confounders are the ones nobody thought of. Random assignment deals with those too.
Remember these
A confounding variable is linked to the explanatory variable and affects the response.
A link can come from a confounder, a reverse cause or luck.
Compare like with like, or better, run an experiment with random assignment.
Relative risk: the change as a percentage of the old risk. Absolute risk: the change in people per 1000.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
In a made-up town, homes with more books have children with higher reading marks. Name a possible confounding variable.
People who use a sleep app sleep fewer hours than people who do not. A report says the app harms sleep. Give another explanation.
A habit raises the risk of an illness from 6 in 1000 to 9 in 1000. Give the relative and the absolute rise.
How does random assignment deal with confounders that nobody has thought of?
A study finds that people who own dogs walk more. Is a dog the cause, or could it be the other way round?
References
OpenStax, Introductory Statistics, Chapter 1, section on experimental design and ethics, which describes lurking variables.
Enroll free in Surveys, Experiments and Observational Studies
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.