Econometrics · Chapter 1

What Econometrics Is: Data, Models and Cause

In a summer beach town, the days when the ice-cream shop sells the most cones are also the days when lifeguards make the most rescues. Should the town ban ice cream? Run the summer, reveal what’s hiding in the data, and watch a strong correlation melt away. Then meet sixteen students, each with two possible test scores, and see why a coin flip can answer a question that a mountain of data cannot. This is what econometrics is for: using data to tell cause from coincidence.

The town

How to look

What drives what

Live numbers

Missions

    What you’re seeing

    The strip at the top is the summer, day by day: the temperature (the warm-colored area), the ice-cream cones sold (pink) and the lifeguard calls at the beach (blue). On hot days people buy ice cream, and on hot days people go swimming. Watch the three lines rise and fall together.

    The scatter plot has one dot per day: cones sold across, lifeguard calls up. The pink line is the best-fitting straight line, and the correlation r measures how tightly the dots hug a line, from −1 to +1. In a hot summer it is around 0.8: a strong link.

    “Same temperature” keeps only the days in a narrow temperature band, say 24 to 26 °C. Among days with the same weather, cones and calls have almost nothing to do with each other. “Adjust for temperature” does the same thing with regression: it removes from both cones and calls the part the temperature predicts, and plots what is left.

    The sliders are the town’s hidden rules: how much heat sells cones, how much heat brings swimmers, and whether ice cream itself causes trouble. In the real town that last one is zero. You can set it to anything, then see whether the methods find it.

    What econometrics is

    Econometrics is the use of statistics, economic reasoning and data to measure relationships, test ideas and forecast. It grew up in economics, where most data come from watching the world rather than from controlled experiments, so it is especially good at one hard problem: telling a cause from a coincidence when you can’t run the experiment yourself.

    Two kinds of questions

    Prediction

    What will y be? Next month’s sales, which borrowers will fall behind on a loan, tomorrow’s electricity demand. You don’t need to know why, only what tends to go with what. The ice-cream sales would help predict a busy day for lifeguards.

    Cause and effect

    What would happen to y if we changed x? Does a price cut raise revenue? Does job training raise earnings? Would banning ice cream save swimmers? Here a correlation is not enough: you need to know what would happen in a world where only x changed.

    Most of this course is about the second kind, because it is the harder one and the one decisions depend on. The phrase economists use is ceteris paribus, Latin for “other things being equal”: the effect of changing one thing while holding everything else fixed.

    Kinds of data

    KindWhat it isExample
    Cross sectionMany people, firms or places, observed onceA survey of 60,000 households in one month, like the Current Population Survey the Bureau of Labor Statistics uses for the unemployment rate
    Time seriesOne unit observed over many periods, in orderThe U.S. unemployment rate, month by month since 1948; a store’s daily sales; our town’s summer
    Pooled cross sectionsFresh samples drawn at different timesThe household survey from 2015 and from 2025, with different people each time
    Panel (longitudinal)The same units followed over timeThe Panel Study of Income Dynamics, which has followed the same American families since 1968; every state’s unemployment rate, every year

    The order matters only for time series and panels, where yesterday can affect today. A cross section can be shuffled without losing anything. Chapters 11 and 15 deal with panels and time series; until then we work mostly with cross sections.

    The regression model and the error term

    Almost every method in this course starts from one equation. It says that an outcome y depends on an explanatory variable x and on everything else, lumped into one term u:

    y = β₀ + β₁x + uy: the dependent variable · x: the explanatory variable · β₀, β₁: the parameters we want to learn · u: the error term, all the other things that affect y

    β₁ is the effect we are after. If x goes up by one unit and nothing in u changes, y changes by β₁: Δy = β₁Δx when Δu = 0. That is ceteris paribus written as math. In the town, y is lifeguard calls, x is cones sold, and β₁ is the real effect of ice cream, which is zero.

    The error term is not a mistake. It holds everything else: the temperature, whether it’s a weekend, how many tourists came, luck. Greek letters with no hat are the true values in the population. Later we estimate them from data and put a hat on the estimates: β̂₁ is our estimate of β₁.

    The key question in every chapter is whether the things in u are related to x. If they aren’t, a regression of y on x recovers β₁. Wooldridge writes this condition as the zero conditional mean assumption:

    E(u | x) = 0   “knowing x tells you nothing about the average of everything else”

    In the town it fails badly. Temperature is in u, and temperature is strongly related to cones sold: hot days have high cones and high u. So the line through the dots picks up the weather’s effect and credits it to ice cream. A variable like temperature, which affects both x and y, is called a confounder, and the false link it creates is confounding. Chapter 6 puts an exact number on the damage, the omitted-variable bias.

    Worked example: how much link can the weather fake?

    Suppose each extra degree sells 25 more cones and brings 1.2 more lifeguard calls, ice cream itself does nothing, the temperature varies across the summer with a variance of 36 (a standard deviation of 6 °C), and other things move cone sales with a standard deviation of 40 cones. Then

    • Cov(cones, calls) = 25 × 1.2 × 36 = 1,080, all of it through the weather;
    • Var(cones) = 25² × 36 + 40² = 22,500 + 1,600 = 24,100;
    • the slope of the line is Cov ÷ Var = 1,080 ÷ 24,100 = 0.045 calls per cone, or 4.5 extra calls for every 100 cones.

    That is about what the simulation shows. Every bit of it is the weather. Hold the temperature fixed and the variance of 36 shrinks to almost nothing, and so does the slope.

    Try this: Press ⏭ to finish the summer, then drag “Days observed” up to 368. The cloud gets thicker but the slope stays near 4.5. More data makes a confounded estimate more precise, not more right. Now switch to “Adjust for temperature” and watch the dots glide into a flat cloud.
    Try this: Press “A real effect”: now each 100 cones really do cause 2 extra calls. The raw slope is about 6.5, mixing the real effect with the weather. Adjusting for temperature brings it back to about 2. Regression can find a real effect hiding inside a fake one, as long as the confounder is measured.
    Common mistake: “With enough data, the truth comes out”

    A bigger sample shrinks random error, the wobble from one summer to the next. It does nothing about a systematic error like confounding. With 368 days, the slope ignoring the weather is pinned down very precisely, at the wrong number. Getting the right answer depends on the design, meaning what you compare with what, not on the size of the pile of data.

    Two outcomes for every person

    Here is a sharper way to think about cause and effect, from the statisticians Jerzy Neyman and Donald Rubin. Imagine a tutoring program before an exam. Each student i has two potential outcomes: the score they would get without tutoring, Yi(0), and the score they would get with it, Yi(1). The effect of tutoring on that student is the difference.

    effect on student i = Yi(1) − Yi(0)    ATE = E[Y(1) − Y(0)]the average treatment effect (ATE) is the average of the individual effects over everyone

    The catch, which Paul Holland called the fundamental problem of causal inference: each student either takes the program or doesn’t, so we only ever see one of their two scores. The other is a counterfactual, what would have happened. Below, the dashed boxes with question marks are those missing scores. Tick “Show both outcomes” for the view no real study ever has.

    Who gets tutoring?

    Goals

      Why letting people choose goes wrong

      The obvious estimate compares the average score of those who took the program with the average of those who didn’t. A little algebra splits it into two pieces (Angrist and Pischke, Mostly Harmless Econometrics, section 2.1):

      E[Y | took it] − E[Y | didn’t] = E[Y(1) − Y(0) | took it] + { E[Y(0) | took it] − E[Y(0) | didn’t] }
        observed difference  =  effect on those who took it (ATT)  +  selection bias

      Selection bias asks: would the two groups have differed even with no program at all? When the students who are furthest behind sign up, because they have the most to gain, their scores without tutoring were low to begin with. The selection bias is large and negative, and it can swamp a real benefit: the program can look harmful when it helps everyone. When keen, strong students sign up instead, the bias flips sign and the program looks like a miracle.

      Worked example: four students
      StudentY(0) withoutY(1) withEffect
      Ana6072+12
      Bo6575+10
      Cy8084+4
      Di8587+2

      The true average effect is (12 + 10 + 4 + 2) ÷ 4 = +7 points. Suppose Ana and Bo, who gain the most, sign up. We see their scores with tutoring (72, 75; average 73.5) and Cy’s and Di’s without (80, 85; average 82.5). The comparison says 73.5 − 82.5 = −9. Tutoring looks harmful.

      Split it up: the effect on those who took it is (12 + 10) ÷ 2 = +11, and the selection bias is (60 + 65) ÷ 2 − (80 + 85) ÷ 2 = 62.5 − 82.5 = −20. Check: +11 − 20 = −9.

      Now flip coins so that two of the four are tutored. There are six ways to pick two, and the comparison they give is −9, +3, +7, +7, +11 and +23. Any one of them can be far off, but their average is 42 ÷ 6 = +7, exactly the true effect.

      Why a coin flip works

      A coin doesn’t know who is behind or who is keen. So who gets the program is unrelated to the students’ potential outcomes, and the two groups are alike in every way, on average, except the program. Then E[Y(0) | took it] = E[Y(0) | didn’t], the selection bias is zero, and the simple comparison is an unbiased estimate of the average effect. “On average” is doing real work: in any one class, luck can put more strong students on one side. The histogram shows that spread, and Chapter 3 shows how to measure it.

      Try this: Choose “Coin flip” and press “Flip 1,000 times”. The comparisons pile up into a hill centered on the true effect (the green line), far from where self-selection put it (the red line). Then press “New class” and do it again: a different class, the same lesson.

      Experiments and observational data

      A randomized experiment lets chance decide who is treated. Medicine has run randomized clinical trials since the mid-1900s, and economists use them too. In Tennessee’s Project STAR, from 1985 to 1989, kindergarten students and their teachers were randomly assigned to small or regular-size classes. In 2008 Oregon held a lottery for a limited number of places in its Medicaid health insurance program, which let researchers compare winners and losers who were alike in every way but luck. Online businesses run randomized “A/B tests” every day, showing visitors one of two versions of a page at random.

      Observational data come from watching what people choose. Most economic data are like this: we can’t randomly assign people to go to college, cities to raise the minimum wage, or countries to have recessions. Econometrics is the toolbox for getting as close as possible to an experiment anyway: controlling for confounders (Chapters 4 to 9), finding a source of variation that acts like a coin flip (instrumental variables, Chapter 10), comparing changes over time (panels and difference-in-differences, Chapters 11 and 12), and comparing people just either side of a cutoff (regression discontinuity, Chapter 13).

      Worked example: does a college degree pay?

      In 2024, full-time workers aged 25 and over with a bachelor’s degree had median weekly earnings of $1,543; those with only a high school diploma, $930 (Bureau of Labor Statistics, Current Population Survey). The gap is $613 a week, about 66% more, or roughly $32,000 a year.

      Is $613 a week the effect of a degree? Write it the same way as the tutoring example: the observed gap = the effect of the degree on graduates + selection bias. People who finish college may differ from those who don’t in ways that would affect their earnings anyway: family background, health, where they live, persistence. Those differences live in u. The gap is a fact; the effect of a degree is a harder question, and economists have attacked it with twins, with lotteries and with quirks of school-leaving laws. You will meet some of those methods in Chapter 10.

      A short history, and the people

      A new word. The Norwegian economist Ragnar Frisch helped found the Econometric Society in 1930 and edited its journal, Econometrica, from its first issue in 1933. He wanted economics to join theory, mathematics and statistics. The Dutch economist Jan Tinbergen built the first statistical model of a whole national economy, for the Netherlands, in 1936. In 1969 the two shared the first Nobel memorial prize in economics.

      Probability enters. In 1944 Trygve Haavelmo, a student of Frisch, published “The Probability Approach in Econometrics” as a supplement to Econometrica. He argued that economic data should be treated as draws from a probability model, which is what lets us ask how precise an estimate is. It won him the Nobel prize in 1989.

      Two outcomes per person. Jerzy Neyman wrote down potential outcomes in 1923, for field experiments in agriculture. R. A. Fisher made random assignment the foundation of experiments in The Design of Experiments (1935). Donald Rubin extended potential outcomes to observational studies in 1974, and Paul Holland named the fundamental problem of causal inference in 1986.

      The credibility revolution. From the 1990s, economists such as David Card, Joshua Angrist and Guido Imbens pushed the field toward “natural experiments”: real events that assign something almost at random. In 2021 they shared the Nobel prize, Card “for his empirical contributions to labour economics” and Angrist and Imbens “for their methodological contributions to the analysis of causal relationships.”

      Where you see it

      Business. Do ads cause purchases, or do they just reach people who were going to buy anyway? That is selection bias, and it is why large online companies test ads and page designs at random. When Henry Ford doubled pay to five dollars a day in 1914, quitting dropped, but a lot else changed that year too; economists Daniel Raff and Lawrence Summers later studied whether the pay itself did it (the case). Costco pays well and keeps its staff, but do high wages cause loyalty, or do well-run firms both pay more and keep people? (the case).

      Policy. Job training, health insurance, class sizes, the minimum wage: each is a cause-and-effect question with billions of dollars riding on the answer, and each has been studied with experiments or natural experiments.

      Science and health. Randomized trials of new medicines use the same logic as the coin-flip classroom. Observational health studies face the ice-cream problem: people who take vitamins differ in many ways from people who don’t.

      Daily life. “Students who use the tutoring center get lower grades.” “People who own fitness trackers are healthier.” Before believing either, ask: who chose this, and would they have differed anyway?

      The ideas this course builds

      Probability (Ch. 2–3)

      Data are random draws, so estimates are random too. Distributions, the central limit theorem, confidence intervals and tests tell us how much to trust a number.

      Regression (Ch. 4–9)

      Fit a line, then many: hold other things fixed with multiple regression, and learn what breaks it, from omitted variables to bad standard errors.

      Natural experiments (Ch. 10–13)

      When you can’t control for everything, find variation that acts like a coin flip: instruments, panels, difference-in-differences and cutoffs.

      Advanced tools (Ch. 14–17)

      Yes-or-no outcomes and maximum likelihood, time series and forecasting, models of whole economies, and modern causal inference with machine learning.

      Practice

      1. What kind of data? (a) The U.S. monthly inflation rate from 1960 to 2025. (b) The prices of 400 houses sold in one city in May. (c) The test scores of the same 2,000 students in grades 3, 4 and 5.

        Show the answer

        (a) A time series: one unit, the U.S., observed month after month in order. (b) A cross section: many houses, observed once. (c) A panel: the same students followed over time.

      2. Prediction or cause? (a) A bank wants to know which applicants will repay a loan. (b) A city wants to know whether new bike lanes cut car traffic. (c) A grocery chain wants next week’s demand for milk. (d) A school board wants to know whether starting school later raises grades.

        Show the answer

        (a) Prediction: the bank only needs to rank applicants, not know why. (b) Cause: “what would traffic be with and without the lanes?” (c) Prediction. (d) Cause. For (b) and (d), a correlation in existing data could easily mislead, because cities and schools that make these changes may differ in other ways.

      3. Find the confounder. Across U.S. cities, those with more police officers per person tend to have more crime. Give two reasons this doesn’t show that police cause crime.

        Show the answer

        First, a confounder: big, dense cities tend to have both more crime and more police. Second, reverse causation: cities with a crime problem hire more police, so crime causes police, not the other way around. A better design compares the same city before and after a change in police that wasn’t caused by crime itself, such as a hiring program funded from outside.

      4. Potential outcomes. Six workers have these earnings (in $1,000 a year) without and with a training course: (30, 36), (32, 37), (35, 38), (40, 42), (45, 46), (50, 50). The first three take the course. Find the true average effect, the simple comparison, the effect on those trained and the selection bias.

        Show the answer

        Effects: 6, 5, 3, 2, 1, 0. ATE = 17 ÷ 6 = 2.83. Comparison: trained average of Y(1) = (36 + 37 + 38) ÷ 3 = 37; untrained average of Y(0) = (40 + 45 + 50) ÷ 3 = 45; difference −8. ATT = (6 + 5 + 3) ÷ 3 = 4.67. Selection bias = (30 + 32 + 35) ÷ 3 − 45 = 32.33 − 45 = −12.67. Check: 4.67 − 12.67 = −8.

      5. What is in u? In wage = β₀ + β₁ education + u, name three things in u. For each, is it likely related to education? If so, what does that mean for the slope of a simple line through the data?

        Show the answer

        Examples: experience, ability or persistence, family background, the local job market, health. Experience is probably negatively related to education (years in school are years not working). Ability and family background are probably positively related. If anything in u is related to education, E(u | education) ≠ 0, and the line’s slope mixes the effect of education with the effects of those things. With ability, the slope would likely overstate the effect of schooling.

      6. The weather’s fake slope. In the town, each degree adds a cones and b calls; temperature has variance V; other things move cones with variance σ²; ice cream does nothing. Show that the slope of calls on cones is abV ÷ (a²V + σ²). What happens as V → 0? And as σ² → 0?

        Show the answer

        Cones = a·T + other, calls = b·T + other (independent). Cov(cones, calls) = ab Var(T) = abV; Var(cones) = a²V + σ². Slope = Cov ÷ Var. As V → 0 the slope goes to 0: if the weather doesn’t vary, it can’t create a link (the “Steady weather” preset). As σ² → 0 the slope goes to b/a: cones become a perfect thermometer, and the slope just converts “cones” back into degrees and then into calls. With a = 25 and b = 1.2, that limit is 4.8 calls per 100 cones.

      7. How lucky is a coin flip? In the classroom, the comparisons from coin-flip classes of 16 students have a standard deviation of about 5 points. Roughly what would it be with 160 students, and why?

        Show the answer

        About 5 ÷ √10 ≈ 1.6 points. Each group’s average is a mean of about half the students, and the standard deviation of a mean shrinks like 1 ÷ √n. Ten times the students means √10 ≈ 3.2 times less luck. Randomization removes the bias; a bigger sample shrinks the luck. Chapter 3 makes this precise.

      How the interactives work

      The town. Each day’s temperature follows a summer curve plus noise: T = 22 + A(sin πs − 0.6) + noise, where s runs from 0 to 1 over a 92-day summer, A is the weather swing, and T stays between 10 and 40 °C. Cones sold = 120 + a(T − 15) + noise with a standard deviation of 40, never below zero. Lifeguard calls are a Poisson count with mean 1 + b(T − 10) + θ × cones ÷ 100, so the regression of calls on cones and temperature is exactly right and the real effect is θ. Weather, sales and calls use three separate random streams, so moving a slider changes each day smoothly instead of reshuffling the summer. All the data are simulated; no real town is shown.

      The estimates. “Same temperature” fits a line to the days inside the band. “Adjust for temperature” regresses calls on cones and temperature by ordinary least squares, with the shared, tested statistics library of this course. The plotted dots are the parts of cones and calls the temperature doesn’t predict; by the Frisch–Waugh theorem (Chapter 6), the slope through them equals the regression coefficient on cones.

      The classroom. Scores without tutoring are drawn around 70 (standard deviation 11, between 45 and 95), and the gain is 3 + 0.4 × (80 − score) + noise, never below zero and never past 100, so students who are behind gain more. “They choose” enrolls the eight with the biggest gains, “keen” the eight with the highest scores without tutoring, and “coin flip” gives each student a fair coin (flipping again in the rare case that a group is empty).

      How it was checked (node tests):

      • 2,000 simulated hot summers: average correlation 0.84; slope ignoring the weather 4.53 calls per 100 cones; slope controlling for temperature −0.001 on average (sd 1.08), with its 95% interval covering the truth (zero) 94.3% of the time.
      • With a real effect of 2 per 100 cones (150 days, 1,000 runs): adjusted estimate 1.97 on average, coverage 95.2%; the raw slope 6.53.
      • Steady weather (swing ±1 °C): average correlation 0.26; with heat not driving calls: 0.00.
      • The slope through the adjusted dots equals the multiple-regression coefficient to 10⁻¹⁵.
      • The classroom, checked exactly over all 65,534 coin-flip assignments: the average comparison equals the true effect (+8.3125) to six decimals, with a standard deviation of 5.2. Self-selection gives −3.875 = ATT (+11.5) + selection bias (−15.375).
      • The Poisson sampler: mean and variance within 0.2% of λ in 200,000 draws.

      Check yourself

      1. An online store shows each visitor one of two checkout pages, chosen at random, and compares how often people buy. This is…

        Show the answer

        Chance decides who sees which page, so the two groups of visitors are alike on average except for the page. That is a randomized experiment, an A/B test.

      2. Across summer days, ice-cream sales and lifeguard calls have a correlation of 0.84. The best explanation is…

        Show the answer

        Temperature is a confounder. Among days with the same temperature, the link disappears.

      3. In y = β₀ + β₁x + u, the error term u is…

        Show the answer

        It collects every other influence on y. The trouble starts when some of them are related to x.

      4. Why does assigning a program by coin flip remove selection bias?

        Show the answer

        Randomization makes treatment independent of Y(0) and Y(1). The groups can still differ by luck in a single draw, but not systematically.

      5. In the confounded town, you observe four summers instead of one. The slope of calls on cones, ignoring the weather, will…

        Show the answer

        More data shrinks random error but not confounding. The slope settles near the same wrong value.

      6. A survey that interviews the same 5,000 households every year is…

        Show the answer

        The same units followed over time make a panel. New households each year would be pooled cross sections.

      Sources

      • J. M. Wooldridge, Introductory Econometrics: A Modern Approach, 7th ed. (Cengage, 2020), Chapter 1 (the nature of econometrics, data structures, causality and ceteris paribus) and Chapter 2 (the simple regression model and the zero conditional mean assumption).
      • J. D. Angrist and J.-S. Pischke, Mostly Harmless Econometrics (Princeton University Press, 2009), Chapter 2 (the experimental ideal and selection bias); and Mastering ’Metrics (2015), Chapter 1.
      • J. H. Stock and M. W. Watson, Introduction to Econometrics, 4th ed. (Pearson, 2019), Chapter 1.
      • U.S. Bureau of Labor Statistics, Education pays, 2024 (median weekly earnings by education, Current Population Survey).
      • MIT OpenCourseWare, 14.32 Econometrics (Spring 2007).
      • T. Haavelmo, “The Probability Approach in Econometrics,” Econometrica 12, supplement (1944). D. B. Rubin, “Estimating Causal Effects of Treatments in Randomized and Nonrandomized Studies,” Journal of Educational Psychology 66 (1974). P. W. Holland, “Statistics and Causal Inference,” Journal of the American Statistical Association 81 (1986). D. M. G. Raff and L. H. Summers, “Did Henry Ford Pay Efficiency Wages?” Journal of Labor Economics 5 (1987).
      • Wikipedia, List of Nobel Memorial Prize laureates in Economic Sciences (prize years and citations).
      Saved on this device only.
      @teddyrookbook GitHub