Learning goals
What is a notched box-plot? How does one construct such a plot? What is a variable width box-plot? How does one construct such a plot? How are they useful? Can one combine these two features of a box-plot? How does one construct a box-plot for data with factors? What is its use?
Dataset
For this study of Notched and Variable Width box-plots, we consider a slightly modified version of the scores dataset Suppose the score record is blank for some students, during some or all the exams The student could have been absent for the exam There could be a data entry error In either case, we do not have 50 scores for each of the exams
Variable name First minor Second minor Third minor First semester GPA Second semester scores 47
3
# of observations available
48
45
48
47
Notched Box-plots
As per Oxford Advanced Learners Dictionary, one of the meanings of notch is a V-shaped cut in an edge or a surface. This is used to test whether two or more population medians are equal at 5% level In a notched box-plot, a notch appears on either side of the median. The interval corresponding to the notch is the confidence interval for the population median If the notches of the box-plots of variables in the same frame do not overlap, then we conclude that the population medians are different (using a test at 5% level of significance)
What if we combine the features of notches and variable width, to make a variable width notched box-plot?
10
2.5 7 1 2
11
1.5 1.5
12
13
14
R-codes
Plot Notched box-plot Variable width box-plot R-code boxplot(data name, notch=TRUE) install.packages(aplpack) library(aplpack) boxplot(data name, varwidth=TRUE) boxplot(data name, varwidth=TRUE, notch=TRUE) Boxplot(numeric variable~factor variable, varwidth=TRUE, notch=TRUE)
15
Thank you