Choose your reading route
eduKateSG · Why Mathematics? · Stratified Bootstrap: Within-Stratum Resampling and Fixed Composition
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 sample deliberately contains known subgroups whose representation should remain stable? The stratified bootstrap resamples independently within each stratum. It preserves the observed stratum counts while allowing cases inside each group to vary, aligning the resampling law with a stratified sampling or analysis design.
Did You Know? If a sample contains 60 students from stratum A and 40 from stratum B, each bootstrap replicate can retain exactly 60 and 40 draws. Ordinary unrestricted resampling would make those counts fluctuate even when the design fixed them.
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
Age bands, treatment arms, schools or sampling strata may be fixed by design. Allowing bootstrap composition to wander can add variation that the original design did not generate.
R boot states that nonparametric simulations are performed independently within supplied strata. Read the official R documentation.
For stratum h with n_h observations, draw n_h cases with replacement from that stratum. Concatenate all strata so the replicate total remains n=sum n_h.
Suppose A has observations (2,4,6) and B has (10,14). One valid replicate draws A indices (3,3,1) giving (6,6,2), and B indices (2,1) giving (14,10).
| A draw | B draw | Counts |
|---|---|---|
| 6,6,2 | 14,10 | 3 and 2 |
The replicate values sum to 6+6+2+14+10=38 across five observations, so the unweighted sample mean is 38/5=7.6.
| Values | Sum | Mean |
|---|---|---|
| 6,6,2,14,10 | 38 | 7.6 |
CHAPTER 6 OF 34 · Understand the question
6. Fixed counts versus population weights
Preserving sample counts does not decide how strata represent the target population. A survey estimate may require external population weights even though resampling remains within sample strata.
An unrestricted bootstrap treats all rows as exchangeable and lets stratum counts fluctuate multinomially. That can be correct for a simple random sample but wrong for fixed-allocation designs.
When sample stratum shares mirror population shares, the overall statistic may use ordinary row weights. Disproportionate allocation needs explicit design weights for population inference.
Randomised trials often stratify or block randomisation. Resampling within treatment-by-block cells can preserve allocation, but causal inference may also call for randomisation-based methods.
A stratum with one observed unit produces the same unit in every replicate and contributes no within-stratum empirical uncertainty. Pooling strata changes the estimand and must be justified.
Software may bin a numeric variable into quantiles. Bin cutpoints, sparse groups and whether cutpoints are fixed or re-estimated all affect the procedure.
Total uncertainty combines within-stratum variability under fixed allocation and, when relevant, uncertainty in external stratum weights. A simple stratified bootstrap may estimate only the first component.
If population shares are 0.7 for A and 0.3 for B, calculate replicate stratum means first, then 0.7 mean_A-star + 0.3 mean_B-star. Do not substitute sample proportions unless they represent the target.
Stratifying bootstrap splits by outcome class can stabilise rare-class model training, but performance evaluation must reflect the intended population prevalence.
If schools sample fixed numbers by grade, grade-stratified resampling preserves those allocations. Dependence within classroom may require another cluster level.
Design strata are used during sampling. Post-strata are formed after sampling for adjustment. Their resampling treatment depends on how weights and cells were estimated.
Stratified bootstrap resamples cases independently inside strata. Cluster bootstrap resamples whole groups. A classroom can be a cluster while grade is a stratum, so both structures may coexist.
Balanced bootstrap coordinates inclusion counts across the whole set of replicates. Stratification constrains each replicate within known groups; the invariants differ.
CHAPTER 19 OF 34 · Check assumptions
19. Comparison with class-balanced machine learning
Oversampling classes for model fitting changes the training distribution. A stratified inferential bootstrap normally preserves the observed design allocation and separately handles target prevalence.
Check stratum labels and counts, verify every replicate allocation, reproduce weighted and unweighted statistics, inspect sparse cells and simulate the actual sampling design.
Stratification cannot recover unobserved groups, fix wrong population weights, preserve within-cluster dependence by itself or justify arbitrary outcome balancing.
Use one table per stratum with original and replicate indices. Confirm count invariants, calculate stratum estimates and combine them with clearly labelled sample or population weights.
Split indices by stratum, sample n_h within each group and unit-test A draw (6,6,2), B draw (14,10), total mean 7.6. Save cell counts and seeds.
Stratified resampling appears in surveys, trials, education, ecology and machine learning. Careers require sampling theory, weighting and domain-aware subgroup definitions.
Simulate two strata with unequal variances and disproportionate sampling. Compare unrestricted, stratified unweighted and stratified population-weighted intervals.
A stratum is not automatically a cluster, fixed sample shares are not always population shares, and outcome balancing can change the target distribution.
CHAPTER 27 OF 34 · Explore applications
27. Connection to recent mathematics articles
The cluster-bootstrap guide explains whole-group resampling. The survey-sampling guide explains population weights and margins of error.
Students should resample two small strata by hand and verify the counts. Parents can ask whether group proportions were fixed by design or estimated from the sample.
- Recreate both stratum draws.
- Calculate 38/5.
- Apply external population shares.
- Diagnose a one-unit stratum.
- Compare strata and clusters.
### Where are cases resampled? Within their strata.
### Are stratum counts preserved? Usually yes.
### Are sample shares always population shares? No.
### Does stratification preserve clusters? Not by itself.
Report strata, n_h, allocation origin, population weights, B, seed, sparse-cell rule, estimator, count checks, design simulation and any nested clusters.
The replicate total is sum n_h because each stratum contributes its original sample count. This removes random composition variation while preserving within-cell empirical variation.
Confirm fixed allocations, correct within-cell exchangeability, explicit population weights, sparse-stratum treatment, nested cluster handling and a target estimand consistent with the design.
Continue through the Mathematics Learning Hub. Reproduce one cluster, stratum, autoregressive or spatial-block calculation by hand before trusting a large automated run.
Extended practice laboratory
Practice case 1: Define strata
Setup: Start from the article’s stratified-bootstrap mechanism for case 1. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Count each stratum
Setup: Start from the article’s stratified-bootstrap mechanism for case 2. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Draw within A
Setup: Start from the article’s stratified-bootstrap mechanism for case 3. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Draw within B
Setup: Start from the article’s stratified-bootstrap mechanism for case 4. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Verify counts
Setup: Start from the article’s stratified-bootstrap mechanism for case 5. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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 overall mean
Setup: Start from the article’s stratified-bootstrap mechanism for case 6. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Calculate stratum means
Setup: Start from the article’s stratified-bootstrap mechanism for case 7. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Apply population weights
Setup: Start from the article’s stratified-bootstrap mechanism for case 8. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Change allocation
Setup: Start from the article’s stratified-bootstrap mechanism for case 9. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Use treatment arms
Setup: Start from the article’s stratified-bootstrap mechanism for case 10. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Add rare stratum
Setup: Start from the article’s stratified-bootstrap mechanism for case 11. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Pool sparse cells
Setup: Start from the article’s stratified-bootstrap mechanism for case 12. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Bin numeric variable
Setup: Start from the article’s stratified-bootstrap mechanism for case 13. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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 cluster inside stratum
Setup: Start from the article’s stratified-bootstrap mechanism for case 14. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Compare unrestricted bootstrap
Setup: Start from the article’s stratified-bootstrap mechanism for case 15. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Compare cluster bootstrap
Setup: Start from the article’s stratified-bootstrap mechanism for case 16. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Compare balanced bootstrap
Setup: Start from the article’s stratified-bootstrap mechanism for case 17. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Use classification data
Setup: Start from the article’s stratified-bootstrap mechanism for case 18. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Increase B
Setup: Start from the article’s stratified-bootstrap mechanism for case 19. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Change seed
Setup: Start from the article’s stratified-bootstrap mechanism for case 20. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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 weights
Setup: Start from the article’s stratified-bootstrap mechanism for case 21. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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 counts
Setup: Start from the article’s stratified-bootstrap mechanism for case 22. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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: Validate design
Setup: Start from the article’s stratified-bootstrap mechanism for case 23. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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 stratified-bootstrap mechanism for case 24. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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 stratified-bootstrap mechanism for case 25. Task: Change the named quantity, recompute the dependent result and compare with the original.
Check: Preserve the sampling unit, verify the grouping, recursion or geometry identity, and state one diagnostic before interpretation. 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.