VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Why Mathematics? | Raking Survey Weights: Iterative Proportional Fitting and Population Margins

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
  1. The multiple-margin question
  2. One raking cycle
  3. A two-by-two starting table
  4. Target margins
  5. Row adjustment
  6. Column adjustment
  7. Why more cycles are needed
Chapters 8–14 · Reproduce the example
  1. An official production example
  2. Convergence tolerance
  3. An ACS convergence example
  4. Structural zeros
  5. Weight trimming
  6. Order of margins
  7. Entropy interpretation
Chapters 15–21 · Check assumptions
  1. Nonresponse adjustment
  2. Replicate raking
  3. Comparison with full post-stratification
  4. Comparison with linear calibration
  5. Comparison with matrix balancing
  6. Diagnostics
  7. Limits
Chapters 22–28 · Explore applications
  1. A spreadsheet workflow
  2. A coding workflow
  3. Applications and careers
  4. A student investigation
  5. Common misconceptions
  6. Connection to recent mathematics articles
  7. Guidance for students and parents
Chapters 29–34 · Study and verify
  1. Practice questions
  2. Frequently asked questions
  3. A reporting checklist
  4. Alternating projections
  5. Final raking audit
  6. Useful next reading

CHAPTER 1 OF 34 · Understand the question

1. The multiple-margin question

Back to contents

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.

Contents · Next chapter

CHAPTER 2 OF 34 · Understand the question

2. One raking cycle

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 3 OF 34 · Understand the question

3. A two-by-two starting table

Back to contents

Suppose current weighted cells are [[30,20],[10,40]], so row totals are 50 and 50 while column totals are 40 and 60.

Contents · Previous chapter · Next chapter

CHAPTER 4 OF 34 · Understand the question

4. Target margins

Back to contents

Let target row totals be 60 and 40, and target column totals be 50 and 50.

CellColumn 1Column 2Row total
Row 1302050
Row 2104050
Starting 2×2 table.

Contents · Previous chapter · Next chapter

CHAPTER 5 OF 34 · Understand the question

5. Row adjustment

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 6 OF 34 · Understand the question

6. Column adjustment

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 7 OF 34 · Understand the question

7. Why more cycles are needed

Back to contents

The column step disturbed row totals. Alternating proportional adjustments converges under suitable support and compatibility conditions.

CellColumn 1Column 2Row total
Row 140.90921.42962.338
Row 29.09128.57137.662
After first row and column adjustments.

Contents · Previous chapter · Next chapter

CHAPTER 8 OF 34 · Reproduce the example

8. An official production example

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 9 OF 34 · Reproduce the example

9. Convergence tolerance

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 10 OF 34 · Reproduce the example

10. An ACS convergence example

Back to contents

ACS methodology describes tolerance thresholds, relaxed criteria and a maximum iteration limit for person post-stratification. Read the official chapter.

Contents · Previous chapter · Next chapter

CHAPTER 11 OF 34 · Reproduce the example

11. Structural zeros

Back to contents

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.

Contents · Previous chapter · Next chapter

CHAPTER 12 OF 34 · Reproduce the example

12. Weight trimming

Back to contents

Raking can create large factors in poorly represented categories. Trimming improves stability but breaks exact margins unless weights are raked again.

Contents · Previous chapter · Next chapter

CHAPTER 13 OF 34 · Reproduce the example

13. Order of margins

Back to contents

Exact limiting solutions may be stable under standard conditions, but finite iterations, bounds, trimming and numerical precision can make order matter in practice.

Contents · Previous chapter · Next chapter

CHAPTER 14 OF 34 · Reproduce the example

14. Entropy interpretation

Back to contents

Raking can be viewed as minimising a Kullback–Leibler-type divergence from starting weights subject to margin constraints.

Contents · Previous chapter · Next chapter

CHAPTER 15 OF 34 · Check assumptions

15. Nonresponse adjustment

Back to contents

Raking is often applied after nonresponse adjustments. It can reduce imbalance on observed controls but cannot verify unobserved response assumptions.

Contents · Previous chapter · Next chapter

CHAPTER 16 OF 34 · Check assumptions

16. Replicate raking

Back to contents

Each replicate should follow the published adjustment process or use supplied final replicate weights. Calibrating only the full sample understates some weighting variability.

Contents · Previous chapter · Next chapter

CHAPTER 17 OF 34 · Check assumptions

17. Comparison with full post-stratification

Back to contents

Full post-stratification needs joint cell totals and enough sample in every cell. Raking needs margins and can preserve a less sparse representation.

Contents · Previous chapter · Next chapter

CHAPTER 18 OF 34 · Check assumptions

18. Comparison with linear calibration

Back to contents

Both satisfy auxiliary constraints. Raking uses multiplicative positive adjustments and an entropy-like distance; linear calibration can yield negative weights.

Contents · Previous chapter · Next chapter

CHAPTER 19 OF 34 · Check assumptions

19. Comparison with matrix balancing

Back to contents

The same iterative proportional fitting idea appears in contingency tables, transport matrices and input–output balancing.

Contents · Previous chapter · Next chapter

CHAPTER 20 OF 34 · Check assumptions

20. Diagnostics

Back to contents

Track maximum relative discrepancy by iteration, inspect cell support and factor ranges, record collapsed categories, test margin order and compare trimmed versus untrimmed weights.

Contents · Previous chapter · Next chapter

CHAPTER 21 OF 34 · Check assumptions

21. Limits

Back to contents

Raking cannot create evidence for unsupported categories, correct wrong controls or guarantee better estimates for outcomes unrelated to margins.

Contents · Previous chapter · Next chapter

CHAPTER 22 OF 34 · Explore applications

22. A spreadsheet workflow

Back to contents

Build the 2×2 table, apply row and column factors in linked cells and chart maximum margin error after each cycle.

Contents · Previous chapter · Next chapter

CHAPTER 23 OF 34 · Explore applications

23. A coding workflow

Back to contents

Implement vectorised margin updates, unit-test the first row and column steps, require a tolerance and maximum iteration, and log support failures.

Contents · Previous chapter · Next chapter

CHAPTER 24 OF 34 · Explore applications

24. Applications and careers

Back to contents

Survey weighting, census adjustment, epidemiology and market research use iterative proportional fitting.

Contents · Previous chapter · Next chapter

CHAPTER 25 OF 34 · Explore applications

25. A student investigation

Back to contents

Rake a sparse three-way table, compare margin orders and trimming rules, and measure outcome variance and effective sample size.

Contents · Previous chapter · Next chapter

CHAPTER 26 OF 34 · Explore applications

26. Common misconceptions

Back to contents

Convergence is not proof of unbiasedness, zero sample support cannot be fixed by endless iterations, and matching margins does not match every interaction.

Contents · Previous chapter · Next chapter

CHAPTER 27 OF 34 · Explore applications

27. Connection to recent mathematics articles

Back to contents

The calibration guide explains the general constraint problem. The survey-domain guide explains sparse subgroup support.

Contents · Previous chapter · Next chapter

CHAPTER 28 OF 34 · Explore applications

28. Guidance for students and parents

Back to contents

Students should calculate the first two adjustment steps. Parents can ask which population margins, dates and geographic definitions were used.

Contents · Previous chapter · Next chapter

CHAPTER 29 OF 34 · Study and verify

29. Practice questions

Back to contents

  • Reproduce row factors.
  • Reproduce column factors.
  • Calculate new rows.
  • Explain cycling.
  • Diagnose a sample zero.

Contents · Previous chapter · Next chapter

CHAPTER 30 OF 34 · Study and verify

30. Frequently asked questions

Back to contents

### 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.

Contents · Previous chapter · Next chapter

CHAPTER 31 OF 34 · Study and verify

31. A reporting checklist

Back to contents

Report starting weights, controls, universe, margin order, tolerance, iterations, maximum discrepancy, structural zeros, collapsing, trimming and replicate procedure.

Contents · Previous chapter · Next chapter

CHAPTER 32 OF 34 · Study and verify

32. Alternating projections

Back to contents

Each margin step moves the weight table onto one constraint set. Cycling approaches their intersection under the raking geometry.

Contents · Previous chapter · Next chapter

CHAPTER 33 OF 34 · Study and verify

33. Final raking audit

Back to contents

Confirm compatible controls, sample support, convergence, factor bounds, trimming consequences, replicate raking and outcome-relevance checks.

Contents · Previous chapter · Next chapter

CHAPTER 34 OF 34 · Study and verify

34. Useful next reading

Back to contents

Continue through the Mathematics Learning Hub. Recalculate one weighted total or calibration constraint and explain what population quantity it represents.

Contents · Previous chapter · Mathematics Learning Hub

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.