Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I calculate the standard deviation between weighted measurements?

I have several weighted values for which I am taking a weighted average. I want to calculate a weighted standard deviation using the weighted values and weighted average. How would I modify the typical standard deviation to include weights on each measurement?

This is the standard deviation formula I am using.

enter image description here

When I simply use each weighted value for 'x' and the weighted average for '\bar{x}', the result seems smaller than it should be.

like image 907
Steven C. Howell Avatar asked May 21 '15 20:05

Steven C. Howell


People also ask

What is standard deviation in weighted mean?

The standard deviation is an indicator of how widely values in a group differ from the mean (see StDev (Standard Deviation of a Sample)). It is useful for comparing different sets of values with a similar mean.

How do you find the standard deviation of a weighted portfolio?

The standard deviation of the portfolio variance is given by the square root of the variance. In the calculation of the variance for a portfolio that consists of multiple assets, one should calculate the factor (2𝑤1𝑤2Cov1,2) or (2𝑤1𝑤2ρ𝑖,𝑗σ𝑖σ𝑗)for each pair of assets in the portfolio.


1 Answers

I just found this wikipedia page discussing data of equal significance vs weighted data. The correct way to calculate the biased weighted estimator of variance is

,

though the following, on-the-fly implementation, is more efficient computationally as it does not require calculating the weighted average before looping over the sum on the weighted differences squared

.

Despite my skepticism, I tried both and got the exact same results.

Note, be sure to use the weighted average

.

like image 186
Steven C. Howell Avatar answered Sep 27 '22 19:09

Steven C. Howell