Choose your reading route
eduKateSG · Why Mathematics? · Raking Survey Weights: Iterative Proportional Fitting and Population Margins
Start with the question, audit the worked example, or jump to the assumptions and practice. Every chapter stays open for uninterrupted reading.
Understand the question
Define the quantity and follow the mechanism.Route 2 · Chapters 8–14
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 15–21
Check assumptions
See where design and calibration matter.Route 4 · Chapters 22–28
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 29–34
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Why is mathematics important when a survey must match several population margins but the full cross-classification is unavailable or too sparse? Raking alternates multiplicative adjustments across margins until every weighted total is within tolerance. It is iterative proportional fitting applied to survey weights.
Did You Know? Fixing one margin can disturb a margin fixed moments earlier. Convergence means repeated cycling has made all discrepancies small at the same time.
Full chapter index
Chapters 1–7 · Understand the question
Chapters 8–14 · Reproduce the example
Chapters 15–21 · Check assumptions
Chapters 22–28 · Explore applications
Chapters 29–34 · Study and verify
Population controls may provide age totals, sex totals and region totals separately, without a trustworthy age-by-sex-by-region table. Raking uses the available margins.
For the current weights, compute a factor control/current for each category of margin A and multiply affected weights. Then do the same for margin B, and continue through all margins.
Suppose current weighted cells are [[30,20],[10,40]], so row totals are 50 and 50 while column totals are 40 and 60.
Let target row totals be 60 and 40, and target column totals be 50 and 50.
| Cell | Column 1 | Column 2 | Row total |
|---|---|---|---|
| Row 1 | 30 | 20 | 50 |
| Row 2 | 10 | 40 | 50 |
Multiply row 1 by 60/50=1.2 and row 2 by 40/50=0.8. Cells become [[36,24],[8,32]], with correct rows but columns 44 and 56.
Multiply column 1 by 50/44≈1.13636 and column 2 by 50/56≈0.892857. Cells become approximately [[40.909,21.429],[9.091,28.571]]. Columns now match, but rows are about 62.338 and 37.662.
The column step disturbed row totals. Alternating proportional adjustments converges under suitable support and compatibility conditions.
| Cell | Column 1 | Column 2 | Row total |
|---|---|---|---|
| Row 1 | 40.909 | 21.429 | 62.338 |
| Row 2 | 9.091 | 28.571 | 37.662 |
The U.S. Census Bureau and BLS describe CPS second-stage adjustment as iterative proportional fitting, raking ratio estimation, or raking, performed to control several dimensions. Read Technical Paper 77.
Stop when every relative discrepancy is below a declared tolerance, or at a maximum iteration count. A stopped algorithm may still fail quality standards if residuals are too large.
ACS methodology describes tolerance thresholds, relaxed criteria and a maximum iteration limit for person post-stratification. Read the official chapter.
A cell impossible in the population should remain zero. A sample zero where the population control requires positive mass makes exact raking infeasible without collapsing or modelling.
Raking can create large factors in poorly represented categories. Trimming improves stability but breaks exact margins unless weights are raked again.
Exact limiting solutions may be stable under standard conditions, but finite iterations, bounds, trimming and numerical precision can make order matter in practice.
Raking can be viewed as minimising a Kullback–Leibler-type divergence from starting weights subject to margin constraints.
Raking is often applied after nonresponse adjustments. It can reduce imbalance on observed controls but cannot verify unobserved response assumptions.
Each replicate should follow the published adjustment process or use supplied final replicate weights. Calibrating only the full sample understates some weighting variability.
Full post-stratification needs joint cell totals and enough sample in every cell. Raking needs margins and can preserve a less sparse representation.
Both satisfy auxiliary constraints. Raking uses multiplicative positive adjustments and an entropy-like distance; linear calibration can yield negative weights.
The same iterative proportional fitting idea appears in contingency tables, transport matrices and input–output balancing.
Track maximum relative discrepancy by iteration, inspect cell support and factor ranges, record collapsed categories, test margin order and compare trimmed versus untrimmed weights.
Raking cannot create evidence for unsupported categories, correct wrong controls or guarantee better estimates for outcomes unrelated to margins.
Build the 2×2 table, apply row and column factors in linked cells and chart maximum margin error after each cycle.
Implement vectorised margin updates, unit-test the first row and column steps, require a tolerance and maximum iteration, and log support failures.
Survey weighting, census adjustment, epidemiology and market research use iterative proportional fitting.
Rake a sparse three-way table, compare margin orders and trimming rules, and measure outcome variance and effective sample size.
Convergence is not proof of unbiasedness, zero sample support cannot be fixed by endless iterations, and matching margins does not match every interaction.
CHAPTER 27 OF 34 · Explore applications
27. Connection to recent mathematics articles
The calibration guide explains the general constraint problem. The survey-domain guide explains sparse subgroup support.
Students should calculate the first two adjustment steps. Parents can ask which population margins, dates and geographic definitions were used.
- Reproduce row factors.
- Reproduce column factors.
- Calculate new rows.
- Explain cycling.
- Diagnose a sample zero.
### Why iterate? Each margin adjustment can disturb earlier margins.
### Are weights positive? With positive starts and factors, yes.
### Can raking fail? Yes.
### Does convergence remove bias? No.
Report starting weights, controls, universe, margin order, tolerance, iterations, maximum discrepancy, structural zeros, collapsing, trimming and replicate procedure.
Each margin step moves the weight table onto one constraint set. Cycling approaches their intersection under the raking geometry.
Confirm compatible controls, sample support, convergence, factor bounds, trimming consequences, replicate raking and outcome-relevance checks.
Continue through the Mathematics Learning Hub. Recalculate one weighted total or calibration constraint and explain what population quantity it represents.
Extended practice laboratory
Practice case 1: Build table
Setup: Start from the article’s raking-IPF mechanism for case 1. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 2: Calculate row totals
Setup: Start from the article’s raking-IPF mechanism for case 2. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 3: Calculate column totals
Setup: Start from the article’s raking-IPF mechanism for case 3. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 4: Set row controls
Setup: Start from the article’s raking-IPF mechanism for case 4. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 5: Set column controls
Setup: Start from the article’s raking-IPF mechanism for case 5. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 6: Calculate row factors
Setup: Start from the article’s raking-IPF mechanism for case 6. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 7: Apply row factors
Setup: Start from the article’s raking-IPF mechanism for case 7. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 8: Calculate column factors
Setup: Start from the article’s raking-IPF mechanism for case 8. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 9: Apply column factors
Setup: Start from the article’s raking-IPF mechanism for case 9. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 10: Recheck rows
Setup: Start from the article’s raking-IPF mechanism for case 10. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 11: Run cycle 2
Setup: Start from the article’s raking-IPF mechanism for case 11. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 12: Set tolerance
Setup: Start from the article’s raking-IPF mechanism for case 12. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 13: Track maximum error
Setup: Start from the article’s raking-IPF mechanism for case 13. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 14: Add structural zero
Setup: Start from the article’s raking-IPF mechanism for case 14. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 15: Add sample zero
Setup: Start from the article’s raking-IPF mechanism for case 15. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 16: Collapse category
Setup: Start from the article’s raking-IPF mechanism for case 16. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 17: Trim weights
Setup: Start from the article’s raking-IPF mechanism for case 17. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 18: Rake again
Setup: Start from the article’s raking-IPF mechanism for case 18. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 19: Change margin order
Setup: Start from the article’s raking-IPF mechanism for case 19. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 20: Compare post-stratification
Setup: Start from the article’s raking-IPF mechanism for case 20. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 21: Audit convergence
Setup: Start from the article’s raking-IPF mechanism for case 21. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 22: Audit controls
Setup: Start from the article’s raking-IPF mechanism for case 22. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 23: Audit replicates
Setup: Start from the article’s raking-IPF mechanism for case 23. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 24: Name limits
Setup: Start from the article’s raking-IPF mechanism for case 24. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.
Practice case 25: Write conclusion
Setup: Start from the article’s raking-IPF mechanism for case 25. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the target population and sampling design, verify the weighting identity, state one diagnostic, record units and compare one defensible alternative with clear reasoning. Show the arithmetic, name the response and predictor units, and separate the numerical result from the claim it supports. Then vary one defensible assumption, calculate again and explain whether the conclusion changed because of the data, the fitted model or the validation purpose. Finish with one compact table or graph that could reveal a failure hidden by the summary.