0% found this document useful (0 votes)
2 views

lecture_2

Uploaded by

barunjikumwenda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

lecture_2

Uploaded by

barunjikumwenda
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Organising Data

Organising Data
Organising Data
Raw data

Raw data
Information obtained by observing values of a variable is called
raw data
if the variable is qualitative then the data are called
qualitative data
if the variable is quantitative then the data are said to be
quantitative data
quantitative data obtained from a discrete variable are also
referred to as discrete data
quantitative data obtained from a continuous variable are also
referred to as continuous data
Organising Data
Data presentation

Frequency distribution for qualitative data


lists all categories and the number of elements/observations
that belong to each category
Organising Data
Data presentation
Frequency distribution for qualitative data

Example
The following are the highest college degrees held by CEO s of
25 randomly selected companies;
Bachelors, Bachelors,Bachelors, None,Doctorate, Masters,
Doctorate, Masters, None,
Masters,Masters,Masters,Masters,Masters,
Bachelors,Bachelors,Bachelors,Masters,Masters,Bachelors,
Masters, None, None, None, Masters.
Note that the variable of interest is “highest college degree”,
and has four categories under it namely; None, Bachelors,
Masters, Doctorate.
The following is the corresponding frequency distribution;
Organising Data
Data presentation
Example

Example
Highest college degree Frequency (number of CEO s)
Bachelors 7
Masters 11
Doctorate 2
None 5
Organising Data
Data presentation
Frequency distribution for qualitative data

Points to note
P
Denote frequency by f , we note that f = 25, which equals
the total number of observations
Thus in general the sum of the frequencies equals the total
number of observations
Organising Data
Data presentation
Relative frequency and Percentage

Relative frequency and percentage


the relative frequency of a category is obtained by dividing the
frequency (of a category) by the total frequency
i.e. if f denotes frequency and fi is the frequency of a
fi
category then the relative frequency of the category is P
f
the percentage for a category is obtained by multiplying the
fi
relative frequency by 100 i.e. 100 × P
f
in the following table we present the relative frequency and
percentage for each category
Organising Data
Data presentation
Relative frequency and percentage

Relative frequency and percentage


Highest college degree Relative frequency Percentage
7
Bachelors = 0.28 0.28 × 100 = 28%
25
11
Masters = 0.44 0.44 × 100 = 44%
25
2
Doctorate = 0.08 0.08 × 100 = 8%
25
5
None = 0.2 0.2 × 100 = 20%
25
Organising Data
Data presentation
Relative frequency and Percentage

Relative frequency and percentage


Note that the relative frequencies add up 1
Also note that the percentages add up 100
Organising Data
Bar graph

Bar graph
comprises bars whose heights correspond to the frequencies of
the categories
to construct a bar graph you need
two axes; the horizontal and vertical axes
place the categories on the horizontal axis and mark the
frequencies along the vertical axis
for each category, draw a bar whose height corresponds to the
frequency of the category
Note that the bars should be disjoint
Organising Data
Bar graph
Bar graph

Bar graph - example


recall the frequency table we looked at earlier on i.e. the
frequency table on highest college degrees held by CEO s
to refresh your memory here is the frequency table again
Organising Data
Bar graph
Bar graph

Example - The frequency table again


Highest college degree Frequency (number of CEO s)
Bachelors 7
Masters 11
Doctorate 2
None 5
Organising Data
Bar graph
Bar graph

Bar graph - example


following the steps outlined earlier on how to construct a bar
graph, the following is the corresponding bar graph
Organising Data
Bar graph
Bar graph

Bar graph
Organising Data
Bar graph
Bar graph

Points to note
note that bar graphs are ideal for presenting qualitative data
the above bar graph can be transposed in which case
the categories will be on the vertical axis, while the frequencies
will be on the horizontal axis
so for each category, draw horizontal bar whose length
corresponds to the frequency of the category
following this alternative procedure we obtain the following
bar graph
Organising Data
Bar graph
Bar chart

Bar chart
Organising Data
Pie chart

Pie chart
Qualitative data can also be graphically presented using a pie
chart
basically a pie chart is a circular diagram divided into portions
such that each portion represents a category in our data
thus each category has a corresponding portion with the size
of the portion being proportional to the frequency of the
category
Before we discuss how to construct a pie chart, let’s recall
high/secondary school geometry
a circle has 360◦
Organising Data
Pie chart
Pie chart

constructing a pie chart


To construct a pie chart, first determine the angle sizes for
each category by
multiplying the relative frequency of a class by 360◦
Then divide the circle into portions with the sizes of the
portions determined by the corresponding angles.
In the following table we compute the angle sizes for each
category in the preceding example (on highest college degrees)
Organising Data
Pie chart
Pie chart

Example - computing angle sizes


Highest college degree Relative frequency Angle size
7
Bachelors = 0.28 0.28 × 360◦ = 100.8◦
25
11
Masters = 0.44 0.44 × 360◦ = 158.4◦
25
2
Doctorate = 0.08 0.08 × 360◦ = 28.8◦
25
5
None = 0.2 0.2 × 360◦ = 72◦
25
Organising Data
Pie chart
Pie chart

Example - Pie chart


This yields the following pie chart
Organising Data
Pie chart
Pie chart

Pie chart
Organising Data
Frequency distribution for quantitative data

Ungrouped / singled-valued frequency distribution


lists all observations and the number of elements/observations
that belong to each category
the observations are listed starting with the smallest
observation
ideal when there are a few values/observations in the data set
Organising Data
Frequency distribution for quantitative data
Frequency distribution for quantitative data

Example
The following shows the number of patients visiting a clinic
per day for twenty-three days;
50, 65, 35, 40, 57, 65, 35,29, 33, 44, 56, 60, 44, 50, 58, 46,
47, 35, 36, 44, 57, 60, 57
Note that the variable of interest is “ number of patients”
The following is the corresponding frequency distribution;
Organising Data
Frequency distribution for quantitative data
Bar graph

Example - ungrouped frequency table


Number of patients Frequency (number of days)
29 1
33 1
35 3
36 1
40 1
44 3
46 1
47 1
50 2
56 1
57 3
58 1
60 2
65 2

You might also like