Reputation: 357
I wanted to compare a variable among two different places. For this I used the following code in R:
boxplot(variable~place)
As my place had two levels. However, I get a weird looking box plot. Do you know what seems to be the problem?
Upvotes: 1
Views: 5603
Reputation: 21400
As has been noted in comments, there's nothing wrong with the boxplots. The fact that there is just one whisker each is a reflection of your data.
Boxplots are an extremely instructive type of graphic: they not only show the location and spread of data but also indicate skewness. The interpretation of the boxplot depends on its ‘syntax’, i.e., its main graphical elements. There are five such elements:
1. bold horizontal line: depicts the median (the middle value of a sorted distribution)
2. box: represents the interquartile range (IQR)
3. whiskers: separate values lying outside the IQR (but still somewhat typical of the data) from outliers
3. empty circles: depict outliers (values surprisingly large or small given all values considered)
4. notches (optional): give a rough impression of the significance of the difference between the medians
The fact that there's just one whisker in each boxplot is, then, due to the extreme skewness of your data: in the case of box 1
the upper limit of the values is the upper limit of the IQR, and in the case of box 2
there exists no value smaller than the median!
Hope this helps.
Upvotes: 3