# Interpretation of whisker in a boxplot for lognormal distribution

10 views (last 30 days)
yp78 on 27 Oct 2021
Commented: yp78 on 28 Oct 2021
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 on 27 Oct 2021
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
yp78 on 28 Oct 2021
Thanks for the suggestion :)

R2021b

### Community Treasure Hunt

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

Start Hunting!