The Five Number Summary is an enormous ly useful measure of the variability
within a data set. It has the advantage of being quick and easy to calculate,
while also giving us an accurate picture of the spread of the data.
As you might gather from the name, the five number summary consists of five
numbers that summarize your data set. The five numbers are: the minimum, quartile 1,
median, quartile 3, and the maximum. The minimum is the smallest number in the
data set. The maximum is the largest number in the data set. The median is the
middle number in the data set, and is calculated using a median split, such
that if there is no actual middle number, we use an average of the two numbers
on either side. Quartile 1 is the first quartile, also known as the 25th
percentile: the middle of the scores between the minimum and the median.
Quartile 3 is the third quartile, also called the 75th percentile: it's the
middle score between the median and the maximum. The interquartile range is the
difference between quartile 3 minus quartile 1, or the range in the middle
half of the data. The interquartile range is more stable because it cannot be
affected by outliers. Using data set D (shown here) and what we have just learned
about the inter quartile range, we can see that the minimum is 1, quartile 1 is 3,
the median is 3.5, quartile 3 is 9, and the maximum is 20. We can see that
the outlier affects the range, but not the interquartile range.
Now, if you are particularly clever, you may recognize that the five number
summary gives you exactly the same information as a box plot. The box plot
is the graphic representation of the five number summary. Using the data set
World95.sav, we will now create a five number summary and a box plot using JASP.
The data set World95.sav is demographic data from around the world from the year 1995.
This data set, along with many others, is available in our class folder,
and you can find newer similar data sets online. This data set was created in SPSS
but JASP will easily open these types of files, which you will recognize by the
.SAV suffix. I have placed the World95.sav data set on my computer desktop.
That way, the steps that I show you can be followed by everyone. Open the data
set by clicking on the upper left corner, selecting Open -> Computer -> Desktop -> World95.sav,
then clicking Open. One advantage to opening SPSS files in JASP is that
JASP will import the variable settings and the variable labels from the SPSS
data set. This means less work for you in data cleaning. So let's jump right in!
Each of the numbers in a 5 number summary is a descriptive statistic, so
computing a 5 number summary in JASP uses the Descriptives menu.
Go to Descriptives -> Descriptive statistics. In the Results pane, we already see the
table where the descriptive statistics are going to appear. We are interested in
the variables "average female life expectancy" and "average male life
expectancy." I am going to show you this technique using "average female life
expectancy" and later you can practice doing these same steps for "average male
life expectancy." You can see that the Results table is automatically updated
whenever you add or remove a variable in JASP.
This table has many of the numbers that we need, but not all of the numbers
that we need... and it has some numbers that we do not need. Let's fix that.
Click on the disclosure triangle next to Statistics. Here we find a list of
available statistics for our variables. We do not need mean or standard
deviation. In order to get a five number summary, we need the minimum, and the
maximum (which are already selected), quartiles, and the median... and actually we
wouldn't NEED to choose the median: it's the same as quartile 2. And if you look
at the table you can see that both the median and the 50th percentile are 74.
Two names for the same thing. Now we need a Boxplot. Click on the disclosure
triangle next to Plots and click the option for Boxplots. If we want to know
the case numbers for extreme values, click on Label Outliers. We can add Color
to our Boxplot. The Violin element adds curves - which sometimes look like the
curves of a violin profile - that can help us visualize the distribution. The Jitter
element offsets the data points, making it easier to see their density. Of course,
if you add all of these elements, it can make the box plot harder to interpret.
So I'm going to turn off some of these options and leave just the outliers with
labels. Before we move on though, let me point out that JASP intends for you to
use these options individually to better understand your data.
For example, you might turn on the violin element, take a minute to look at the
results, and then when I'm done examining the data, I would turn OFF those options,
and leave just the Boxplot. Half of our data on life expectancy are clustered at
the upper end of the Plot. The lower half of the plot kind of trickles out.
The extreme values, in this case, are countries with a much lower-than-expected
life expectancy for females. For example, case 103, let's look at that.
Click on the disclosure triangle in the left column. Now we can see our data.
Scroll down. Case 103 is Uganda. Average female life expectancy in Uganda is 43
years, 41 for males. We could look at other statistics in this country and
perhaps begin to formulate some ideas or some research questions to follow up.
And we could easily flip back to the Boxplot and we can look for other outliers:
1, 109, & 22. Let's go back to the data: 109 is Zambia, case number 1 is Afghanistan,
and case 22 is Central African Republic. Now, of course, these data are from 1995.
We could get an updated data set to see what changes have occurred in the last
25 years. In a different type of data set, where these outliers represented
individual scores on a personality test, for example, we might examine these
outliers to see whether we wanted to retain them in our data, or winsorize
them, or remove them. So I'm done with this outlier option and I will turn it off
to just have that clean Boxplot for
printing. In fact, let me show you how I am going to export these results to
PowerPoint, and you can see how easily that is done in JASP. Selecting Copy
from any output copies it to the clipboard, where you can then paste it
into another document or file.
Using the output from JASP, let's create the five number summary. First of all,
notice that the quartiles are actually listed as "Percentiles." The 25th
percentile is the same as the first quartile ;the 75th percentile is the
third quartile; and the median is always the same as the 50th percentile, which is
also called quartile 2. So continuing with the five number summary, the minimum
is 43, the first quartile 66.5, the median 74, (notice that the median is the same as
the second quartile), and the third quartile is 78, the maximum is 82.
So to reinforce the idea that we can display our data set as numbers or pictures,
let's look at the Boxplot. You can see that the minimum, maximum, and the lines
of the box all matched the numbers from the five number summary. From these
output, we can tell that in half of these countries for 1995, female life
expectancy was 74 or greater, the upper 50% of countries were between 74 and 82
years - an 8 year gap, indicating that life expectancy is reaching its maximum.
In the lower half of the distribution there is much more variability. In the lowest
quartile, the bottom whisker of the box plot, some countries have life
expectancies between age 43 and 66.5. This suggests that female life
expectancy is unnaturally brief in a handful of countries. We have already
looked at the data set to find out what those countries are. But now it's your
turn: create a box plot and a five number summary for "average male life expectancy".
Do some comparisons with what you find for female life expectancy. Are the life
expectancies similar or different? Who lives longer on average?
If you do it right, your answer will look like this:
Alternatively, your professor may ask you to find a more current version of these
data and replicate these techniques on that data.
And that is how you can create a 5-number summary and a boxplot in JASP.