Confounding vs lurking variable: how they differ

By Jude Wallis · Published

A confounding variable is associated with both the explanatory and response variable, so its effect cannot be separated from the explanatory variable's. A lurking variable sits outside the study's variables but may still influence the relationship. The AP course uses the term confounding variable.

AP Statistics: Unit 1 (topics 1.10, 1.13). In the Fall 2026 AP Statistics course, a confounding variable is defined in topic 1.10 (observational studies) as one associated with both the explanatory and response variables, and again in topic 1.13 (experimental design), both in Unit 1. The CED does not use the phrase lurking variable, so answer exam questions with confounding variable.

Confounding vs lurking variable: the short answer

Both terms name a hidden third variable that can distort the relationship between two others, which is why they get used interchangeably. The difference is in what each one emphasizes.

A confounding variable is one that is associated with both the explanatory variable and the response variable, so its influence on the response is tangled up with the explanatory variable's and the two cannot be told apart. A lurking variable is one that is not among the study's explanatory or response variables at all, yet may still be driving what you see.

One is defined by its role (its effect is confounded with the explanatory variable), the other by its absence (it was left out of the study). A lurking variable that turns out to be associated with both the explanatory and the response variable is also a confounding variable, which is why the two overlap so often in practice.

What a confounding variable is

A confounding variable, the term the AP course uses, is defined by its associations. In an observational study, a confounding variable provides an alternative explanation for the observed relationship between the explanatory and response variables, and to qualify it must be associated with both of them. That double link is what makes its effect impossible to separate from the explanatory variable's.

Suppose records show that towns with more firefighters at a blaze also have more fire damage. Explanatory: number of firefighters; response: damage. The size of the fire is a confounder, because bigger fires draw more firefighters and also cause more damage. It is associated with both, so you cannot tell whether firefighters or fire size drives the damage.

In an experiment the same idea applies: a confounding variable is related to the explanatory variable in a way that makes it hard to say which one changed the response. The reason random assignment is prized is that it balances such variables across the treatment groups, so a well-designed experiment reduces the potential for confounding. See correlation vs causation for why this blocks a causal claim.

What a lurking variable is

A lurking variable is standard statistics vocabulary from many textbooks: a variable that is not among the explanatory or response variables in a study but may influence the response or the relationship between the two. The defining feature is that it was not measured or included; it lurks in the background.

In the firefighters example, if the analyst only recorded firefighters and damage and never thought about fire size, then fire size is lurking. The moment you recognize it is associated with both variables, it also earns the label confounding. So a lurking variable is often the raw material of confounding: an omitted variable that, once you account for it, changes or explains away the pattern.

Not every lurking variable is a confounder. To confound, the omitted variable has to be associated with both the explanatory and the response variable. A background variable unrelated to the explanatory variable can still be noise, but it does not create a false relationship, so it does not confound.

The differences side by side

FeatureConfounding variableLurking variable
Defined byBeing associated with both explanatory and responseBeing left out of the study
EmphasisIts effect is tangled with the explanatory variableIt is hidden or unmeasured
Must link to both variablesYes, by definitionNot necessarily
In the AP CEDYes, this is the exam termNo, it is textbook usage only
Typical fixRandom assignment, or measure and adjustIdentify and record it, then check
RelationshipA lurking variable that links to both becomes thisCan turn into a confounder

The key row for the exam is the CED row. On the AP exam, name the problem a confounding variable and show it is associated with both the explanatory and the response variable.

When to use which term

For AP Statistics, use confounding variable. The Fall 2026 course framework defines confounding variable and does not use the phrase lurking variable anywhere, so a free-response answer should identify a confounding variable and justify it by naming its association with both the explanatory and the response variable. Simply calling something lurking earns no credit on its own.

The term lurking variable is still worth knowing, because textbooks and other courses use it, and it captures a real idea: a variable you failed to include may be the true driver. Treat it as the informal, omitted-variable framing and confounding variable as the precise, exam-ready one. When you spot a hidden third variable, the safe move is to ask whether it is associated with both the explanatory and response variables; if yes, it confounds, and that is the word to write down.

The classic mix-up and how to avoid it

The mix-up is treating the two words as identical and, on the exam, writing lurking variable when the CED wants confounding variable, or naming a third variable without checking that it links to both the explanatory and the response variable. Either way the justification is incomplete.

Two habits fix it. First, always test the double link: to confound, a variable must be associated with the explanatory variable and with the response variable, so state both associations explicitly. Second, default to the word confounding on AP work, and reserve lurking for the looser idea of an omitted variable. A third guardrail: a confounding or lurking variable is why an observational study cannot prove cause, so pair the term with the honest conclusion of association, not causation, as laid out in experiments vs observational studies.

A reversal that exposes the confounder

A school compares two tutoring programs by pass rate. Program X passes 48 of 100 students (48%) and Program Y passes 74 of 100 (74%), so Y looks better. But prior GPA (high or low) was not considered. The breakdown is: Program X passes 18 of 20 high-GPA and 30 of 80 low-GPA; Program Y passes 68 of 80 high-GPA and 6 of 20 low-GPA. Show how prior GPA acts as the hidden variable.

  1. Confirm the overall rates that ignore GPA. Program X: 18+3020+80=48100=0.48\frac{18 + 30}{20 + 80} = \frac{48}{100} = 0.48, so 48%. Program Y: 68+680+20=74100=0.74\frac{68 + 6}{80 + 20} = \frac{74}{100} = 0.74, so 74%.

  2. Split each program by prior GPA. Program X high-GPA: 1820=0.90\frac{18}{20} = 0.90, so 90%. Program X low-GPA: 3080=0.375\frac{30}{80} = 0.375, so 37.5%.

  3. Do the same for Program Y. High-GPA: 6880=0.85\frac{68}{80} = 0.85, so 85%. Low-GPA: 620=0.30\frac{6}{20} = 0.30, so 30%.

  4. Compare within each GPA band. Among high-GPA students, X's 90% beats Y's 85%. Among low-GPA students, X's 37.5% beats Y's 30%. Program X wins in both bands, the reverse of the overall picture.

  5. Explain the reversal. Program X's students were mostly low-GPA (80 of 100) while Program Y's were mostly high-GPA (80 of 100), and high-GPA students pass more often, so Y's overall rate is inflated by who enrolled, not by the program.

  6. Name the variable both ways. Prior GPA is a lurking variable because the first comparison left it out, and it is a confounding variable because it is associated with the program (which students enrolled) and with passing (the response). Once you condition on it, the direction flips.

Prior GPA is the hidden third variable: lurking because the 48% versus 74% comparison omitted it, and confounding because it is tied to both program enrollment and pass rate. Adjusting for it reverses the result, since Program X actually passes more students within both the high-GPA and low-GPA groups.

Frequently asked questions

Does the AP exam use the term lurking variable?

No. The Fall 2026 AP Statistics course framework defines confounding variable and does not use the phrase lurking variable. On the exam, identify a confounding variable and justify it by naming its association with both the explanatory and the response variable.

Is every lurking variable a confounding variable?

No. A lurking variable is simply one the study left out. It becomes a confounding variable only if it is associated with both the explanatory and the response variable. An omitted variable unrelated to the explanatory variable adds noise but does not create a false relationship.

How do you control a confounding variable?

In an experiment, random assignment balances confounders across the treatment groups, which is why a well-designed experiment reduces confounding. In an observational study you cannot assign, so you measure the suspected variable and compare within its levels, as the tutoring example shows by splitting on prior GPA.