How to create a box plots?
Let us take a sample data to understand how to create a box plot.
Here are the runs scored by a cricket team in a league of 12 matches – 100, 120, 110, 150, 110, 140, 130, 170, 120, 220, 140, 110.
To draw a box plot for the given data first we need to arrange the data in ascending order and then find the minimum, first quartile, median, third quartile and the maximum.
Ascending Order 100, 110, 110, 110, 120, 120, 130, 140, 140, 150, 170, 220 Median (Q2) = (120+130)/2 = 125; Since there were even values
To find the First Quartile we take the first six values and find their median.
Q1 = (110+110)/2 = 110
For the Third Quartile, we take the next six and find their median.
Q3 = (140+150)/2 = 145
Note: If the total number of values is odd then we exclude the Median while calculating Q1 and Q3. Here since there were two central values we included them. Now, we need to calculate the Inter Quartile Range.
IQR = Q3-Q1 = 145-110 = 35
We can now calculate the Upper and Lower Limits to find the minimum and maximum values and also the outliers if any.
Lower Limit = Q1-1.5*IQR = 110-1.5*35 = 57.5 Upper Limit = Q3+1.5*IQR = 145+1.5*35 = 197.5
So, the minimum and maximum between the range [57.5,197.5] for our given data are –
Minimum = 100 Maximum = 170
The outliers which are outside this range are –
Outliers = 220
Now we have all the information, so we can draw the box plot which is as below-
We can see from the diagram that the Median is not exactly at the center of the box and one whisker is longer than the other. We also have one Outlier.
Box Plot
Box Plot is a graphical method to visualize data distribution for gaining insights and making informed decisions. Box plot is a type of chart that depicts a group of numerical data through their quartiles.
In this article, we are going to discuss components of a box plot, how to create a box plot, uses of a Box Plot, and how to compare box plots.
Table of Content
- What is a Box Plot?
- How to create a box plots?
- Uses of a Box Plot
- How to compare box plots?
Contact Us