No Slide Title

download report

Transcript No Slide Title

Chapter 4
Displaying and Summarizing
Quantitative Data
Dealing With a Lot of Numbers…
Summarizing the data will help us when we look
at large sets of quantitative data.
The best thing to do is
We can’t use bar charts or pie charts for
quantitative data, since those displays are for
categorical variables.
Slide 4- 2
Excel Data Sets and Software
Excel data sets for some examples used in the
Could use add-in for Excel – DDXL comes with
the CD in book – to produce most of the graphs in
Slide 4- 3
Histograms: Earthquake Magnitudes
US National Geophysical Data Center data set
 Who: 2410 earthquakes known to have caused
 What: Magnitude (Richter scale ), depth (m),
date, location, and other variables
 When: From 2000 B.C.E. to the present
 All over the earth
Slide 4- 4
Histograms: Earthquake Magnitudes (cont.)
First, slice up the entire span of values covered
by the quantitative variable into equal-width piles
called bins:
Each bin has a width of 0.2
The bins and the counts in each bin give the
distribution of the quantitative variable and
provide the building blocks for the histogram.
Slide 4- 5
Histograms: Earthquake Magnitudes (cont.)
A histogram plots
Here is a histogram of
earthquake magnitudes
Slide 4- 6
Histograms: Earthquake magnitudes (cont.)
A relative frequency
histogram displays the
Faithful to the area
Here is a relative
frequency histogram of
earthquake magnitudes:
Slide 4- 7
Stem-and-Leaf Displays
Stem-and-leaf displays show the distribution of a
quantitative variable while preserving the
individual values.
Contain all the information found in a
Satisfies the
Shows the distribution
Slide 4- 8
Stem-and-Leaf Example
Compare the
histogram and
display for the
pulse rates of 24
women at a
health clinic.
Slide 4- 9
Constructing a Stem-and-Leaf Display
First, cut each data value into leading digits
(“stems”) and trailing digits (“leaves”).
Use the stems to label the bins.
Use only
for each leaf
If working with whole numbers, use the one’s digit
for the leaf
If working with decimals, round to the tenths place
(1st decimal) and use that for the leaf
Slide 4- 10
A dotplot places a dot
along an axis for each
Can be horizontal or
The dotplot to the right
shows Kentucky Derby
winning times, plotting
each race as its own
Slide 4- 11
Think Before You Draw, Again
Now we have options for data displays
 Think carefully about which
: The data
are values of a quantitative variable whose units
are known.
 If satisfied, create a stem-and-leaf display, a
histogram, or a dotplot
Slide 4- 12
Shape, Center, and Spread
When describing a distribution, make sure to
always tell about three things:
, and
Slide 4- 13
What is the Shape of a Distribution?
Does the histogram have a single, central hump
or several separated humps?
Is the histogram symmetric?
Do any unusual features stick out?
Slide 4- 14
• Does the histogram have a single, central hump
or several separated bumps?
• Humps in a histogram are called
• One main peak:
• Two peaks:
• Three or more peaks:
Slide 4- 15
Humps (cont.)
A bimodal histogram has two apparent peaks:
Diastolic Blood Pressure
Slide 4- 16
Is the histogram symmetric?
If you can fold the histogram along a vertical line
through the middle and have the edges match
pretty closely,
Slide 4- 17
Symmetry (cont.)
The thinner ends of a distribution are called the tails
 If one tail stretches out farther than the other, the
histogram is said to be
In the figure below, the histogram on the left is
Slide 4- 18
Anything Unusual?
Do any unusual features stick out?
 Sometimes it’s the unusual features that tell us
something interesting or exciting about the data.
 You should always mention any stragglers, or
outliers, that stand off away from the body of the
 Are there any gaps in the distribution? If so, we
might have data from more than one group.
Slide 4- 19
Anything Unusual? (cont.)
The following histogram has
are three cities in the leftmost bar:
Slide 4- 20
Center of a Distribution – Median
is the value
with exactly half the data
values below it and half
above it.
It is the
(once the data values have
been ordered) that divides
the histogram into two equal
It has the
as the data.
Slide 4- 21
Spread: Home on the Range
Always report a measure of spread along with a measure
of center when describing a distribution numerically.
The range of the data is the
 A single extreme value can make it very large and not
representative of the data overall.
Slide 4- 22
Spread: The Interquartile Range
The interquartile range (IQR) lets us ignore
extreme data values and concentrate on the
middle of the data.
To find the IQR, we first need to know what
Slide 4- 23
Spread: The Interquartile Range (cont.)
Quartiles divide the data into four equal sections.
 One quarter of the data lies below the lower
 One quarter of the data lies above the upper
The difference between the quartiles is the
interquartile range (IQR), so
Slide 4- 24
Spread: The Interquartile Range (cont.)
Lower quartile = 25th percentile
Upper quartile = 75th percentile of the data
The IQR contains the
of the values of the distribution,
as shown in figure:
Slide 4- 25
5-Number Summary
The 5-number summary of a distribution reports the
The 5-number summary for the recent tsunami
earthquake Magnitudes is:
Slide 4- 26
Summarizing Symmetric Distributions – The Mean
When the data is symmetric, use the
instead of the
We use the Greek letter sigma to mean “sum” and
The formula says that to find the mean,
Slide 4- 27
Summarizing Symmetric Distributions – The Mean
The mean feels like the center because it is the point
where the histogram balances:
Slide 4- 28
Summarizing Symmetric Distributions – The Mean
Median is resistant to values that are extraordinarily large
or small
Mean or median?
 If the histogram is
and there are no
outliers, use the
 However, if the histogram is
or with
outliers, you are better off with the
Slide 4- 29
What About Spread? The Standard Deviation
takes into account how
far each data value is from the mean.
is the distance that
Since adding all deviations together would total
zero, we square each deviation and find a type of
average for the deviations.
Slide 4- 30
What About Spread? The Standard
Deviation (cont.)
The variance, notated by
, is found by
summing the squared deviations and (almost)
averaging them:
Slide 4- 31
What About Spread? The Standard Dev (cont.)
The variance is measured in squared units!
is just the square
root of the variance and is measured in the same
units as the original data.
Slide 4- 32
Thinking About Variation
Recall: Statistics is about variation
When the data values are tightly clustered around
the center of the distribution, the IQR and
standard deviation
When the data values are scattered far from the
center, the IQR and standard deviation
Slide 4- 33
Tell - Draw a Picture
When telling about quantitative variables,
start by making a histogram or stem-andleaf display and discuss the shape of the
Slide 4- 34
Tell - Shape, Center, and Spread
Next, always report the
distribution, along with a
If the shape is
If the shape is
of its
and a
, report the
Slide 4- 35
Tell - What About Unusual Features?
If there are multiple modes, try to understand why
If there are any clear outliers and you are
reporting the mean and standard deviation, report
them with the outliers present and with the
outliers removed
Slide 4- 36
What Can Go Wrong?
Don’t make a histogram of a categorical variable—
use a
Don’t look for
of a bar chart
Slide 4- 37
What Can Go Wrong? (cont.)
Choose a bin width appropriate to the data.
Changing the bin width changes the appearance
of the histogram.
Slide 4- 38
What Can Go Wrong? (cont.)
Don’t forget to sort the values before finding the
median or percentiles.
Don’t worry about small differences when using
different methods.
Don’t compute numerical summaries of a
categorical variable.
Don’t round in the middle of a calculation.
Watch out for multiple modes.
Beware of outliers.
Slide 4- 39
What have we learned?
Make a picture!!
With quantitative data use a histogram, stem-andleaf display, or dotplot.
Summarize distributions of quantitative variables
 Measures of center for a distribution include
 Measures of spread include
Slide 4- 40
What have we learned? (cont.)
Use the median and IQR when the distribution is
Use the mean and standard
deviation if the distribution is
Think about the type of variable we are
The Quantitative Data Condition serves as a
check that the data are, in fact, quantitative.
Slide 4- 41
Class Exercise
Number of days six patients of heart transplant survived:
3, 64, 623, 15, 46, 64
Find the median
Find the mean
Find the mode
Find the quartiles
Find the range and inter-quartile range (IQR)
of the data set.
Slide 4- 42
Class Exercise (cont.)
Data: 3, 64, 623, 15, 46, 64
a. What is the median survival time?
Slide 4- 43
Class Exercise (cont.)
Ordered Data: 3, 15, 46, 64, 64, 623
b. What is the mean survival time?
3  15  46  64  64  623 815
 1358
Slide 4- 44
Class Exercise (cont.)
Ordered Data: 3, 15, 46, 64, 64, 623
c. What is the mode of the survival times?
Slide 4- 45
Class Exercise (cont.)
Ordered Data: 3, 15, 46, 64, 64, 623
d. What are the quartiles of the survival times?
Slide 4- 46
Class Exercise (cont.)
Ordered Data: 3, 15, 46, 64, 64, 623
e. Find the range and inter-quartile range (IQR) of
the survival times
Slide 4- 47
Class Exercise
Find the standard deviation of the following data
Slide 4- 48
Class Exercise (cont.)
Ordered data: 3, 4, 5, 5, 5, 6, 7
(obs – mean)
(obs – mean)2
(0)2 = 0
(0)2 = 0
(+1)2 = 1
(+2)2 = 4
Slide 4- 49
Class Exercise (cont.)
s2 =
Taking the square root of the variance we obtain the
standard deviation:
SD =
Slide 4- 50