Confounding Variable vs Response Variable
Both terms below come up in the same part of the course, and students mix them up. Here is each one defined on its own, side by side, so you can see where they part company.
Confounding variable
Collecting data and study design
A confounding variable is associated with both the explanatory variable and the response, so its effect and the explanatory variable's cannot be told apart.
Confounding is a two-part test and a variable has to pass both parts. The candidate must be associated with the explanatory variable, so the groups being compared differ on it, and it must also be associated with the response. Fail either part and the variable is not a confounder.
A district finds that students who eat the free school breakfast score higher on a reading test than students who do not. Explanatory variable: eats the school breakfast. Response: reading score. Family income passes both parts, since lower-income families take up a free breakfast at higher rates and income is separately related to reading scores, so the breakfast gap and the income gap are the same gap seen twice. Nothing in these data says which one moved the score.
Now a variable that fails. Suppose 12 percent of the breakfast eaters are left-handed and 12 percent of the non-eaters are as well. Handedness is spread evenly across the two groups, so it is not associated with the explanatory variable, and whatever it does to reading it cannot account for a difference between them. That is the correction worth keeping, because the wrong version is everywhere: "any variable that could affect the reading score is a confounding variable." No. A variable that affects the response but has no tie to who ate breakfast is an extraneous variable. It adds spread to the scores rather than a lean to the comparison.
The other half of the test fails just as often. Riding the school bus is strongly associated with eating the school breakfast, because bus riders arrive early, but if riders and walkers read alike then bus riding explains none of the gap.
Confounding is a feature of how a study was built, not something you can spot in the numbers. Random assignment attacks the first link by making the treatment groups similar on average on every other variable, measured or not, though in a small experiment chance can still leave a group tilted. Topic 1.13 Experimental Design is where this sits.
Response variable
Variables and data types
A response variable is the outcome an analysis is trying to account for; it supplies the y values and goes on the y-axis of a scatterplot.
The response variable is the outcome the analysis is trying to account for, also called the dependent variable. It supplies the values, sits on the vertical axis, and is what a fitted model predicts, which is why (y-hat) and every residual are measured in the response's units and never in the explanatory variable's. In an experiment it is what you measure after a treatment has been applied.
A nursery fits , where is grams of fertilizer and is plant height in centimeters. A plot given 30 grams has predicted height centimeters. That plant actually measures 27, so its residual is centimeters: three centimeters short, in the response's units, measured vertically.
The wrong sentence is "the response variable goes up 0.6 centimeters for every extra gram." A variable does not go up. At each amount of fertilizer the response has a whole spread of possible heights, and the fitted line traces the mean of those, so what rises by 0.6 is a predicted mean and not any plant; the residual above is one plant's departure from it. Time order does not assign the role either. The response is whichever variable the question is trying to account for, not whichever you happened to measure second.
The response does not have to be numerical. If what you record is whether a patient recovered, yes or no, the response is categorical and the summary is a proportion rather than a mean, which puts the analysis in Unit 3 rather than Unit 5. What stays the same either way is the direction of the question, since the response is the variable being explained.
Linear regression models are topic 5.3 and residuals are 5.4. The two roles are laid out together at explanatory vs response variable.