Post-stratification: Repairing a Biased Sample

When who you asked isn't who you care about, reweight until it is.

The Xbox election poll

In the run-up to the 2012 US presidential election, Wang, Rothschild, Goel and Gelman collected hundreds of thousands of opt-in survey responses through the Xbox gaming platform — about as unrepresentative a political sample as could be designed on purpose: overwhelmingly male, overwhelmingly young. Taken at face value the raw numbers were junk; they “predicted” the wrong winner outright.

Then the researchers did something almost insolently simple in concept. They split the respondents into thousands of small demographic cells (age × sex × race × state × education ×…), took each cell's answer, and recombined the cells weighted by how common each cell is in the actual electorate — not in the Xbox sample. The reweighted estimates tracked the campaign's final weeks to within about a percentage point of the eventual result, outperforming many conventional telephone polls (Forecasting elections with non-representative polls, International Journal of Forecasting, 2015).

The bargain. A biased sample is not useless — it is a collection of small, internally honest samples of the wrong sizes. If young men who answer Xbox polls support candidates like young men generally do, then the sample's only sin is proportions, and proportions can be fixed with a weighted sum. That conditional — if — is the entire assumption, and the interactive below lets you watch it hold and fail.

Interactive: skew the sample, then repair it

A toy electorate with four demographic cells (age band × gender). Each cell has a known population share (green) and a true support rate for some proposal; the population truth is $0.519$. Drag the slider to make the sample increasingly “gamer shaped” (orange) — young men flood in, older women all but vanish — and watch the naive sample mean drift away from the truth. Then choose what to post-stratify on.

full gamer skew
NAIVE SAMPLE MEAN
POST-STRATIFIED
POPULATION TRUTH
0.519
REMAINING ERROR

What the toggles teach. Stratifying on both variables repairs the full-skew sample completely (in expectation) — every scrap of bias ran through age and gender, so weighting them fixes it. Stratify on gender alone and a residual error of $\approx 0.08$ survives: within the men, young men are still over-represented, and no gender weight can see that. The repair only reaches as far as the variables you stratify on — bias flowing through anything else passes straight through. That is the method's one assumption, made visible.

From weighted cells to Mister P

Real applications hit an immediate snag: stratify on enough variables to make the assumption credible and the cells go thin (the seeded sample above already puts only a few dozen people in its rarest cell — imagine age × sex × race × education × state). The fix is to stop taking each cell's raw mean and instead fit a multilevel model that lets sparse cells borrow strength from their neighbours — partial pooling, exactly the hierarchical idea from the Bayesian tradition — and then post-stratify the model's predictions. The combination is multilevel regression and post-stratification: MRP, or affectionately, Mister P (Gelman & Little, 1997). It is what the Xbox study actually ran, and it has since become a standard tool for constituency-level election forecasting.

An editorial aside. It says something about incentives that this machinery is famous for election forecasting — arguably one of the least valuable things statistical inference can do, since the election will shortly reveal its own answer at no analytic cost. The same machinery answers questions that never announce their own answers: estimating smoking prevalence, vaccine uptake or depression rates for small areas and subgroups no survey could ever sample densely — the small-area estimation behind tools like the CDC's local health estimates. Same maths; considerably better use of it.

Still not magic. Post-stratification needs the population cell counts to be known (a census or equivalent), and the within-cell-representativeness assumption never becomes testable from the sample alone — the gender-only toggle above shows how silently it can fail. Weighting repairs measured bias only.