Choose your reading route
eduKateSG · Why Mathematics? · Weighted Variance, Frequency Weights and Squared Residuals
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 5–9
Reproduce the example
Audit the numbers one step at a time.Route 3 · Chapters 10–15
Check assumptions
See where design and calibration matter.Route 4 · Chapters 16–20
Explore applications
Connect the method to a concrete investigation.Route 5 · Chapters 21–25
Study and verify
Practise, inspect failure cases and read further.
Full chapter index · Practice and checking · Mathematics Learning Hub
Why is mathematics important when data points contribute unequally to spread? Weighted variance measures squared distance from a weighted centre while preserving the role of declared weights. It lets analysts describe variation when rows represent frequencies, exposures or other unequal contributions.
The hard part is not squaring residuals. It is choosing the right weighted centre, denominator and interpretation for the weight type.
Did you know? Giving one observation a larger weight changes both its direct contribution to the sum of squares and the centre from which every residual is measured.
Full chapter index
Chapters 1–4 · Understand the question
Chapters 5–9 · Reproduce the example
Chapters 10–15 · Check assumptions
Chapters 16–20 · Explore applications
Chapters 21–25 · Study and verify
Ordinary sample variance treats every row equally. Weighted variance asks how dispersed values are after contributions are changed by a documented weighting design.
It is useful only when values and weights stay paired and the denominator matches the purpose.
NIST Dataplot documents a weighted sample variance based on weighted squared residuals, the weighted mean, the sum of weights and the number of non-zero weights. It notes that weighted variances are often used for frequency data.
Read the NIST weighted-variance reference. Different weight types can require different finite-sample corrections, so the formula must be named rather than assumed.
Take values 2, 4 and 8 with frequency weights 1, 2 and 1. The expanded data are 2, 4, 4, 8, whose mean is 4.5.
The squared deviations are 6.25, 0.25, 0.25 and 12.25. Their sum is 19; dividing by 3 gives sample variance 6.3333.
| Values | Weights | Expanded data |
|---|---|---|
| 2, 4, 8 | 1, 2, 1 | 2, 4, 4, 8 |
Using the three rows, multiply squared deviations by weights: 1×6.25 + 2×0.25 + 1×12.25 = 19.
For literal frequency weights, the expanded-sample denominator is total frequency minus one, so 19/(4−1)=6.3333. This makes the meaning transparent.
| Weighted centre | Weighted squared sum | Variance |
|---|---|---|
| 4.5 | 19 | 19/3 = 6.3333 |
Residuals must be measured from the weighted mean, not the unweighted mean. Otherwise the weighted squared-residual sum is not minimised at the chosen centre.
For the example, the unweighted mean is 4.6667 and would answer a different design question.
Frequency weights say that a row occurs several times. Integer expansion is a valid conceptual check, and total frequency determines the familiar degrees of freedom.
This interpretation does not automatically transfer to reliability or probability weights.
CHAPTER 7 OF 25 · Reproduce the example
7. Reliability and inverse-variance weights
In measurement synthesis, weights may express relative precision. The resulting weighted centre and dispersion belong to a model about uncertainty.
Do not reuse a frequency-weight denominator simply because both calculations contain w_i.
Survey weights connect sampled records to a target population, often with stratification, clustering and calibration. A descriptive weighted variance may be useful, but design-based uncertainty needs survey-specific methods.
The US Census weighting overview explains why sample weights are more than simple replication counts.
A population weighted variance divides the weighted squared-residual sum by total weight. A sample estimate may use a correction.
State whether the data are the whole target population, a frequency-expanded sample or a weighted sample from a survey design.
For values 0 and 10 with equal weights, the weighted population mean is 5 and population variance is 25.
Change weights to 9 and 1: the centre becomes 1, and population variance becomes [9×1² + 1×9²]/10 = 9. The high weight near zero pulls the centre and reduces spread around it.
For a population-style formula, multiplying all weights by the same positive constant changes numerator and denominator together, leaving the variance unchanged.
Some sample corrections depend on how weights are interpreted, so scale invariance should be checked against the chosen convention.
Zero-weight rows contribute nothing and should be documented. Negative weights make a sum of squared residuals potentially lose its ordinary non-negative weighted-average meaning.
Use negative weights only within a method that explicitly defines them.
If the observations are in centimetres, variance is in square centimetres. Weighted standard deviation returns to centimetres after taking the square root.
Writing units prevents variance from being confused with an average distance.
Squaring makes distant observations influential, especially when they also carry large weights. Inspect weighted residual contributions, not only the final variance.
A table of w_i(x_i−x-bar-w)² quickly reveals which rows dominate.
Never treat a missing measurement as zero. Remove or impute the pair according to a declared rule and recompute the weighted centre and denominator.
Report missing total weight because a small number of rows can represent a large population share.
The formula based on subtracting large sums can lose precision when values are huge but spread is small. A two-pass centred calculation is easier to audit.
For large streams, use a tested stable weighted online algorithm and compare it with a high-precision reference.
Create columns for value, weight, weighted product, residual, squared residual and weighted squared residual. Show every sum used in the denominator.
Add checks for negative weights, zero total weight, missing pairs and inconsistent units.
Record the weight semantic in metadata, not merely an array named weights. Require callers to choose population, frequency-sample or another supported convention.
Test equal weights against ordinary variance and integer frequency weights against expanded data.
A low weighted variance does not prove accuracy, fairness or causal stability. Values can cluster tightly around a biased centre.
A high variance may reflect real heterogeneity rather than poor data quality.
Weighted variance appears in official statistics, experimental design, quality engineering, finance and machine learning. Analysts use it when contribution, exposure or representation differs.
The career skill is not memorising one denominator; it is matching the estimator to the design.
The weighted-mean guide supplies the centre used here. The root-mean-square guide explains why squared magnitudes emphasise large departures.
Students should label the weight type, calculate the weighted centre first and show each residual contribution. Parents can ask which denominator was chosen and what population the result describes.
The best answer includes a sentence about design and units after the calculation.
- Expand values 2, 5 with frequency weights 3, 2 and verify the weighted sample variance.
- Compare population variance for values 0, 10 under weights 1, 1 and 9, 1.
- Explain why equal weights reproduce ordinary variance.
### Is weighted variance always smaller? No. It can be smaller or larger depending on which values receive more weight and how the centre moves.
### Do weights need to sum to one? No for many formulas; normalising may be convenient. The correction still depends on weight meaning.
### Is its square root a weighted standard deviation? Yes, when the same weighting convention and denominator are used consistently.
Use the Mathematics Learning Hub to connect variance with distributions, then compare the NIST formula with a frequency-expanded calculation.
Extended practice laboratory
Practice case 1: Pair values and weights
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 1. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 2: Calculate weighted mean
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 2. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 3: Find residuals
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 3. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 4: Square residuals
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 4. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 5: Weight squared residuals
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 5. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 6: Sum contributions
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 6. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 7: Use population denominator
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 7. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 8: Use frequency denominator
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 8. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 9: Expand integer frequencies
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 9. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 10: Compare equal weights
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 10. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 11: Rescale all weights
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 11. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 12: Add a zero weight
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 12. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 13: Change a distant weight
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 13. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 14: Check square units
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 14. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 15: Take the standard-deviation root
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 15. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 16: Handle missing pairs
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 16. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 17: Inspect dominant contribution
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 17. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 18: Use survey weights carefully
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 18. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 19: Use reliability weights carefully
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 19. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 20: Test numerical stability
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 20. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 21: Compare robust spread
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 21. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 22: Audit bias versus precision
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 22. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 23: Avoid quality overclaim
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 23. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.
Practice case 24: Write a weighted-variance conclusion
Setup: Use the article’s weighted-variance mechanism and change one declared input for case 24. Task: Recalculate from raw values, preserve units and state which mathematical or design condition changed.
Check: Check the relevant invariant, separate the number from its claim, and name the next diagnostic or source of evidence. Rebuild the relevant counts before interpreting the coefficient, preserve the stated design, and write one sentence separating the numerical result from the claim it can support. Then vary one defensible assumption, calculate again, and explain whether the conclusion changes because of new data, a new reference model, or a new decision purpose. Finish by naming the unit, tolerance, and evidence needed for transfer. Record one graph or table that would expose failure hidden by the summary.