How to find points 3 std away from the mean in vector

26 ビュー (過去 30 日間)
Olga
Olga 2014 年 9 月 9 日
コメント済み: Image Analyst 2020 年 8 月 19 日
Hello,
Could you please help me to find a way how to find the points which are 3 std away from the mean in vector?

採用された回答

Image Analyst
Image Analyst 2014 年 9 月 9 日
編集済み: Image Analyst 2014 年 9 月 9 日
Assuming you really mean " more than 3 standard deviations away from the mean"...
% Get the mean and standard deviation of the vector
theMean = mean(yourVector);
stdDev = std(yourVector);
% Get a logical vector of the locations where the value is more than 3 sd away from the mean.
locationsAwayFromMean = abs(yourVector - theMean) > stdDev;
% Extract only those elements
outlierValues = yourVector(locationsAwayFromMean);
  4 件のコメント
Filippe Frulli
Filippe Frulli 2020 年 8 月 19 日
編集済み: Filippe Frulli 2020 年 8 月 19 日
May I please ask how exactly is the 3*standard deviations calculated?
Based on my interpretation of Image Analyst's solution, I only see 1 standard deviation being calculated. I would really appreciate clarification.
Shouldn't it be
locationsAwayFromMean = abs(yourVector - theMean) > 3*stdDev?
Image Analyst
Image Analyst 2020 年 8 月 19 日
Yes, sorry for the error and thanks for the clarification.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeElementary Math についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by