Histograms Lecture 14 Section 4.4.4 Robb T. Koether

advertisement
Histograms
Lecture 14
Section 4.4.4
Robb T. Koether
Hampden-Sydney College
Fri, Sep 16, 2011
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
1 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
2 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
3 / 41
Introduction
We will learn a third method of displaying quantitative data, the
histogram.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
4 / 41
Introduction
We will learn a third method of displaying quantitative data, the
histogram.
This method takes more effort than the other two, but it is more
flexible and produces a much better display.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
4 / 41
Introduction
We will learn a third method of displaying quantitative data, the
histogram.
This method takes more effort than the other two, but it is more
flexible and produces a much better display.
And, it can be done on the TI-83.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
4 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
5 / 41
Histograms
Definition (Classes)
A class is an interval of values. Typically, it includes the lower endpoint
and does not include the upper endpoint.
Definition (Histogram)
A histogram is a graphical display of quantitative data in which the data
are distributed among classes and each class is represented by a
rectangle. The size of the rectangle is proportional to the number of
observations in the class.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
6 / 41
Histograms vs. Bar Graphs
Bar graphs are for qualitative data
Histograms are for quantitative data.
We indicate this difference by leaving a gap between the bars of a
bar graph and no gap between the rectangles of a histogram.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
7 / 41
Example
Draw a histogram of the rainfall data.
9.52
0.08 6.14
8.68
3.60 14.71 4.01
0.85
4.42
3.41 2.85
2.56
1.58
4.44 0.77
4.76
1.73
2.60 2.56 10.01
Robb T. Koether (Hampden-Sydney College)
Histograms
2.93
6.89
1.92
1.15
2.46
2.03
11.07
5.15
3.02
6.49
Fri, Sep 16, 2011
8 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
9 / 41
Drawing Histograms
Find the maximum value, the minimum value, and the range.
Minimum = 0.08.
Maximum = 14.71.
Range = Max − Min = 14.71 − 0.08 = 14.63.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
10 / 41
Drawing Histograms
Divide the data into classes of equal width.
The classes must not overlap.
Choose the number of classes and the class width.
The choices must satisfy:
(No. of classes) × (Class width) ≥ range.
Choose a convenient starting point.
Write the endpoints of each class.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
11 / 41
Drawing Histograms
Let’s let the class width be 2 (other choices are possible).
Then the number of classes will be at least
14.63
= 7.315,
2
or 8.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
12 / 41
Drawing Histograms
Or we could begin by deciding to use 8 classes (other choices are
possible).
Then the width must be at least
14.63
= 1.82875,
8
or 2.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
13 / 41
Drawing Histograms
Let’s let the starting point be 0.
Classes:
0.00 up to 1.99 (but not including 2.00)
2.00 up to 3.99
4.00 up to 5.99
6.00 up to 7.99
8.00 up to 9.99
10.00 up to 11.99
12.00 up to 13.99
14.00 up to 15.99
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
14 / 41
Drawing Histograms
We may write the classes in either of two ways.
Interval notation: [low, high).
[0, 2),
[2, 4),
[4, 6), etc.
[ and ] mean “include endpoints.”
( and ) mean “exclude endpoints.”
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
15 / 41
Drawing Histograms
Range notation: low - high
0.00 - 1.99,
2.00 - 3.99,
4.00 - 5.99, etc.
With this notation, the endpoints are assumed to be included.
Therefore, be sure the endpoints do not overlap.
Yet be sure that no possible values are left out.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
16 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
17 / 41
Drawing Histograms
Count the number of observations in each class.
Write the frequency distribution.
Class
0.00 - 1.99
2.00 - 3.99
4.00 - 5.99
6.00 - 7.99
7.00 - 9.99
10.00 - 11.99
12.00 - 13.99
14.00 - 15.99
Robb T. Koether (Hampden-Sydney College)
Histograms
Freq.
8
9
6
2
2
2
0
1
Fri, Sep 16, 2011
18 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
19 / 41
Drawing Histograms
Draw horizontal and vertical axes.
On the horizontal axis, show the class limits.
On the vertical axis, show uniform reference points representing
frequencies or percentages that are appropriate for the data,
starting at 0.
Over each class, draw a rectangle whose height is the frequency,
or relative frequency, of that class.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
20 / 41
Drawing Histograms
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0
2
Robb T. Koether (Hampden-Sydney College)
4
6
8
Histograms
10
12
14
16
Fri, Sep 16, 2011
21 / 41
Drawing Histograms
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0
2
Robb T. Koether (Hampden-Sydney College)
4
6
8
Histograms
10
12
14
16
Fri, Sep 16, 2011
22 / 41
Drawing Histograms
We could have used 6 classes of width 2.5, starting at 0.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
23 / 41
Drawing Histograms
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0.0
2.5
Robb T. Koether (Hampden-Sydney College)
5.0
7.5
10.0
Histograms
12.5
15.0
Fri, Sep 16, 2011
24 / 41
Drawing Histograms
Or we could have used 10 classes of width 1.5, starting at 0.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
25 / 41
Drawing Histograms
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0.0
1.5
3.0
Robb T. Koether (Hampden-Sydney College)
4.5
6.0
7.5
9.0
Histograms
10.5
12.0
13.5
15.0
Fri, Sep 16, 2011
26 / 41
Drawing Histograms
Guidelines:
Never use too few or too many classes.
Usually 5 to 12 classes is about right.
Use simple round numbers for the class boundaries.
Mark off the vertical axis uniformly, showing regular reference
points, not the actual frequencies.
The vertical scale must start at 0.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
27 / 41
Comparing Histograms
How do the three histograms compare?
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0.0
Robb T. Koether (Hampden-Sydney College)
1.5
3.0
4.5
6.0
7.5
9.0
10.5
Histograms
12.0
13.5
15.0
Fri, Sep 16, 2011
28 / 41
Comparing Histograms
How do the three histograms compare?
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0
Robb T. Koether (Hampden-Sydney College)
2
4
6
8
10
Histograms
12
14
16
Fri, Sep 16, 2011
28 / 41
Comparing Histograms
How do the three histograms compare?
Frequency
12
11
10
9
8
7
6
5
4
3
2
1
0
Class
0.0
Robb T. Koether (Hampden-Sydney College)
2.5
5.0
7.5
10.0
Histograms
12.5
15.0
Fri, Sep 16, 2011
28 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
29 / 41
TI-83 - Histograms
The TI-83 will draw histograms.
We will work through an example, using simpler data than the
rainfall data.
The following data represent the number of heads that appeared
when 5 coins were tossed at once.
The procedure was repeated 20 times.
2
4
0
3
Robb T. Koether (Hampden-Sydney College)
2
1
3
3
2
3
2
1
Histograms
2
4
1
2
2
3
1
4
Fri, Sep 16, 2011
30 / 41
TI-83 - Histograms
TI-83 Histogram
Enter the data into list L1 .
{2,0,2,...,4} → L1
Press STAT PLOT
Select Plot1.
Press ENTER.
Turn Plot1 on.
Select histogram type.
Specify list L1 .
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
31 / 41
TI-83 - Histograms
TI-83 Histogram
Press WINDOW
Set Xmin to the starting point.
Set Xmax to the last endpoint.
Set Xscl to the class width.
Set Ymin to 0 (or −1 for a margin).
Set Ymax to the maximum frequency.
Press GRAPH. The histogram appears.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
32 / 41
TI-83 - Histograms
TI-83 Histogram
Or, press ZOOM.
Select ZoomStat (#9). The histogram appears.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
33 / 41
TI-83 - Frequency Distributions
TI-83 Histogram
After getting the histogram, press TRACE.
The display shows the first class and its frequency.
Use the left arrow to see the other class frequencies.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
34 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
35 / 41
Assignment
Homework
Read Section 4.4.4, pages 252 - 259.
Let’s Do It! 4.14, 4.16.
Page 259, exercises 30, 31, 33 - 36, 38.
Chapter 4 review, p. 284, exercises 58, 59, 67 - 69.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
36 / 41
Outline
1
Introduction
2
Histograms
Choosing the Classes
Getting the Frequencies
Drawing the Graph
3
Histograms on the TI-83
4
Assignment
5
Answers to Even-numbered Exercises
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
37 / 41
Answers to Even-numbered Exercises
Page 259, Exercises 30, 34, 36, 38
4.30 (a) Qualitative.
(b) A pie chart or a bar graph.
25
20
15
10
5
0
Poor
Fair
Good
Very Excellent
Good
4.34 (a) About 20%.
(b) Yes. It is skewed to the left.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
38 / 41
Answers to Even-numbered Exercises
Page 259, Exercises 30, 34, 36, 38
4.36 (a) 15
(b)
6
5
4
3
2
1
0
20 25 30 35 40 45 50 55 60 65 70
(c) Symmetric, unimodal.
(d) Symmetric, bimodal.
(e) (i) Two-sided.
4
.
(ii) 20
(iii) Accept H0 .
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
39 / 41
Answers to Even-numbered Exercises
Page 259, Exercises 30, 34, 36, 38
4.38 (a) No, they do not look very different. No.
(b)
400
400
350
350
300
300
250
250
200
200
150
150
100
100
50
50
0
0
<10 10 20 30 40 50 60 70
<10 10 20 30 40 50 60 70
Presplit Prices
Postsplit Prices
Now it is clear that the postsplit prices are
signficantly lower than the presplit prices.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
40 / 41
Answers to Even-numbered Exercises
Page 284, Exercises 58, 68
4.58 (a)
(b)
(c)
(d)
(e)
Qualitative.
Quantitative continuous.
Quantitative discrete.
Quantitative continuous.
Quantitative discrete.
4.68 (a) 28%
(b) The ages are skewed to the right.
Robb T. Koether (Hampden-Sydney College)
Histograms
Fri, Sep 16, 2011
41 / 41
Download