Block 3: Potential outcomes: a tutoring class
Week 3 · Causality I · Imai §2.3 · about 5 min
Run each cell with Run Code, look at the output, then answer the question at the end of the block. Every cell is editable; Start Over resets it. Errors are information: read them.
A tutoring class for graduate students: did the class help? We made up the data so that, unlike in real life, we know both potential outcomes for each of 100 students: y0 (exam score without the class) and y1 (score with it). signed_up shows who actually joined the class, coin who a coin flip would assign to it. (The setup runs in the background.)
1. The true effect
The effect for one student is y1 - y0. Its average is the true ATE.
2. Naive comparison: students who signed up vs. those who did not
For the students who signed up we see y1; for the others we see y0.
3. Random assignment: a coin flip decides
Same calculation, but the groups come from coin instead of signed_up.