Lecture 2 on Frequency Distribution and Graph
Lecture 2 on Frequency Distribution and Graph
Frequency Distributions
and Graphs
1 2 6 7 12 13 2 6 9 5
18 7 3 15 15 4 17 1 14 5
4 16 4 5 8 6 5 18 5 2
9 11 12 1 9 2 10 11 4 10
9 18 8 8 4 14 7 3 2 6
Class Limits
Frequency
(in miles)
1-3 10
4-6 14
7-9 10
10-12 6
13-15 5
16-18 5
Total 50
k 1 2 3 4 5 6 7 8 9 10
2k 2 4 8 16 32 64 128 256 512 1,024
2 to k rule
Essentially we would look to construct k
classes for our frequency distribution, when
the value of 2k first exceeds the number of
observations in our sample. So, if we had a
sample with 39 observations, we would first
consider constructing 6 classes, because 26
= 64, the first power of 2 with a value larger
than the sample size of 39.
A guide, not a dictator.
Strictly speaking the 2k rule is a guide, not a
rule. If the 2k rule suggests you need 6
classes, also consider using 5 or 7
classes ... but certainly not 3 or 9.
Class interval or class width
H L
w
k
H : the highest value, L: the smallest value
Class interval can also be estimated
based on # of observations
H L
w
1 3.322 ln n
Relative frequency
o Relative frequency of a class is the
frequency of that class divided by to total
number of frequency.
f
RF
n
Example
These data represent the record high
temperatures for each of the 50 states.
Construct a grouped frequency distribution for
the data using 7 classes.
112 100 127 120 134 118 105 110 109 112
110 118 117 116 118 122 114 114 105 109
107 112 114 115 118 117 118 122 106 110
116 108 110 121 113 120 119 111 104 111
120 113 120 117 105 110 118 112 114 114
Class Relative Cumulative
Class limits boundaries Frequency frequency frequency
100-104 99.5-104.5 2 0.04 2
105-109 104.5-109.5 8 0.16 10
110-114 109.5-114.5 18 0.36 28
115-119 114.5-119.5 13 0.26 41
120-124 119.5-124.5 7 0.14 48
125-129 124.5-129.5 1 0.02 49
130-134 129.5-134.5 1 0.02 50
Histogram
A histogram is a graph that displays the data
by using contiguous vertical bars (unless the
frequency of a class is 0) of various heights to
represent the frequencies of the classes.
Example
Construct a histogram to represent the data
shown below for the record high temperature:
Class
boundaries Frequency
99.5-104.5 2
104.5-109.5 8
109.5-114.5 18
114.5-119.5 13
119.5-124.5 7
124.5-129.5 1
129.5-134.5 1
18
15
Histogram
12
15
Frequency
12
Polygone
9
6
3
99.5 104.5 109.5 114.5 119.5 124.5 129.5
The Ogive is a graph that represents the
cumulative frequencies for the classes in a
frequency distribution.
Class Cumulative
boundaries Frequency Frequency
99.5-104.5 2 2
104.5-109.5 8 10
109.5-114.5 18 28
114.5-119.5 13 41
119.5-124.5 7 48
124.5-129.5 1 49
129.5-134.5 1 50
Cumulative Frequency Polygone
50
40
30
20
10
99.5 104.5 109.5 114.5 119.5 124.5 129.5
Other types of Graphs
Bar Chart
Bar Chart is use to represent a frequency
distribution for a categorical variable, and the
frequencies are displayed by the heights of
vertical bars.
Example
The table shown here displays the number of
crimes investigated by law enforcement
officers in U.S. national parks during 1995.
Construct a Bar chart for the data.
Type Number
Murder 13
Injured 34
Robbery 29
Attack 164
164
150
100
50 34 29
13
Murder
Injured
Robber
Attack
y
41 54 47 40 39 35 50 37 49 42 70 32
44 52 39 50 40 30 34 69 39 45 33 42
44 63 60 27 42 34 50 42 52 38 36 45
35 43 48 46 31 27 55 63 46 33 60 62
35 46 45 34 53 50 50
Lab 2 (Cont.)
1) Construct a frequency distribution using
seven classes. Include relative frequency,
percentage and Cumulative frequency.
2) Construct a histogram, frequency poly-
gone, and Ogive.
3) Develop a stem-and-leaf plot for the data.