Students who use a campus tutoring center have higher average exam scores than those who do not. For class attendance to confound this association, it must be:
Confounding variables
When a third variable is associated with both the explanatory and response variables, how to show it with numbers, and what happens to an association once you account for it.
Key ideas
- Confounder
A variable that (1) is associated with the explanatory variable and (2) affects the response. Associated with only one of them is not enough.
- Leg 1: confounder and X
Both categorical, so compare conditional proportions: the same outcome, with the denominators being the levels of (e.g. % under 40 among members versus among non-members).
- Leg 2: confounder and Y
Compare the response across levels of the confounder with a center and a location of spread (means or medians, and where the IQRs sit).
- Accounting for it
Compare groups within each level of the confounder. If the association weakens or disappears, the confounder explains part or all of it; if it stays strong, the third variable does not explain it.
- Direction words
"Positive" or "negative" association only makes sense when both variables are ordered, such as age groups. For unordered groups, describe which group is higher.
Gym membership and resting heart rate
A random sample of 400 adults (observational) records gym membership, resting heart rate (bpm) and age group. Members average 65.4 bpm, non-members 69.2 bpm. Is age group a confounder, and what happens after accounting for it?
Under 40 40+ Total
Member 140 60 200
Non-member 70 130 200
Mean resting heart rate (bpm)
Under 40 40+
Member 63 71
Non-member 64 72
All in group 63.3 71.7Leg 1 (age and membership): among members, are under 40; among non-members, . Age group is associated with membership.
Leg 2 (age and heart rate): under-40 adults average about 63.3 bpm, adults 40+ about 71.7 bpm. Age group is associated with the response.
Triangle complete: age group is associated with both, so it is a confounder.
Within age groups: members are only 1 bpm lower in each age group, versus 3.8 bpm overall. Most of the raw gap came from members being younger.
Age group confounds the membership–heart rate association: once age is accounted for, the difference shrinks from 3.8 bpm to about 1 bpm.
Check yourself
Homes with a smart thermostat use less heating energy on average. An analyst suspects home age confounds this and tabulates a random sample of 800 homes: of the 300 homes with a smart thermostat, 210 were built after 2000; of the 500 homes without one, 200 were built after 2000. Which statement correctly shows that home age is associated with having a smart thermostat?
Overall, on-campus students have a higher mean GPA than off-campus students. Within each class year (first-year, sophomore, junior, senior), the on-campus and off-campus means are nearly identical. What does this suggest?
Observational data show that households with a home garden eat more servings of vegetables per week. Select every variable that could plausibly confound this association.
A student supports "age group is associated with income" by writing: "The IQR of income for older workers is 12,000 and for younger workers is 9,000." Why is this weak evidence?
Overall, members of a running club have lower average resting heart rates than non-members. Within each age group, the members' advantage is just as large as it is overall. What does this say about age group?