Weighted Standard deviation?

Hey, I'm new to matlab, and cant seem to find a simple way to calculate weighted standarddeviations.
For the weighted mean, i can specify wmean(impactperkg, kgs) where the number of kg is the weighting. For the weighted median, the function "weightedMedian" can be used. Is there a similar function one can use for the std?
I'm confused to as if ts_std can be used for this purpose?
Cheers

 채택된 답변

Tom Lane
Tom Lane 2012년 4월 30일

1 개 추천

The "var" function will accept weights, and you can take the square root of the result.

추가 답변 (1개)

Hanna
Hanna 2012년 4월 30일

0 개 추천

easy! thanks so much, i didnt even consider checking the var function :s

카테고리

도움말 센터File Exchange에서 Probability Distributions and Hypothesis Tests에 대해 자세히 알아보기

질문:

2012년 4월 30일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by