ECON 410 · Econometrics II: Causal Methods and Time Series
Randomized Experiments
Flipping a coin to decide who gets a treatment is the cleanest way to learn what the treatment really does.
Key takeaways
- Random assignment makes the treated and untreated groups alike, on average, in everything including traits nobody measured.
- Because the groups start alike, a simple difference in average outcomes estimates the average treatment effect.
- Chance still creates noise, so every experiment needs a standard error and a confidence interval.
- People sometimes ignore their assignment, so economists often report the effect of being offered treatment.
- Experiments can be costly, unethical or hard to generalize, which is why other designs exist.
Imagine you own a bike shop and you wonder whether emailing a 10% coupon makes customers spend more. You could email the coupon to your best regulars, watch their sales jump, and declare victory. But your best regulars were going to spend a lot anyway. You would be fooling yourself.
Now suppose you hand the decision to a coin. Heads, a customer gets the coupon. Tails, she does not. Nobody, including you, gets to choose. A month later you compare the two piles. This small trick, giving up control on purpose, solves the problem from the potential outcomes framework. This lesson shows why it works, how to read the results, and where it still goes wrong.
Why a coin fixes selection bias
Recall the trouble. A plain comparison mixes the real effect with selection bias: the groups differed before treatment began. The bias comes from the way people ended up treated, such as choosing it or being picked for it.
Random assignment cuts that link. If a coin decides who is treated, then a customer's coupon status has nothing to do with her taste for bikes, her income, her mood or anything else. The two groups are not identical person by person. But with enough people, they look the same on average in every trait, even ones you never thought to measure. That last part is the magic. A statistician can adjust for traits she measures. Only a coin handles the ones she cannot.
Randomization does not guarantee a perfect split in any one study. With only ten people you could get an unlucky draw. The larger the sample, the closer the groups are likely to be.
The coin flip is the step that separates an experiment from an ordinary comparison.
Sam's coupon experiment, with numbers
Picture Sam, who owns a bike shop with 400 customers on his email list. He randomly assigns 200 to receive a coupon and 200 to receive nothing. The 200 who get nothing are the control group, the people who stand in for the world without treatment. The 200 who get the coupon are the treatment group.
First Sam checks that the coin did its job. He looks at last year's spending, which was set before the experiment. This is a balance check.
| Trait before the experiment | Control | Treatment |
|---|---|---|
| Average spending last year ($) | 39 | 38 |
| Share who live within five miles | 61% | 63% |
| Average years as a customer | 3.1 | 3.0 |
The groups look very similar. A few dollars of difference is what luck alone would produce. If the balance table had shown treated customers spending twice as much last year, Sam would suspect his coin flip was broken.
Next he compares what happened during the experiment month.
Average spending, treatment group: $46
Average spending, control group: $40
Estimated effect = 46 − 40 = $6 per customer per month Because the groups started alike, the $6 gap is the estimated average treatment effect: the average change in spending caused by the coupon. No fancy statistics were needed for the estimate itself. That simplicity is the main reason economists love experiments.
The $6 gap estimates what the coupon caused, since a coin flip decided who got it. Hypothetical example: the numbers are made up to show the method, not a quote or an average.
Is $6 real, or just luck?
Even with a perfect coin, a different flip would give different groups and a slightly different gap. So Sam needs a measure of how much his estimate would wobble. That measure is the standard error.
Suppose, to keep the arithmetic clean, that spending in each group has a standard deviation of $30. The standard error of a difference between two group averages is the square root of the sum of each group's variance divided by its size.
Variance of each average = 30² ÷ 200 = 900 ÷ 200 = 4.5
Standard error = √(4.5 + 4.5) = √9 = 3
95% interval ≈ 6 ± 1.96 × 3 = 6 ± 5.88, or about $0.12 to $11.88 Sam's interval barely excludes zero. The coupon probably helps, but he cannot pin the effect down tightly. A bigger experiment would shrink the standard error. This is the same logic as in a confidence interval for a single average, just applied to a difference.
The takeaway is that a randomized result should come with its uncertainty. A study that says "$6" with no interval hides how much luck could be involved.
When people ignore the coin
Now a complication. Of the 200 customers Sam emails, suppose only half ever open the message. The other half never see the coupon. Meanwhile, the control group cannot use a coupon they never got. What should Sam compare?
His first instinct might be to compare only the customers who opened the email with the control group. That would bring selection bias back in through the side door, because people who open emails are not like those who ignore them. The coin made the assigned groups alike. It did not make the openers alike.
So the safe habit is to compare by assignment, no matter what people did afterward. This is called the intent-to-treat effect: the average effect of being offered the treatment. In Sam's case it is the $6 gap, and it is a perfectly good answer to the question "what happens if I send this email to everyone?"
If you want the effect on people who actually opened the email, you need a further assumption. Suppose, as a made-up example, that only openers could possibly be affected. Then the $6 average gap came from half the group, so the effect on openers would be about 6 ÷ 0.5 = $12. This clever step, scaling the effect of an offer by how many took it up, is the core of instrumental variables, which a later lesson develops carefully.
Real experiments, and where they run out of road
Experiments are common in tech and increasingly common in economics. Online firms run thousands of small tests, such as two versions of a web page shown to randomly chosen visitors. In 2008, Oregon had limited space in a Medicaid expansion and used a lottery to choose who could apply, which gave researchers a rare chance to study health insurance with random assignment. In 2019 the Nobel prize in economics went to Abhijit Banerjee, Esther Duflo and Michael Kremer for using experiments to study ways of fighting poverty.
Still, experiments have limits worth knowing:
- Ethics. You cannot randomly assign people to smoke, drop out of school or lose their jobs. Some questions can never be tested with a coin.
- Cost and scale. Running a large experiment takes money and time. A test in one town may not tell you what happens nationally, when prices and wages adjust.
- External validity. Results from Sam's customers may not carry over to another shop's customers, or to next year. Good studies describe who was in the sample.
- Attrition. If people drop out of the study, and the dropouts differ between groups, balance can break after the coin flip.
- Spillovers. If treated customers tell control customers about the coupon, the control group is no longer clean.
- Behavior from being watched. People sometimes act differently because they know they are in a study.
A checklist for reading any experiment
Next time you see a headline built on an experiment, run through a few questions. They take a minute and filter out most weak claims.
Good reports let you check each step; weak ones ask you to trust them.
Pay special attention to the sample. If Sam's 400 customers were all long-time regulars, his $6 may say little about new shoppers. Also check the timing. A one-month result for a coupon may fade, or it may only pull spending forward from later months. A study that follows people for a year tells you more than one that looks at a single month.
Finally, look at the size of the effect compared with the cost. A $6 gain per customer is worth having only if the coupon costs less than $6 in lost margin. An effect can be real and still not worth buying. That judgment belongs to the decision maker, and the experiment's job is to supply an honest number for it.
A common mistake: trusting a "natural" comparison as an experiment
Words like "experiment" get used loosely. A company that rolls out a feature to its keenest users first has not run a randomized experiment, even if it measured carefully. A school that offers a program to volunteers has not either. The test is simple: did chance, and only chance, decide who got treated? If a human made the choice, selection bias is back, and you will need the methods in selection bias and matching or one of the other designs in this course.
Randomization itself can also be done badly. Letting a clerk "just pick" names, or assigning by the first letter of a last name, feels random but may not be. Even a rule like "odd birthdays get the coupon" can hide patterns. A computer's random number generator, or a public lottery, is the safer tool, because nobody can tilt it. When a study explains exactly how its draw was made, that detail is a good sign.
Words to know
Randomized experiment a study in which chance decides who receives the treatment.
Treatment group the people assigned to receive the treatment.
Control group the people assigned not to receive it, who stand in for the world without treatment.
Balance check a comparison of pre-treatment traits across groups to confirm that randomization worked.
Standard error a measure of how much an estimate would vary from one sample to another.
Intent-to-treat effect the average effect of being assigned or offered treatment, whether or not people took it up.
Attrition people leaving a study before outcomes are measured, which can unbalance the groups.
Check yourself
- Why does random assignment remove selection bias, even for traits the researcher never measured?
- In an experiment, the treatment group averages $52 and the control group averages $47. What is the estimated treatment effect?
- Two groups each have 100 people and a standard deviation of 20 in the outcome. What is the standard error of the difference in averages?
- Sam's balance check shows treated customers spent $38 last year and control customers $39. Should he worry? Explain why or why not.
- Why is it a mistake to compare only the people who opened the coupon email with the control group?
- Name one reason a successful experiment in one town might not carry over to the whole country.
Show the answers
- A coin ignores every trait, so with enough people the groups match on average in all of them, measured or not.
- 52 − 47 = $5.
- Each variance is 20² ÷ 100 = 400 ÷ 100 = 4, so the standard error is √(4 + 4) = √8 ≈ 2.83.
- Probably not, since a $1 gap is the kind of difference luck produces and the groups look alike on the other traits too.
- Openers differ from non-openers in ways tied to spending, so that comparison reintroduces selection bias; compare by assignment instead.
- Possible answers: the town's people differ from the nation's, or a national rollout changes prices and wages in ways a small test did not.