Box-and-whisker plot and quartiles
Find the median, quartiles and interquartile range of a data set, and draw its box-and-whisker plot, with the exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, plus what to write in the exam.
Enter the data in a list and run one-variable statistics: the results include the minimum, Q1, the median, Q3 and the maximum. The interquartile range is . For the box plot, set up a box plot of the same list; choose the version that shows outliers if the question asks about them. A value is an outlier if it is more than below or above .
Example
The data set is 12, 6, 31, 9, 15, 5, 10, 13, 6, 3, 16, 8. Find the median and the quartiles, find the interquartile range, and show that the greatest value is an outlier. Draw the box-and-whisker plot.
Put the values in order and split them into two halves of six. The median is the middle of the whole set, is the median of the lower half and is the median of the upper half. The interquartile range is , and an outlier lies more than above or below . The calculator gives the five numbers directly, so you only have to use them: , and the greatest value is above that.
Choose your calculator
How to find quartiles and draw a box-and-whisker plot on a TI-84 Plus CE
1-Var Stats (the five-number summary) | |
Press stat and choose 1:Edit.... Type the data into L1, pressing enter after each value: 12, 6, 31, 9, 15, 5, 10, 13, 6, 3, 16, 8. If L1 already holds numbers, clear them first. |
L1 12 6 31 9 15 ... |
Press stat, then ▶ to move to CALC, and choose 1:1-Var Stats. With the Stat Wizards on, set Xlist to L1 by pressing 2nd 1 (L1), leave FreqList empty, then choose Calculate and press enter. If the Stat Wizards are off, type |
1-Var Stats Xlist:L1 FreqList: Calculate |
Press ▼ to scroll past the mean and the standard deviations until you reach minX, Q1, Med, Q3 and maxX. Minimum , , median , , maximum . So . |
n=12 minX=3 Q1=6 Med=9.5 Q3=14 maxX=31 |
Box plot | |
Press 2nd Y= (STAT PLOT) and choose 1:Plot1. Set Plot1 to On, choose the modified box plot icon for Type (the fourth of the six; it plots outliers as separate points), set Xlist to L1 with 2nd 1, and set Freq to 1. |
Plot1 On Type: modified box plot Xlist:L1 Freq:1 |
Press zoom and choose 9:ZoomStat. The box plot appears with the window set for you. Press trace: the cursor starts at the median, ◀ moves to Q1 and the lower whisker end, and ▶ moves to Q3, the upper whisker end and the outlier. The upper whisker ends at and is plotted on its own, as an outlier. |
Med=9.5 x=16 x=31 |
If the plot does not show, turn off any equations in Y= and check that only the plot you set up is on. The fifth icon is the plain box plot, whose whiskers always reach the minimum and maximum.
How to find quartiles and draw a box-and-whisker plot on a Casio fx-CG50
1-VAR (the five-number summary) | |
Press MENU and choose Statistics. In List 1 type the data, pressing EXE after each value: 12, 6, 31, 9, 15, 5, 10, 13, 6, 3, 16, 8. Clear any old numbers out of the list first. |
List 1 12 6 31 9 15 ... |
Press F2 (CALC), then F1 (1-VAR). Press ▼ to scroll down to minX, Q1, Med, Q3 and maxX. Minimum , , median , , maximum . So . |
n=12 minX=3 Q1=6 Med=9.5 Q3=14 maxX=31 |
Med-box graph | |
Press EXIT to return to the List Editor, then F1 (GRAPH) and F6 (SET). Move down with ▼ to Graph Type, press F6 to see the next set of types and choose MedBox (F2). Set XList to List 1 and Frequency to 1, and turn Outliers On so that outliers are plotted separately. |
Graph Type:MedBox XList:List1 Frequency:1 Outliers:On |
Press EXIT, then F1 (GRAPH1) to draw the box plot. With the graph on screen, press F1 (1-VAR) to see minX, Q1, Med, Q3 and maxX again. The outlier is drawn as a separate point beyond the upper whisker. |
MedBox Q1=6 Med=9.5 Q3=14 |
On the standard setup the quartiles are the medians of the lower and upper halves of the data. If a result differs from your hand method, check that Q1Q3 Type on the Setup screen is Std, not OnData.
How to find quartiles and draw a box-and-whisker plot on a Casio fx-CG100
Summary statistics (the five-number summary) | |
Press HOME and choose Statistics. In List 1 of the List Editor type the data, pressing EXE after each value: 12, 6, 31, 9, 15, 5, 10, 13, 6, 3, 16, 8. |
List 1 12 6 31 9 15 ... |
Press the next-tab key to reach the Setup tab. Highlight the first line and press OK, then choose Calculate Summary Statistics. Highlight line 2, press OK and choose 1-Variable. Check that 1Var XList is List 1. |
Calculate Summary Statistics 1-Variable 1Var XList:List 1 |
Choose Execute and press OK. The Results tab lists minX, Q1, Med, Q3 and maxX: scroll down to see them. Minimum , , median , , maximum . So . |
n=12 minX=3 Q1=6 Med=9.5 Q3=14 maxX=31 |
Box plot | |
Go back to the first line of the Setup tab, press OK and choose Draw Statistics Graph. Highlight Graph1 and press OK, press OK again and choose Box Plot from the menu. Set XList to List 1 and Frequency to 1, and set Outliers to On to show outlier dots. |
Graph1: Box Plot XList:List 1 Frequency:1 Outliers:On |
Choose Execute and press OK: the box plot appears on the Graph tab. Press the next-tab key again to see the summary statistics for the plot on the Results tab. The outlier is drawn as a dot beyond the upper whisker. |
Box Plot Q1=6 Med=9.5 Q3=14 |
Changing the Q1Q3 Type setting can move Q1 and Q3 for the same data. Use the standard setting if you want the same quartiles as the hand method.
How to find quartiles and draw a box-and-whisker plot on a TI-Nspire CX
One-Variable Statistics (the five-number summary) | |
Press home and choose Lists & Spreadsheet. In the top cell of column A type a list name such as data and press enter, then type the values below it, pressing enter after each: 12, 6, 31, 9, 15, 5, 10, 13, 6, 3, 16, 8. |
A: data 12 6 31 9 15 ... |
Press menu → Statistics → Stat Calculations → One-Variable Statistics. Choose 1 list and press enter, then set X1 List to data and press enter. The results fill the next columns: look for MinX, Q1X, MedianX, Q3X and MaxX. Minimum , , median , , maximum . So . |
MinX 3 Q1X 6 MedianX 9.5 Q3X 14 MaxX 31 |
Box plot | |
Select the whole of column A (move to its top cell and press ▲), then press menu → Data → Quick Graph. A Data & Statistics page opens with a dot plot of the data. |
|
Press menu → Plot Types → Box Plot. This is a modified box plot: points beyond the whiskers are plotted individually as outliers. Press menu → Analyze → Graph Trace and use ◀ and ▶ to read Q1, the median, Q3, the whisker ends and the outlier. The outlier is plotted on its own, beyond the upper whisker. |
Box Plot Q1=6 Median=9.5 Q3=14 |
To see a standard box plot whose whiskers reach the minimum and maximum, choose Extend Box Plot Whiskers on the Plot Properties menu. Show Box Plot Outliers brings the outliers back.
Sources. Key presses follow the manufacturers' documentation: the TI-84 Plus CE eGuide, the TI-Nspire eGuide, the Casio fx-CG50 Software User's Guide (version 3.30) and the Casio fx-CG100 online manual.
What to write in the exam
- Write the five values and the IQR. For example, , median , and . Do not write the key presses.
- Show the outlier test when a question asks for it: write and with their values, then compare the data with them. The plot alone does not show the working.
- Draw the plot on a scale. Copy a box plot from the screen with a labelled number line, the box from to with a line at the median, whiskers to the least and greatest values that are not outliers, and each outlier as a separate mark such as a cross.
- Keep the calculator values until the end and round only the final answer, to 3 significant figures unless the question says otherwise.
- Check which papers allow a calculator. In AA SL and AA HL, Paper 1 is calculator-free, so find the quartiles by hand there. In AI SL and AI HL a calculator is allowed on every paper (check your syllabus).
Odd counts and frequency tables
- An odd number of values. The TI-84 Plus CE and, on the standard setting, the Casio calculators leave the median out of both halves before finding and . If your answer differs from the hand method, check the number of values and the method before doubting the calculator.
- Data with frequencies. Put the values in one list and the frequencies in a second list, then give the second list as the frequency in the one-variable statistics screen and in the plot set-up. The two lists must have the same length.
- Comparing two data sets. Draw both plots on the same scale and compare the medians and the interquartile ranges. The steps for the basic statistics are in one-variable statistics.
Error messages and what to do
| Calculator | Message | Usual cause | What to try |
|---|---|---|---|
| TI-84 Plus CE | ERR:STAT PLOT | You tried to draw a graph while a stat plot that uses an empty or undefined list is turned on. | Enter the data in the list the plot uses, or turn that plot off. |
| TI-84 Plus CE | ERR:DIMENSION MISMATCH | The frequency list does not have the same number of values as the data list. | Make the two lists the same length. |
| Casio fx-CG50 | Dimension ERROR | The frequency list does not have the same number of values as the data list. | Check the dimension of the lists and make them the same length. |
| Casio fx-CG50 | Out of Domain | The frequency list contains a negative value. | Frequencies must be 0 or positive: correct the list. |
| Casio fx-CG100 | Dimension ERROR | The frequency list does not have the same number of values as the data list. | Check the dimension of the lists and make them the same length. |
| Casio fx-CG100 | Out of Domain | The frequency list contains a negative value. | Frequencies must be 0 or positive: correct the list. |
| TI-Nspire CX | Dimension mismatch | The data list and the frequency list have a different number of values. | Make the two lists the same length. |
Common mistakes
- Reading the wrong item. The mean and standard deviations come before the quartiles on the results screen: scroll on to minX, Q1, Med, Q3 and maxX.
- Giving the range as the interquartile range. The interquartile range is , not the maximum minus the minimum.
- Using the plain box plot when outliers matter. The plain box plot stretches its whiskers to the minimum and maximum and hides outliers. Use the modified box plot, or turn Outliers on.
- Mixing up the whisker ends. On a plot that shows outliers, the whisker stops at the last value that is not an outlier, not at the maximum.
- Writing key presses as working. Write the five values, the IQR and any outlier calculation. The examiner needs the method, not the keys.
Try it yourself
Real questions from the IB Maths Help question bank. Type your answer and press Mark it: the worked solution and mark scheme then appear. Use your calculator to find the quartiles.
Practise with your calculator
Choose your course to see the practice sets that use this skill. You can also try practice mode or browse every GDC guide.
Quick questions
How do I find the quartiles on a calculator?
Enter the data in a list and run one-variable statistics (1-Var Stats on the TI-84 Plus CE, 1-VAR on the Casio fx-CG50, Calculate Summary Statistics on the fx-CG100, One-Variable Statistics on the TI-Nspire). Scroll down the results to Q1, Med and Q3, and to minX and maxX for the ends of the data.
How do I draw a box-and-whisker plot?
Set up a box plot of the list: Plot1 with the modified box plot type and ZoomStat on the TI-84 Plus CE, the MedBox graph type on the fx-CG50, Box Plot on the Draw Statistics Graph menu on the fx-CG100, or Quick Graph and then Box Plot on the TI-Nspire. Copy the plot onto a labelled scale in your answer.
How do I know if a value is an outlier?
Find the interquartile range, . A value is an outlier if it is more than above or below . Write the two boundaries and compare the data with them. A modified box plot on the calculator marks them for you.
Why does my calculator give different quartiles from my hand method?
Several methods exist for the quartiles of a small data set. The calculators find the median of the lower half and of the upper half of the data, leaving out the median when there is an odd number of values. Check the number of values, and on the Casio calculators check that Q1Q3 Type is the standard setting.