Quick answer
A confounding variable is a third factor that influences both the thing you think is the cause and the outcome you measure, creating a link between them that is partly or wholly not causal.
Formula: Confounder Z affects both X and Y: Z → X and Z → Y
What is a confounding variable?
A confounding variable (or confounder) is a third factor that affects both the thing you believe is the cause and the outcome you measure. Because it moves both, the two look related even when one does not cause the other.
A factor is a confounder when three things hold:
- It is associated with the supposed cause.
- It affects the outcome on its own.
- It is not a result of the cause (it is not a step in between).
The classic example: ice cream sales and drowning deaths rise together. Hot weather drives both. Ice cream does not cause drowning. This is why correlation is not causation.
An example from a dashboard
A product team launches a dark mode and compares conversion rates (sample numbers):
| Group | Users | Converted | Rate |
|---|---|---|---|
| Turned on dark mode | 600 | 32 | 5.3% |
| Did not | 1,400 | 32 | 2.3% |
Dark mode users convert more than twice as often. Did dark mode help? Split by device:
| Device | Dark mode on | Dark mode off |
|---|---|---|
| Desktop | 500 users, 6.0% | 100 users, 6.0% |
| Mobile | 100 users, 2.0% | 1,300 users, 2.0% |
Within each device, the rate is identical. Desktop users both convert better and found the dark mode toggle more often. Device is the confounder. The overall gap came entirely from the mix of devices in each group. When the split reverses the overall direction instead of erasing it, the effect has a name: Simpson's paradox.
How to control for a confounder
- Randomise. In an A/B test, chance decides who gets the change, so device, source and every factor you have not thought of are balanced between groups. This is the only method that handles unknown confounders.
- Compare within segments (stratify). Look at the effect inside each value of the suspected confounder: desktop only, then mobile only. If the gap disappears, the confounder explained it.
- Match or adjust. Compare users who are alike on the confounder (same plan, same country, same signup month), or use a regression that includes it.
- Check the time order. A factor that changes because of the cause is a mediator, not a confounder. Controlling for it hides a real effect.
Common confounders in web and product analytics
| Confounder | Typical false conclusion |
|---|---|
| Device or browser | "Feature X raises conversion" when desktop users simply use X more |
| Traffic source | "Page A converts better" when it gets more branded search traffic |
| User tenure | "Users who use feature Y retain longer" when long-time users discover Y |
| Seasonality | "The new pricing page lifted sales" when the launch coincided with a sale period |
| Plan or company size | "Teams using integrations churn less" when larger accounts both integrate and stay |
Checking for confounders in TapCub
TapCub does not run A/B tests, so most comparisons in it are observational and worth checking for confounders before acting. Click a row (device, source, country) on any web analytics table to add it as a filter, and repeat the comparison inside each value. Set the comparison to the previous period or the same period last week to rule out a date effect. For product questions, build a segment for each group and open it in analysis; a rule segment can also use a random bucket, which gives you a random holdout group to compare against. When the gap survives every split you can think of, treat it as a hypothesis worth testing, not proof. See also p-value and statistical significance.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Product Analyst
Focuses on event analysis, conversion funnels, and retention, using clear metric definitions and structured analysis to explain product performance.