Interpretation of whisker in a boxplot for lognormal distribution

6 ビュー (過去 30 日間)
yp78
yp78 2021 年 10 月 27 日
コメント済み: yp78 2021 年 10 月 28 日
I am plotting box plots using the boxplot function for lognormally distributed data.
What I want to know is the % coverage of 'Whisker' for a lognormally distributed data set. In the case of a normal distribution, it (Cite) says
'..., boxplot draws points as outliers if they are greater than q3 + w × (q3 – q1) or less than q1 – w × (q3 – q1), where w is the multiplier Whisker, and q1 and q3 are the 25th and 75th percentiles of the sample data, respectively.
The default value for 'Whisker' corresponds to approximately +/–2.7σ and 99.3 percent coverage if the data are normally distributed. The plotted whisker extends to the adjacent value, which is the most extreme data value that is not an outlier.'
How do I understand the Whisker coverage for lognormally distributed data set?

採用された回答

the cyclist
the cyclist 2021 年 10 月 27 日
If I have done this correctly, it is about 92.2% ...
% Calculation for normal distribution
q3 = norminv(0.75,0,1);
q1 = norminv(0.25,0,1);
w = 1.5;
whiskerCoverage = normcdf(q3 + w * (q3 - q1)) - normcdf(q1 - w * (q3 - q1))
whiskerCoverage = 0.9930
% Calculation for lognormal distribution
q3 = logninv(0.75,0,1);
q1 = logninv(0.25,0,1);
w = 1.5;
whiskerCoverage = logncdf(q3 + w * (q3 - q1)) - logncdf(q1 - w * (q3 - q1))
whiskerCoverage = 0.9224
  3 件のコメント
the cyclist
the cyclist 2021 年 10 月 28 日
If you don't want to show untransformed data, there are other options that are good for showing the data distribution, for example a violin plot.
yp78
yp78 2021 年 10 月 28 日
Thanks for the suggestion :)

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

その他の回答 (0 件)

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by