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 ExchangeProbability 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