Steven C. Howell
Steven C. Howell

Reputation: 18614

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.

Upvotes: 8

Views: 16267

Answers (1)

Steven C. Howell
Steven C. Howell

Reputation: 18614

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

.

Upvotes: 13

Related Questions