Block 5: Difference in means and margin of error
Week 11 · Uncertainty I · Imai §7.1.3 · about 3 min
NoteHow this works
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.
1. Difference in means with a confidence interval
The resume experiment from Week 3: callback rates for white vs. black names.
2. How large a sample do you need?
Sample size for a margin of error (MoE): \(n = 1.96^2\, p(1-p) / \text{MoE}^2\). The worst case is p = 0.5.
Conclusion: Does the 95% interval for the callback gap contain 0? And how many respondents give a margin of error of 3 points (p = 0.5)?
Difference 3.2 points, s.e. 0.78 points, 95% CI [1.7, 4.7]: zero is outside. n = 1.96^2 x 0.25 / 0.03^2 = 1,067; for +-1 point you need 9,604. Halving the margin of error costs four times as many respondents.