Class - UniMAP Portal

Download Report

Transcript Class - UniMAP Portal

2.1 Summarizing Qualitative Data



A graphic display can reveal at a glance the main
characteristics of a data set.
Three types of graphs used to display qualitative data:- bar graph
- pie chart
- line chart
Their presentation are depend on the nature of data,
whether the data is in quantitative (ex. income and CGPA) or
qualitative (ex. Gender and ethnic group).
Types of Graph
Qualitative Data
Example 2.1 :Table 2.1 shows that the data of 25 UNIMAP students with
their data and background.
Code used :
• For gender: 1 is male and 2 is
female
• For ethnic group: 1 is Malay, 2
is Chinese, 3 is Indian and 4 is
others
• Not much information can be
obtained from the data 1 in the
raw form. It has to be
summarized so that we can
get more informations.
Table 2.1 : Data of 25 UNIMAP students

If data from table 2.1 summarized into gender and ethnic
group, then the frequency tables can get as below :
Observation
Frequency
Male
28
Female
22
Total
50
Table 2.2: Frequency Table for the Gender
Observation
Malay
Frequency
33
Chinese
9
Indian
6
Others
2
Total
50
Table 2.3: Frequency Table for the Ethnic Group
2.1.1 Bar Chart
 Bar chart is used to display the frequency distribution in the
graphical form. It consists of two orthogonal axes and one of
the axes represent the observations while the other one
represents the frequency of the observations. The
frequency of the observations is represented by a bar.
*Bar chart is for data from Table 2.3.
Figure 1: Bar Chart of the Ethnic Group
2.1.2 Pie Chart
 Pie Chart is used to display the frequency distribution. It
displays the ratio of the observations. It is a circle consists of
a few sectors. The sectors represent the observations while
the area of the sectors represent the proportion of the
frequencies of that observations.
 *Pie chart is for data from Table 2.2.
Figure 2: The Pie Chart for the Gender
2.1.3 Line Chart
Line chart is used to display the trend of observations. It consists of two
orthoganal axes and one of the axes represent the observations while the
other one represents the frequency of the observations. The frequency
of the observations are joint by lines.
Example :
Table 2.4 below shows the number of sandpipers recorded between
January 1989 till December 1989.

Jan
Feb
Mar
Apr
May
June
July
Aug
Sept
Oct
Nov
Dec
10
7
5
10
39
7
260
316
142
11
4
9
Table 2.4 : The number of sandpipers
Figure 3: The line Chart for the numbers of common Sandpipers
2.2 Summarizing Quantitative Data
2.2.1 Frequency Distribution
 When summarizing large quantities of raw data, it is often useful to
distribute the data into classes. In determining the classes, there is no
spesific rules but statistician suggest the number of classes are between 5
to 20. Table 1.3 shows that the number of classes for Students` CGPA.
CGPA (Class)
Frequency
2.50 - 2.75
2
Table 2.5: The Fequency Distribution of
2.75 - 3.00
10
the Students’ CGPA
3.00 - 3.25
15
- 3.50
 A3.25
frequency
distribution for 13
quantitative data lists all the classes and the
3.50 - 3.75
number
of values that belong7 to each class.
3.75 - 4.00
3
 Data presented in the form of a frequency distribution are called grouped
Total
50
data.

For quantitative data, an interval that includes all the values that fall
within two numbers; the lower and upper class which is called class.
Class is in first column for frequency distribution table.
*Classes always represent a variable, non-overlapping; each value is belong to one
and only one class.

The numbers listed in second column are called frequencies, which
gives the number of values that belong to different classes.
Frequencies denoted by f.
Table 2.6 : Weekly Earnings of 100 Employees of a Company
Variable
Third class
(Interval Class)
Lower Limit
of the sixth class
Weekly Earnings
(dollars)
Number of
Employees, f
801-1000
9
1001-1200
22
1201-1400
39
1401-1600
15
1601-1800
9
1801-2000
6
Upper limit of the sixth class
Frequency
column
Frequency
of the third
class.


The class boundary is given by the midpoint of the upper limit of one class
and the lower limit of the next class.
The difference between the two boundaries of a class gives the class width;
also called class size.
Formula:
- Class Midpoint or Mark
Class midpoint or mark = (Lower Limit + Upper Limit)/2
- Finding The Number of Classes
Number of classes =
or Number of classes =
n- no of observations.
- Finding Class Width Between Two Boundaries
c= Upper boundary – Lower
Boundary
n
- Finding Class Width For Interval Class
1  3.3log n
Approximate class width = (Largest value – Smallest
value)/Number of classes
* Any convenient number that is equal to or less than the smallest values in the data set can
be used as the lower limit of the first class.
2.2.2 Cumulative Frequency Distributions


A cumulative frequency distribution gives the total number of values that fall
below the upper boundary of each class.
In cumulative frequency distribution table, each class has the same lower limit
but a different upper limit.
Table 2.7 : Class Limit, Class Boundaries, Class Width , Cumulative Frequency
Weekly
Number of
Class
Class
Cumulative
Earnings
Employees
Boundaries
Width
Frequency
(dollars)
,f
(Class Limit)
801-1000
9
800.5 –
1000.5
200
9
1001-1200
22
1000.5 –
1200.5
200
9 + 22 = 31
1201-1400
39
1200.5 –
1400.5
200
31 + 39 = 70
1401-1600
15
1400.5 –
1600.5
200
70 + 15 = 85
1601-1800
9
1600.5 –
1800.5
200
85 + 9 = 94
1801-2000
6
1800.5 –
200
94 + 6 = 100


Tabular presentation for quantitative data is usually in the
form of frequency distribution that is a table represent the
frequency of the observation that fall inside some specific
classes (intervals) .
There are few graphs available for the graphical presentation
of the quantitative data.
Most popular
graphs
Frequency Polygon
Histogram
Ogive

Histogram
The histogram looks like the bar chart except that the
horizontal axis represent the data which is quantitative in
nature. There is no gap between the bars.

Frequency Polygon
The frequency polygon looks like the line chart except that the
horizontal axis represent the class mark of the data which is
quantitative in nature.

Ogive
Ogive is a line graph with the horizontal axis represent the
upper limit of the class interval while the vertical axis
represent the cummulative frequencies.
2.3 Exploratory Data Analysis

Exploratory data analysis (EDA) is an approach to analyze data for the
purpose of formulating hypotheses worth testing, complementing the
tools of conventional statistics for testing hypotheses.

The goal of EDA is to discover the patterns in data.

EDA is an approach for data analysis that employs a variety of
techniques to (mostly graphical) :
i. Maximize insight into a data set.
ii. Uncover underlying structure.
iii. Extract important variable.
iv. Detect outliers and anomalies.
v. Test underlying assumption.
vi. Develop parsimonious models.
vii. Determine optimal factor settings.




Another technique that is used to present quantitative data is
the stem-and-leaf display.
An advantage of a stem-and-leaf-display over a frequency
distribution is that by preparing stem-and-leaf display, we do
not lose information on individual observations.
A stem-and-leaf only for quantitative data.
In a stem-and-leaf display of quantitative data, each value is
divided into two portions; a stem and leaf. The leaves for each
stem are shown separately in a display.
Steps to construct a stem-and-leaf plot:
i.
Split each data into two parts; first part contains the leading digit
(stem), second part contains the twilling digit (leaf).
ii.
Draw a vertical line and write the stems on the left side, arranged
in increasing or decreasing order.
iii.
Read the leaves for all data and record them next to the
corresponding stems on the right side of the vertical line.
iv.
Rank the leaves for each stem in increasing order.
Example :The following are the scores of 30 college students on a statistics
test.
75 52 80 96 65 79 71 87 93 95
69 72 81 61 76 86 79 68 50 92
83 84 77 64 71 87 72 92 57 98
Stems
5
2
Leaf for 52
6
Stem-and-leaf display
7
5
Leaf for 75
8
9
For the score of the first student, which is 75, 7 is the stem and 5 is the leaf.
For the score of the second student, which 52, 5 is the stem and 2 is the leaf.
Observed from data, the stems for all scores are 5,6,7,8 and 9 because all
scores lie in the range 50 to 98. After we have listed the stems, we read the
leaves for all scores and record them next to the corresponding stems at
the right side of the vertical line.
5
6
7
8
9
2
5
5
0
6
0
9
9
7
3
7
1
1
1
5
8
2
6
2
4
6 9 7 1 2
3 4 7
2 8
Stem-and-leaf display of test scores.
Now we read all the scores and write the leaves on the right
side of the vertical line in the rows of corresponding stems.
By looking at the stem-and-leaf display of test scores, we can
observed how the data values are distributed. For example,
the stem 7 has the highest frequency, followed by stems
8,9,6 and 5. The leaf for each stem of the stem-and-leaf
display of test scores are rank in increasing order and
presented as below :
5 0 2 7
6 1 4 5 8 9
7 1 1 2 2 5 6 7 9 9
Ranked stem-and-leaf display of
8 0 1 3 4 6 7 7
test scores.
9 2 2 3 5 6 8
* Analyze – There are 9 out of 30 college students score
between 71 and 79.

At an outpatient testing center, the number
of cardiograms performed each day for 20
days is shown. Construct a stem and leaf plot
for the data
25
14
36
32
31
43
32
52
20
02
33
44
32
57
32
51
13
23
44
45
0
2
1
3
4
2
0
3
5
3
1
2
2
2
4
3
4
4
5
5
1
2
7
2
3
6