Describing one-variable data
🖨 Print a self-study sheet Why print?
Every statistical investigation starts by looking at the data. Picture the test scores of two classes side by side: what can we say about them? That is the question of this lesson, and it is the core of free-response question 2 on the AP exam. It appears in almost every other question too. The calculations are short. What earns points is describing what you see in the context of the data and comparing with words like "greater than" and "about the same as".
Variables and displays
First we check what kind of data we have, because the kind decides the display. A categorical variable places each individual in a group (favourite sport, blood type); a quantitative variable takes numerical values for which arithmetic makes sense (height, time). Categorical data are shown with bar charts and summarised with counts or relative frequencies. Quantitative data are shown with dotplots, stemplots, histograms and boxplots.
Looking at a display, what should you say? A full description covers four things, and each one must be tied to the context of the data:
| Feature | What to say |
|---|---|
| Shape | roughly symmetric, skewed right or skewed left; number of peaks |
| Centre | mean or median, with units |
| Variability | standard deviation, range or IQR, with units |
| Unusual features | outliers, gaps, clusters |
Measures of centre and variability
For data we can find the centre in two ways: the mean is , and the median is the middle value of the ordered data. To measure variability we use the standard deviation. The sample standard deviation is roughly the typical distance of the values from the mean. A small value means the data sit close together; a large value means they are spread out. The quartiles and are the medians of the lower and upper halves, and tells us how wide the middle half of the data is.
Why do we sometimes choose the median instead of the mean? Because the median and IQR are resistant: one extreme value hardly moves them. The mean and standard deviation are not like that. In a right-skewed distribution the long tail pulls the mean above the median; in a left-skewed one, below it.
How far out must a value be before we call it unusual? Statistics gives a clear rule. By the rule, a value is an outlier if it is below or above . Let us try it on an example.
Position: z-scores and percentiles
Whether a test score is high depends on how the whole class did. To measure that, we ask how far a value is from the mean, counted in standard deviations. The z-score of a value says how many standard deviations it is from the mean: z=\frac{x-\text{mean}}{\text{standard deviation}}. A negative z-score means the value is below the mean. Another way to describe position is the percentile. The percentile of a value is the percent of the data less than or equal to it. Z-scores have one more advantage: they let us compare values from different distributions, as in the next example.
Comparing distributions
Many students write down two numbers and think they have made a comparison. When comparing two groups, we address shape, centre, variability and unusual features, and use comparative words. Listing the two medians is not a comparison; "the median for A is greater than the median for B" is.
Similar exercises
For the data 2,\ 4,\ 4,\ 5,\ 7,\ 8,\ 9,\ 10,\ 22, find the median, the quartiles and the IQR, and decide whether there are any outliers.
What you need: with n=9 the median is the 5th value; leave it out of both halves.
Show solution
The data are already in order and n=9, so the median is the 5th value, 7.
The lower half is 2,4,4,5, so Q_1=\dfrac{4+4}{2}=4; the upper half is 8,9,10,22, so Q_3=\dfrac{9+10}{2}=9.5. Hence \text{IQR}=9.5-4=5.5.
The upper fence is 9.5+1.5(5.5)=17.75 and the lower fence is 4-8.25=-4.25. Only 22 is beyond a fence.
So the median is 7, Q_1=4, Q_3=9.5, \text{IQR}=5.5, and 22 is an outlier.
Answer. Median 7, \text{IQR}=5.5; 22 is an outlier.
Find the mean and the sample standard deviation of 4,\ 8,\ 6,\ 10,\ 12.
What you need: s=\sqrt{\dfrac{\sum(x_i-\bar x)^2}{n-1}}.
Show solution
The mean is \bar x=\dfrac{4+8+6+10+12}{5}=\dfrac{40}{5}=8.
The deviations from the mean are -4,\ 0,\ -2,\ 2,\ 4, whose squares sum to 16+0+4+4+16=40.
Dividing by n-1=4 gives 10, so s=\sqrt{10}\approx3.162.
So the mean is 8 and the standard deviation is about 3.162.
Answer. \bar x=8, s\approx3.162.
A distribution of house prices has mean 310 thousand dollars and median 260 thousand dollars. Describe the likely shape and say which measure of centre better describes a typical house.
What you need: a mean above the median suggests a long right tail.
Show solution
The mean is greater than the median, which suggests that a few expensive houses pull the mean upward: the distribution is likely skewed right.
Since the median is resistant to those extreme prices, it better describes a typical house price.
So the distribution is likely skewed right, and the median of 260 thousand dollars is the better summary of a typical price.
Answer. Skewed right; the median.
Heights of adult men in a country have mean 170 cm and standard deviation 8 cm.
a) Find the z-score of a man 180 cm tall.
b) What height has z-score -2?
What you need: z=\dfrac{x-\text{mean}}{\text{SD}}, and x=\text{mean}+z\cdot\text{SD}.
Show solution
a) The z-score is z=\dfrac{180-170}{8}=1.25: this man is 1.25 standard deviations taller than the mean.
b) Solving for x gives x=170+(-2)(8)=154 cm.
So the z-score is 1.25, and a height of 154 cm has z-score -2.
Answer. a) 1.25; b) 154 cm.
In a survey of 50 students, 18 come to school by bus, 15 by car, 12 on foot and 5 by bicycle. Find the relative frequency of each category and name a suitable display.
What you need: relative frequency =\dfrac{\text{count}}{\text{total}}.
Show solution
Dividing each count by 50 gives bus \dfrac{18}{50}=36\%, car 30\%, on foot 24\% and bicycle 10\%; together they make 100\%.
The variable "way of coming to school" is categorical, so a bar chart of these relative frequencies is suitable.
So the relative frequencies are 36\%, 30\%, 24\% and 10\%, shown in a bar chart.
Answer. 36\%, 30\%, 24\%, 10\%; a bar chart.
Applied exercises
The prices, in thousands of dollars, of five houses sold on one street are 210,\ 230,\ 245,\ 260,\ 950. Compute the mean and the median, and explain which one a buyer should use to describe a typical price on this street.
What you need: the value 950 is far from the others.
Show solution
The mean is \dfrac{210+230+245+260+950}{5}=\dfrac{1895}{5}=379, and the median is the middle value, 245.
The mean is higher than four of the five prices because the single expensive house pulls it upward, while the median is not affected by that one value.
So the median, 245 thousand dollars, better describes a typical price on this street.
Answer. Mean 379, median 245 (thousand dollars); use the median.
A class of 20 students has mean score 72 and another class of 30 students has mean score 82. Find the mean score of all 50 students.
What you need: add the total scores, not the means.
Show solution
The total for the first class is 20\times72=1440 and for the second 30\times82=2460, so the combined total is 3900.
Dividing by 50 students gives \dfrac{3900}{50}=78.
So the mean score of all 50 students is 78; the simple average \dfrac{72+82}{2}=77 is wrong because the classes have different sizes.
Answer. 78.
Using the five-number summaries of classes A and B in the example above, can we say that class A has an outlier? Use the 1.5\times\text{IQR} rule.
What you need: for class A, Q_1=55, Q_3=75, so \text{IQR}=20.
Show solution
For class A, \text{IQR}=75-55=20, so the fences are 55-30=25 and 75+30=105.
The minimum 40 is above 25 and the maximum 90 is below 105, so no value can lie outside the fences.
So class A has no outliers by the 1.5\times\text{IQR} rule, even though its range is large.
Answer. No outliers.
Four numbers in increasing order are 4,\ 7,\ 9,\ x, where x>9. Find x if the mean equals the median.
What you need: the median of four values is the average of the middle two.
Show solution
With the values in order, the median is \dfrac{7+9}{2}=8, whatever x>9 is.
The mean is \dfrac{4+7+9+x}{4}=\dfrac{20+x}{4}. Setting it equal to 8 gives 20+x=32, so x=12.
Since 12>9, the order is preserved. So x=12.
Answer. x=12.
Marked like the Vietnamese graduation exam: Part I 0.25 points per question; Part II up to 1 point per question (1, 2, 3, 4 correct statements give 0.1, 0.25, 0.5, 1 point); Part III 0.5 points per question.
Part I. Multiple choice
A favourite sport places each person in a group.
Both are based on the middle of the ordered data.
The long left tail pulls the mean down.
The z-score counts standard deviations from the mean.
Part II. True or false
| a) The mean is 6. | ||
| b) The median is 6. | ||
| c) The range is 8. | ||
| d) The IQR is 4. |
Q_1=3 and Q_3=9, so the IQR is 6.
Part III. Short answer
In order: 3,4,7,9,10.
\dfrac{65-50}{6}=2.5.
Show answers and explanations
- Part I, question 1: B. A favourite sport places each person in a group.
- Part I, question 2: D. Both are based on the middle of the ordered data.
- Part I, question 3: A. The long left tail pulls the mean down.
- Part I, question 4: C. The z-score counts standard deviations from the mean.
- Part II, question 1: a) True; b) True; c) True; d) False. Q_1=3 and Q_3=9, so the IQR is 6.
- Part III, question 1: 7. In order: 3,4,7,9,10.
- Part III, question 2: 2.5. \dfrac{65-50}{6}=2.5.