What is Weighted Standard Deviation?
When data points have different levels of importance or represent different frequencies, we use weighted standard deviation. This is common in portfolio analysis, survey data with sampling weights, and GPA calculations.
In standard (unweighted) calculations, every data point contributes equally to the mean and standard deviation. But real-world scenarios often require giving some observations more influence than others. A $1 million investment should affect your portfolio's volatility calculation more than a $1,000 position. A survey response from a larger demographic group should carry more weight when estimating population parameters.
When to Use Weighted SD
The Weighted SD Formula
First, you need the weighted mean:
Weighted Mean
Then, the weighted standard deviation (population version):
Weighted Standard Deviation (Population)
Where wᵢ are the weights, xᵢ are the data values, and x̄w is the weighted mean.
For sample data, use the bias-corrected formula (analogous to Bessel's correction):
Weighted Standard Deviation (Sample)
The sample correction is more complex because the "effective sample size" depends on the distribution of weights. If all weights are equal, this reduces to the familiar n-1 correction.
Step-by-Step Calculation
Calculate the weighted mean
Calculate weighted squared deviations
Sum the weighted squared deviations
Divide by sum of weights
Take the square root
Real-World Applications
Portfolio Volatility: In finance, portfolio standard deviation must account for different asset allocations. A 50% stock, 50% bond portfolio's volatility is calculated using weighted SD where weights are the allocation percentages.
Survey Analysis: Survey samples often overrepresent or underrepresent certain demographics. Weighting adjusts for this, ensuring that results reflect the true population. The weighted SD captures the variability in the population, not just the sample.
Academic Grading: When calculating GPA, different courses have different credit hours. A 4-credit course should influence your GPA more than a 1-credit course. Weighted calculations handle this naturally.
Meta-Analysis: When combining results from multiple studies, each study is weighted by its precision (often inverse variance). This gives more influence to larger, more precise studies.
Worked Examples
Portfolio Example: Consider a portfolio with three stocks:
- Stock A: 15% return, 50% allocation (weight = 0.50)
- Stock B: 8% return, 30% allocation (weight = 0.30)
- Stock C: -2% return, 20% allocation (weight = 0.20)
Weighted mean = (0.50×15 + 0.30×8 + 0.20×(-2)) / 1.0 = 9.5%
Weighted SD = √[(0.50×(15-9.5)² + 0.30×(8-9.5)² + 0.20×(-2-9.5)²)] = √[(0.50×30.25 + 0.30×2.25 + 0.20×132.25)] = √[15.125 + 0.675 + 26.45] = √42.25 = 6.5%
Notice the Impact