Understanding boxplot whisker thresholds

조회 수: 43 (최근 30일)
Saurabh Kelkar
Saurabh Kelkar 2019년 8월 21일
편집: dpb 2019년 8월 21일
In Matlab's boxplot: the whiskers are calculated as
Upper whisker: q3 + w × (q3 – q1) & Loweer whisker: q1 – w × (q3 – q1). Although
This by design makes the whiskers symmetric. In which case there should be symmetric whiskers everywhere. However their documentation of boxplot (https://www.mathworks.com/help/stats/boxplot.html#bu5f8g7-4) has this:
If one were to assume that the whisker gets capped by the maximum or minimum value in the dataset then a box plot with outliers on top and bottom should have symmetric whiskers. If there are outlier on one side, that side should have the longest whisker.
These should have had equal length but for the left one the bottom whisker is longer( Image is again from box plot documentation).
Also, the below image should have had longer whisker on the side of the outlier.
They are implying that the whisker length correspond to the extreme values within the whisker range. Any clarification of their logic in plotting will be helpful.
  댓글 수: 1
dpb
dpb 2019년 8월 21일
편집: dpb 2019년 8월 21일
See if Answers 460270 whiskers seem incorrect? explanation of what is actually plotted clears up the confusion. I've not done the actual exercise on the doc example but did seem to work for the poster's query there so I'd presume will do so on them as well.

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by