Regression Foundations

Control Variables

A reading guide for lecture p-06 — two kinds of control variable, and why one is nearly free while the other is expensive.

Section one

Key concepts

The definitions and results the slides depend on, each stated as a claim.

Key concepts

The driving question.

Why are slopes and standard errors changing when we add “control” variables?

A Ballentine diagram is a picture of the variance partition.

Two overlapping circles, one for Y and one for the policy variable X1, divided into three regions:

  • the overlap — the part of Y that X1 explains, i.e. cov(X1, Y)
  • the Y-only region — the residual, everything left unexplained
  • the X1-only region — variation in the treatment that does not move Y

The slope and the standard error are both ratios of regions.

Using the labels on the two-type slides (A = residual, B = overlap, C = X1 only):

slope = cov(X1, Y)var(X1) = BB + C     SEb1AB + C

Both share the denominator var(X1). The slope uses the overlap on top; the standard error uses the residual on top.

There are three ways to shrink the standard error.

  1. Increase the sample size
  2. Explain more variance of Y — shrink the residual
  3. Increase the variance of X — widen the treatment range

The second is what a control variable can buy you. The third is a design choice: assigning caffeine over 0–1000mg instead of 0–500mg increases var(X).

First type: a control uncorrelated with the policy variable.

Example: teacher quality, when studying class size.

  • It overlaps Y only — it eats into the residual.
  • slope: B/(B+C) → B/(B+C)unchanged
  • standard error: A/(B+C) → a/(B+C)smaller

In the worked example the slope moves from −4.22 to −3.91 and the standard error falls from 0.18 to 0.03 — six times smaller.

Second type: a control correlated with the policy variable.

Example: socio-economic status, when studying class size.

  • It overlaps both circles — it eats into the explained overlap.
  • slope: B/(B+C) → b/(b+c)changes, up or down
  • standard error: A/(B+C) → a/(b+c)usually larger

In the worked example the slope moves from −4.22 to −2.67 and the standard error rises from 0.18 to 1.63 — almost ten times larger.

Control variables target either the Explained SS or the Residual SS.

That single sentence is the whole lecture.

Section two

Key relationships

The mental map. How the pieces connect, and how to read the deck.

Every control variable eats one of the two halves

p-02 split the variance of Y into an explained piece and a residual piece. This lecture asks a single question about that split: when you add a new variable, which piece does it come out of?

There are only two answers, and they have opposite consequences:

The control is…It removesSlopeStandard error
uncorrelated with X1 residualunchangedsmaller
correlated with X1 explained overlapchangeslarger

Everything else in the deck — the diagrams, the regression tables, the coefficient plots — is a demonstration of those two rows.

Why the first type is nearly free

A control that predicts Y but has nothing to do with your treatment sits on top of the Y circle without touching the overlap. Teacher quality explains test scores; it is essentially uncorrelated with class size (the deck’s pairs plot shows −0.057).

Adding it shrinks the residual region and leaves both the numerator and denominator of the slope untouched. You get the same estimate with a tighter interval — the second of the three levers from p-03, cashed in.

The scatterplot pair on slide 27 shows this beautifully: the raw class-size vs. test-score cloud is diffuse, and the same plot with teacher quality residualised out is a tight band. Nothing about the relationship changed; the noise around it was removed.

This is the free lunch of regression. If you can find variables that predict your outcome and are unrelated to your treatment, add them.

Why the second type is expensive

A control correlated with your policy variable overlaps both circles, and the region it removes is the part they share — the very overlap that identifies your slope.

Two things happen at once, and both are bad for precision:

In the worked example, socio-economic status correlates with class size at −0.99. Almost nothing is left of class size once SES is accounted for, which is why the standard error explodes by a factor of ten and the coefficient collapses toward zero.

The trap: this deck shows the cost, not the decision

It would be easy to read slides 17 and 18 as “do not add correlated controls.” That is exactly the wrong lesson, and the next lecture is the correction.

A correlated control might be necessary. If SES genuinely causes both class size and test scores, then leaving it out gives you a biased estimate — the class-size coefficient would be absorbing SES’s effect. p-07 (omitted variable bias) is about when you must pay this price.

So hold the two lectures together:

And recall p-05’s pair: unbiased and efficient. A correlated control trades efficiency for unbiasedness. Whether that is a good trade depends entirely on whether the variable belongs in the model, which is a question about the world, not about the data.

Why experiments make this problem disappear

The coffee-study slides reframe the caffeine example as observational: caffeine is no longer assigned, it is chosen. That is what creates the possibility of correlated controls in the first place.

Under random assignment, the treatment is by construction uncorrelated with everything else. Every available control is therefore a type-one control: it can only shrink the residual, never shift the slope. That is a large part of why experiments are valuable, and it is the subject of the randomization-breaks-OVB slides.

Design and the third lever

Slide 12 is the one that is easy to skip and worth pausing on. Assigning caffeine across 0–1000mg rather than 0–500mg makes the X1 circle bigger, which enlarges the denominator of both the slope and the standard error.

You cannot do this after the fact. Unlike adding controls, widening the range of the treatment is a decision made before data collection — which is why the third lever belongs to research design rather than to modelling.

A note on the diagrams’ labels. The deck uses A, B, C in two different ways. On the early slides and the R2 slide, A is the overlap and B is the residual. On the two-type slides, A is the residual and B is the overlap. The regions and the logic are identical; only the letters swap. Read each diagram on its own terms rather than carrying the letters across.

How to read the slides

SlidesWhat they are doingWhat to take away
2The driving questionWhy do slopes and standard errors move?
3–7Ballentine diagrams introducedThree regions; the slope is a ratio of two of them.
8–9Residual and R2Same overlap can mean different R2 if var(Y) differs.
10–12The three levers, in region termsSlide 12 on widening var(X) is a design point.
13–14The two types, and a pairs plotTeacher quality vs class size is −0.057; SES is −0.99.
15–16Type one: uncorrelatedSlope steady, standard error six times smaller.
17–18Type two: correlatedSlope collapses, standard error ten times larger.
19–24The coffee studyObservational data is where correlated controls come from.
25–28Class-size example worked visuallyResidualised scatterplots: the noise, removed.
29Coefficient plots of the three modelsModel 2 tightest; Model 4 crosses zero.
30–32R2, and removing the explained SSClosing the loop back to the partition.

This deck has no closing checklist slide. The question on slide 2 is the checklist.

Section three

What should be clear in my mind?

The deck opens with one question rather than closing with a list.

  1. Why do slopes change when we add controls? Because a control correlated with the policy variable takes over part of the shared overlap. The slope is recomputed on what remains, so it moves — up or down, depending on the direction of the correlations.
  2. Why do standard errors change when we add controls? Because both pieces of SEb1 ≈ residual / (n · var(X1)) can move. An uncorrelated control shrinks the numerator (good). A correlated control shrinks the denominator (bad), usually by more.
  3. Which kind of control is which? Look at the correlation between the control and your policy variable, not between the control and Y.
  4. When is a bigger standard error worth accepting? When the control is needed to avoid bias — the subject of p-07.

Key takeaways