Doing a Box Plot
With a Calculator
Stat 201
Suppose that you have the following sample:
308
113
126
195
185
356
195
166
485
155
223
137
183
300
346
700
1000
The box plot for these data is:

We will show below how to calculate these numbers.
Q1 = first quartile
Q2 = median
Q3 = third quartile
To do this we have to order the sample from smallest to largest:
|
Position |
Ordered Sample |
|
1 |
113 |
|
2 |
126 |
|
3 |
137 |
|
4 |
155 |
|
5 |
166 |
|
6 |
183 |
|
7 |
185 |
|
8 |
195 |
|
9 |
195 |
|
10 |
223 |
|
11 |
300 |
|
12 |
308 |
|
13 |
346 |
|
14 |
356 |
|
15 |
485 |
|
16 |
700 |
|
17 |
1000 |
Next, we need to calculate the positions and values of
Q1 = first quartile
Q2 = median
Q3 = third quartile
We do this on the following table:
|
What to Calculate |
Position of the quartiles (Note that these are not the quartile.) |
Quartile |
|
|
Q1 |
(n+1)(.25) = (17+1)(.25) = 4.5 |
Since the position ends in 0.5 we average the sample value in position 4 and 5 (155+166)/2 = 157.5 |
This value is the lower side of the box. |
|
Q2 |
(n+1)(.50) = (17+1)(.5) = 9 |
We take the value in position 9 which is 195 |
This value is the line in the middle of the box |
|
Q3 |
(n+1)(.75) = (17+1)( .75) = 13.5 |
Since the position ends in 0.5 we average the sample value in position 13 and 14 (346+356)/2 = 351 |
This value is the upper side of the box. |
We can now calculate the interquartile range = IQR=351-157.5=193.5
Now we need to calculate the fences:
|
Fences (These points are not plotted in the box plot) |
Name |
|
|
Upper inner fence |
|
|
Upper outer fence |
|
|
Lower inner fence |
|
|
Lower outer fence |
For convenience we show the ordered sample again:
|
Position |
Ordered Sample |
|
1 |
113 |
|
2 |
126 |
|
3 |
137 |
|
4 |
155 |
|
5 |
166 |
|
6 |
183 |
|
7 |
185 |
|
8 |
195 |
|
9 |
195 |
|
10 |
223 |
|
11 |
300 |
|
12 |
308 |
|
13 |
346 |
|
14 |
356 |
|
15 |
485 |
|
16 |
700 |
|
17 |
1000 |
We now calculate the values of the adjacent points and those of the mild and extreme outliers:
We now we have all the values we need to plot the box plot.