A confounder is a missing or uncontrolled variable that helps produce what you see in the data. It can make two observed variables look related even when neither causes the other. If X and Y move together, a third variable Z may be driving both—or the pattern may simply be chance. A low p-value alone cannot decide which explanation is true. section 9.2
Think of correlation as a clue, not a verdict. Before claiming that X causes Y, ask what else changed, who or what was included in the data, and what information was never collected. Confounders often enter through incomplete sampling, uncontrolled experiments, or overlooked conditions in the real operating environment. section 9.16 section 9.2
The missing cookies
A toddler passes near the kitchen, then cookies disappear. Proximity to the kitchen seems associated with the missing cookies, so it is tempting to blame the toddler. But the dog also entered the kitchen and ate the cookies. The dog is the confounder: it explains both the toddler’s apparent proximity-based suspicion and the actual disappearance. section 9.2
A practical response is to identify likely drivers before collecting data, then measure or control them where possible. To test whether 16:8 fasting causes weight loss, account for diet, exercise, and sleep habits so fasting is the intended difference between groups. This does not make every causal claim certain, but it reduces obvious alternative explanations. section 9.2
When a relationship looks convincing, check for confounding:
- What relevant conditions, people, or behaviors were not captured in the data? section 9.16
- Could a third variable plausibly affect both the proposed cause and the observed outcome? section 9.2
- Did the experiment control important differences between comparison groups? section 9.2
- Has iterative analysis encouraged cherry-picking a preferred result rather than seeking contrary evidence? section 9.16
AI and tech layoffs
AI became a popular explanation for tech layoffs after ChatGPT appeared in 2022. But timing alone does not settle causation. Changes in interest rates and the availability of cheap capital may also help explain hiring and layoffs, making monetary policy a candidate confounder in a simple “AI caused layoffs” story. section 10.16
Confounding matters beyond a single analysis because models must operate under changing conditions. Consider the full environment your data represents, including conditions that may shift over time. Looking for omitted variables and disconfirming data helps prevent confident but fragile conclusions. section 9.16




