Written and maintained by CASRAI Editorial Board
Last updated
Survey weighting is not one adjustment — it is three, applied for three different reasons, usually in this order. Design weights correct for the fact that not everyone in your sampling frame had the same probability of being selected. Post-stratification corrects for the fact that, even after design weighting, your weighted sample’s composition still does not match known population totals on one or more variables. Raking (iterative proportional fitting) does the same job as post-stratification when you know the population margins for several variables separately but do not know their joint distribution — the cross-tabulated population table post-stratification actually needs. Confusing these three, or running only the first when a survey needs all three, is one of the more common gaps between a methods section and what the estimator actually did.
The three stages, in the order they’re normally applied
- Design weights undo unequal selection probability built into the sample design itself — stratified oversampling of a small subgroup, a multi-stage cluster design, or a list-assisted frame where some units appear more than once.
- Post-stratification undoes the mismatch, after fielding, between your weighted respondents’ composition and a population total you actually know for a set of cells (e.g., age × sex from a census or population register).
- Raking does the same corrective job as post-stratification, but for the case where you know the population’s separate margins for several variables (age; region; education) without knowing the full cross-tabulated population table linking them.
All three multiply together into one final weight per respondent. None of them is optional simply because you did another one — a survey can need design weights and post-stratification and no raking, or design weights and raking with no separate post-stratification step, depending on what population information is actually available.
Design weights: correcting unequal selection probability
A design weight is the inverse of a respondent’s known probability of selection into the sample: w_i = 1 / π_i. It exists because of a choice made at the sampling stage, not because of anything about how the survey was fielded or who responded.
The most common source is deliberate oversampling. If a population is 70% Group A and 30% Group B, and Group B is too small at its natural share to analyze reliably on its own, a study might sample Group A at 1% and Group B at 2% — Group B respondents are then twice as likely to have been selected, so each gets a design weight of 1/0.02 = 50 against Group A’s 1/0.01 = 100. Left uncorrected, the sample overrepresents Group B relative to the population; the design weight restores the correct population balance before any further adjustment happens. The same logic applies to multi-stage cluster designs (a household’s selection probability is the product of the probabilities at each stage — see CASRAI’s cluster sampling guide for how that probability is built up) and to list-assisted or dual-frame designs where a unit can appear on more than one frame and needs a weight that accounts for its combined chance of selection.
Design weighting is a close statistical relative of inverse probability weighting (IPW) used in observational causal inference — both weight by the inverse of a known or estimated probability — but the probability being inverted is different: IPW inverts a unit’s probability of receiving a treatment, to estimate a causal effect; a survey design weight inverts a unit’s probability of selection into the sample, to estimate a population parameter. The mechanics rhyme; the estimand does not.
Post-stratification: correcting a known population-margin mismatch
Design weights fix selection probability, but they do not fix everything else that pulls a weighted sample away from the population — differential non-response chief among them (see CASRAI’s non-response bias guide for how to measure that gap directly). Post-stratification is the tool for the case where you have a population total or proportion for a set of cells and your weighted sample doesn’t match it.
The mechanics: for each post-stratification cell (e.g., each age group), compute an adjustment factor equal to the known population share of that cell divided by the current weighted-sample share of that cell, and multiply every respondent’s existing weight by their cell’s factor. A cell that’s underrepresented after design weighting gets a factor above 1; one that’s overrepresented gets a factor below 1. The requirement that makes this work — and the requirement raking exists to route around — is that you need the population total for the actual cells you’re adjusting. If you’re post-stratifying on age × sex jointly, you need the population’s age-by-sex table, not just the separate age total and the separate sex total.
Raking: matching several margins without the joint population table
Raking, formally iterative proportional fitting (IPF), solves a specific, common gap: you know the population’s margin for age separately, and its margin for education separately, but no source publishes the joint age-by-education population table at the granularity your cells need — a real gap, since many published census or registry tabulations cross fewer variables than a given study needs, or aggregate categories differently than the study’s instrument does.
Raking adjusts iteratively rather than in one pass: adjust every respondent’s weight so the weighted sample matches the age margin (exactly as post-stratification would, treating age alone as the only known margin); then, using those now-updated weights, adjust again so the weighted sample matches the education margin; this necessarily disturbs the age match slightly, so repeat the age adjustment, then the education adjustment, and so on. Each pass moves the weighted sample closer to matching both margins simultaneously. The procedure is iterative because there is generally no single weight per respondent that satisfies both margins in one step without the joint table — cycling between margins converges to a set of weights that gets arbitrarily close to both. Raking extends to three or more margins the same way, cycling through each in turn each iteration.
Raking and post-stratification are not competing techniques so much as tools for two different data situations. If you have the joint population table for your adjustment cells, post-stratification is simpler and there’s no reason to rake instead. If you only have separate margins, raking is what’s available; it does not recover information the joint table would have given you; it merely finds weights consistent with the margins you do have, which is the best any purely marginal method can do.
A worked, reproducible example
The figures below come from an actual simulation, not an illustration built to look tidy — a fixed-seed script (Node.js, seed 20260826) generates a synthetic population, draws an unequal-probability sample from it, applies non-response, then weights the respondents through all three stages. Re-running the script with the same seed reproduces every number here exactly.
Setup. A population of 100,000: 70% urban, 30% rural, with true population margins of 30% aged 18–34 / 40% aged 35–54 / 30% aged 55+, and 35% high-school-or-less / 33% some-college / 32% bachelor’s-or-higher on education. The sample design deliberately oversamples the rural group (2% sampling fraction vs. 1% urban) to ensure it has enough cases to analyze on its own — this produced design weights of 100 (urban) and 50 (rural), 1,325 sampled units, and, after simulated non-response that rises with age (45% response among 18–34, 60% among 35–54, 75% among 55+ — a realistic pattern, since older respondents are typically more likely to complete a survey), 767 actual respondents.
Stage 1 — design weight only. Because older respondents were more likely to respond, the weighted sample skews old before any further correction: 21.6% aged 18–34 against a true population share of 30%, and 38.1% aged 55+ against a true 30%.
Stage 2 — post-stratification on age. Applying the population/sample ratio within each age cell brings the weighted age distribution to an exact match — 30.0% / 40.0% / 30.0% — by construction. The education distribution, left untouched by an age-only adjustment, is still off: 35.6% high-school-or-less against a true 35.0%, 32.5% bachelor’s-plus against a true 32.0%.
Stage 3 — raking on age and education together. Because the joint age-by-education population table isn’t assumed known here (only the two separate margins are), raking is applied instead of a second, joint post-stratification. It converged after 4 full age-then-education passes, at which point both margins matched to within rounding: age 30.0% / 40.0% / 30.0% and education 35.0% / 33.0% / 32.0%, both against their true population values.
Design effect from the weights. Unequal weights always cost some precision relative to a simple random sample of the same size, even after they’ve fixed representativeness — this is the design effect (Kish, Survey Sampling, 1965), computed here as deff = n · Σw2 / (Σw)2. In this simulation: deff = 1.105 after design weighting alone (effective n = 694 from an actual n of 767); deff = 1.168 after post-stratification (effective n = 656.6); deff = 1.169 after raking (effective n = 656.2). The jump happens mostly at post-stratification here, not at raking — raking added very little further weight variability on top of it, in this particular setup.
Trimming. Capping the final raked weights at 1.5× the mean weight (115.29) trimmed 97 of the 767 respondents’ weights down to that cap and brought the design effect back down to 1.126 (effective n = 681.1) — recovering some of the precision the weighting cost, at the price of introducing a small, deliberate amount of bias in exchange for that precision (the trimmed respondents’ weights no longer exactly reflect their selection/adjustment probability). A tighter cap of 1.3× the mean trimmed 136 respondents and brought deff down further, to 1.106. There’s no universally correct cap; it’s a bias-variance trade a study has to choose and report, not a default to apply blindly.
Reporting checklist
A methods section that describes weighting completely, rather than just naming that weighting happened, typically states:
- Which of the three stages were used, and on which variables — not just “the data were weighted.”
- The source of every population total or margin used (census, population register, administrative data) and its reference date.
- Whether weights were trimmed, at what threshold, and how many cases were affected.
- The resulting design effect and effective sample size, since the nominal
noverstates precision once weights are unequal. - Whether standard errors were computed accounting for the weights (e.g., linearization or replicate-weight methods) rather than treated as if from a simple random sample — an unweighted-variance calculation on weighted estimates understates the true standard errors.
Frequently asked questions
Do I always need all three weighting stages?
No. A simple random sample with no oversampling and a fielding pattern that already matches the population needs none of them. Design weights are needed only when the sample design itself gave units unequal selection probability; post-stratification or raking are needed only when a real population-margin mismatch remains afterward and a reliable population total exists to correct it against.
How do I decide between post-stratification and raking?
Use post-stratification whenever you actually have the population’s joint table for the cells you want to adjust on. Use raking when you only have the separate margins for two or more variables and no joint population table exists at the resolution you need — which is the more common situation in practice, since most published population tabulations don’t cross every variable a given study needs.
Why does weighting increase the design effect even after it fixes representativeness?
The design effect (Kish, 1965) rises with the variability of the weights themselves, independent of whether the weights are doing their job correctly — a few large weights standing in for underrepresented groups add sampling variance the same way a few unusually influential observations would in any weighted estimator, even though those large weights are exactly what makes the point estimate representative.
Is there a standard threshold for trimming weights?
No single threshold is standard across the field; common practice caps at some multiple of the mean or median weight, or at a percentile of the weight distribution, chosen and reported by the analyst for the specific study rather than applied by a fixed rule. Any cap should be reported alongside how many cases it affected, since it trades a small amount of bias for a reduction in variance.
Does raking require the same number of iterations every time?
No — the number of passes needed to converge depends on how far the initial (design-weighted, or design-weighted-and-post-stratified) sample is from the target margins and on how many margins are being raked simultaneously; most well-behaved cases converge within a handful of passes, but a convergence tolerance and a maximum-iteration cap should both be set explicitly rather than assumed.
See also: CASRAI’s guides on stratified sampling and cluster sampling for how unequal selection probability arises at the design stage, non-response bias for measuring the gap weighting is partly meant to correct, and inverse probability weighting for the related technique used in causal inference rather than survey estimation.








