Interpretation of whisker in a boxplot for lognormal distribution

조회 수: 10 (최근 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