Block 5: Central limit theorem and election prediction
Week 10 · Probability II · Imai §6.4.2–6.4.3 · about 5 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. The central limit theorem
CLT: the standardized sample mean is approximately N(0, 1), whatever the distribution of the data, if n is large. We repeat 1,000 times: draw 1,000 values from Uniform(0, 1), compute the sample mean, standardize it.
2. A probability model for the election
Each state: a poll of n = 1,000 voters, Obama’s true two-party share p. Obama wins the state’s electoral votes (EV) if more than n/2 respondents choose him. Read the loop: what is draws? Why draws > n / 2?
Conclusion: Where is the center of the distribution of Obama's electoral votes, and where is the actual result (364)?
The mean is 352; quartiles 340 and 364; the standard deviation is about 16 votes. The z-scores of the sample means follow the standard normal although the data are uniform: the CLT. The model is sensible: the actual result is a typical outcome.