Section 1.6 Frequency Distributions and Histograms.
-
Upload
claire-woods -
Category
Documents
-
view
212 -
download
0
Transcript of Section 1.6 Frequency Distributions and Histograms.
Section 1.6
Frequency Distributions and Histograms
Constructing Histograms
Say we have the following dataset:
5 4 3 4 6 5 2 3 2 7 4 6 3
4 6 4 5 3 7 6 1 4 7 5 8 3
And we want to construct a histogram
The Classes
• Define the interval width for the horizontal axis• All intervals must be the same width
– The range of our data is small, so define the bars to be width = 1
• The range includes the left endpoint but not the right endpoint.– So the first interval is the range 0 <= X < 1
The Classes
• There is no rule governing how wide to make the intervals.
• However, too many intervals will spread out your data over many bars so that your histogram looks flat, and too few intervals will condense your data into 1 or 2 bars. Neither of these is a useful plot.
• The more data you have, the more intervals you can have
Frequency Tables
• Make a table to define each class and the number of elements in that class (frequency)
Note:
A square bracket means the endpoint is included.
A parenthesis means the endpoint is NOT included.
Class Frequency
[ 0 , 1 )
[ 1, 2 )
[ 2 , 3 )
[ 3 , 4 )
[ 4 , 5 )
[ 5 , 6 )
[ 6 , 7 )
[ 7 , 8 )
[ 8 , 9 )
[ 9, 10 )
0
1
5
4
4
1
2
3
0
6
Plot the Frequencies
• On the graph, draw a bar for each class• The height of the bar is the frequency of that
class
Frequency Histogram• What you have made is a histogram that
plots the frequency
Alternative methods
Class Frequency Relative Frequency
[ 0 , 1 ) 0
[ 1, 2 ) 1
[ 2 , 3 ) 2
[ 3 , 4 ) 5
[ 4 , 5 ) 6
[ 5 , 6 ) 4
[ 6 , 7 ) 4
[ 7 , 8 ) 3
[ 8 , 9 ) 1
[ 9, 10 ) 0
• Sometimes it is more useful to draw relative frequency histograms.
• Divide the frequency of each class by the sample size to obtain relative frequency.
• Convert to a percent.
0 %
3.8%
7.7%
19.2%
23.1%
15.4%
15.4%
11.5%
3.8%
0 %
Relative Frequency Histogram• Plot percentages instead of frequencies
• Many computer programs produce this type of histogram
Interpreting Histograms
• Histograms can be used to describe the properties of a distribution: – Location– Shape– Modality
• They can also identify outliers
Cumulative Distributions
• Another way to express our data is in a cumulative distribution.
• Instead of percentages for each class, we use percentages for <= (less than or equal to) each class.
Cumulative Distributions, con’t
• Add a column to the relative frequency table.
• Add the percents of all preceding rows for each class.
Class Freq Relative Freq.
Cumulative Frequency
[0,1) 0 0 %
[1,2) 1 3.8 %
[2,3) 2 7.7 %
[3,4) 5 19.2 %
[4,5) 6 23.1 %
[5,6) 4 15.4 %
[6,7) 4 15.4 %
[7,8) 3 11.5 %
[8,9) 1 3.8 %
[9,10) 0 0 %
0 %
0 + 3.8 = 3.8 %
3.8 + 7.7 = 11.5 %
11.5 + 19.2 = 30.7 %
30.7 + 23.1 = 53.8 %
53.8 + 15.4 = 69.2 %
69.2 + 15.4 = 84.6 %
84.6 + 11.5 = 96.1 %
96.1 + 3.8 = 99.9 %
99.9 ~ 100 %