02 Quantitative - Reasoning
02 Quantitative - Reasoning
Quantitative Reasoning-
I
Muhammad Arslan Bhatti
If there is a remainder, it is
placed in the LSB of the binary
number. If there is no remainder,
a 0 is placed in the LSB. The
result of the division is brought
down and the process is
repeated until the result of
successive divisions has been
reduced to 0.
M. Arslan Bhatti, Department of Math & Stat 9
.3 Negative Numbers
If a decimal number is positive, it has a
plus sign; if a number is negative, it has a
minus sign. In binary number systems,
such as computers, it is not possible to
use positive and negative symbols to
represent the polarity of a number. One
method of representing a binary
number as either a positive or
negative value is to use an extra
digit, or sign bit, at the MSB side of the
number. In the sign bit position, a 0
M. Arslan Bhatti, Department of Math & Stat 10
Another method of expressing a negative number in a digital system is by using
the complement of a binary number. To complement a binary number,
change all the 1s to 0s and all the 0s to 1s. This is known as the 1’s complement
form of a binary number. For example, the 1’s complement of 1001 is 0110. The
most common way to express a negative binary number is to show it as a
2’s complement number. The 2’s complement is the binary number that
results when 1 is added to the 1’s complement. This system is shown in
Table 6-3. A zero sign bit means a positive number, whereas a 1 sign bit
means a negative number. Using the 2’s complement makes it easier for
the computer to perform mathematical operations. The correct sign bit is
generated by forming the 2’s complement.
M. Arslan Bhatti, Department of Math & Stat 11
M. Arslan Bhatti, Department of Math & Stat 12
The computer knows that a number retrieved from memory is a negative number
if the MSB is 1. Whenever a negative number is entered from a keyboard, the
computer stores it as a 2’s complement. What follows is the original number in
true binary followed by its 1’s complement, its 2’s complement, and finally, its
decimal equivalent
6.4 Octal System
To express the number in the binary system requires many more digits than in the
decimal system. Too many binary digits can become cumbersome to read or
write. To solve this problem, other related numbering systems are used. The
octal numbering system, a base 8 system, is used because 8 data bits
make up a byte of information that can be addressed. Octal is a
convenient means of handling large binary numbers
M. Arslan Bhatti, Department of Math & Stat 13
As shown in Table 6-4, one octal digit can be used to express three binary digits.
As in all other numbering systems, each digit in an octal number has a
weighted decimal value according to its position. Figure 6.6 illustrates how the
octal number 462 is converted to its decimal equivalent: 306.
The first three conditions are easy because they are like adding decimals, but
the last condition is slightly different. In decimal, 1 + 1 = 2. In binary, a 2 is
written 10. Therefore, in binary, 1 + 1 = 0, with a carry of 1 to the next most
significant place value. When adding larger binary numbers, the resulting
1s are carried into higher-order columns,
M. Arslan Bhatti, Department of Math &as
Stat shown in the following
19
In arithmetic functions, the initial numeric
quantities
that are to be combined by subtraction are
the minuend
and subtrahend. The result of the subtraction
process is
called the difference, represented as:
10mm = 1cm
100cm = 1m
1000m = 1km
1000g = 1kg
1000kg = 1 tonne
1000ml = 1 litre
100cl = 1 litre
X 10 X 100 X 1000
cm mm m cm km m
÷ 10 ÷ 100 ÷ 1000
X 1000 X 1000
kg g l ml
÷ 1000 ÷ 1000
Population
Sample
(have Parameters) (have
Statistic)
Parameters: µ, Statistic: , S, r
σ, ρ
Population: A Sample: A
Population is a group representative
of all part/subset of the
object/elements/item population.
s under investigation. M. Arslan Bhatti, Department of Math & Stat 68
Why Sampling?
• A process of drawing a sample from population is
called sampling.
• Reduced cost
• Greater speed
• Greater accuracy
• Some times it is the only option (testing the life of
bulbs/bullets)
Statistics
Descriptive Inferential
Qualitativ Quantitati
e ve
Characteristic which
varies in quality Continu
Discrete
(not numerically) ous
e.g., Height
No. of students
Eye colour, Weight
No. of chairs
Education level, Marks
No. of deaths
Behaviour, Time
No. of births in a
Quality, Distance
hospital
Design, Temperatu
No.Arslanof accidents
Performance
M. Bhatti, Department of Math & Stat
re 71
Exercise of type of variables
• A school is conducting a survey to understand students'
academic performance, interests, and demographic
information. They collect data on the following variables:
1.Age of students
2.Favorite subject (Math, Science, English, History)
3.Number of classes attended per week
4.Student's grade level (e.g., Grade 1, Grade 2, etc.)
5.Average test score
6.Participation in extracurricular activities (Yes/No)
Identify the type of variable for each of the variables listed above.
M. Arslan Bhatti, Department of Math & Stat 73
Measurement
Examples: Sex, Blood Groups, Religion, Marital status, Political affiliation, Eye color
Programming Languages: Categories like Python, Java, C++, and JavaScript.
Operating System: Categories like Windows, macOS,
M. Arslan Bhatti, Linux,
Department and
of Math Android.
& Stat 76
Ordinal
• Order of the values is important and significant, but the
differences between each one is not really known.
Poor Fair Good Very Good Excellent
Example:
Students’ Grades
Class Positions
Cricket teams standings in Bhatti,
M. Arslan ICCDepartment
rankingof Math & Stat 77
Ordinal …continue
• The ordinal scale categorizes data with a meaningful order or
rank among categories but without precise intervals between
them.
• Data can be ordered or ranked.
• Differences between ranks are not consistent or measurable.
• Example: Education Level: Categories include High School,
Bachelor’s, Master’s, PhD. (There is an order, but the difference
in years of study or expertise between each level is not uniform)
• Example: User Access Levels: Categories like Guest, User,
Moderator, Administrator. (These represent a hierarchy of
permissions, though not with equal intervals between levels).
Example:
Height, Weight, Speed, Length, Age
Storage Capacity: Measured in bytes, a storage capacity of 0 GB
means no storage. A 500 GB hard drive has twice the capacity of a
250 GB hard drive.
Memory Usage: Memory measured in MB or GB where 0 means no
memory usage. 8 GB of RAM is twice as much as 4 GB
M. Arslan Bhatti, Department of Math & Stat 80
Just look at some of the Graphs …
Cluster bar
chart
Sex M F M M F M F M M M
Frequency
5 Sec A
3
4
3 2
Sec B
3
2 1
1
0
0 Male Female
Male Female
Sex
Sex M. Arslan Bhatti, Department of Math & Stat 89
Simple Bar Chart
• A bar chart is a type of chart which shows the values
of different categories of data as rectangular bars with
different lengths.
Example: Draw a Simple Bar Chart to represent the
Bar diagram
Population of 5 cities of the province Punjab.showing Popu-
Cities Population lation of 5 cities of Punjab
(000) 12,000 10,355
Population in ‘000’
10,000
Lahore 10,355 8,000
6,000 4,765
Rawalpin 4,765 4,000
3,675 3,100
2,000 1,550
di 0
e i d a n
Faisalaba 3,675 h or
p ind
ab
a
od
h
u lta
La al a l
r g M
d R aw F ai
s
S a
Population Femal
Cities (000) Male e Multiple Bar Chart showing
Population of Males and
Lahore 10,355 5385 4,970 6000
5385 Females
4,970
Rawalpindi 4,765 2478 2,287 5000 Males Females
Faisalabad 3,675 1911 1,764 4000
Population
Sargodha 1,550 806 744 3000
2478
2,287
1911
1,764
2000
1000 806744
0
Lahore Rawalpindi Faisalabad Sargodha
Population
Faisalabad 3,675 1911 1,764
6000
Example:
• Following data represents the number of infected plants
from a sample of twenty experimental plots. Your task is
to present it in tabular form.
1 2 4 3 0 1 2 3 1 1 0
2 1 0 2 3 0 0 1 3
4
4 4
3
1
1
0
0 1 2 3 4
No. of infected items
M. Arslan Bhatti, Department of Math & Stat 95
Pie Chart
• A pie chart is a type of graph in which a circle is
divided into sectors that each represent a proportion of
the whole.
Example: The blood group of 70 students were tested
and the following results were obtained.
Blood No. of Blood Groups of
Groups Students Students
(f)
A 8 A
17% 11% B
B 30 O
AB
29%
O 20 43%
AB 12
M. Arslan Bhatti, Department of Math & Stat 96
Pie Chart
Blood No. of Relative Percent Angle
Groups Student frequenc frequency rf x 360
s (f) y
A 8 8/70 = 0.11*100 = 39.6
0.11 11
B 30 43 154.8
0.43
104.4
Divide the total
O 20 29
0.29 angle of the
AB 12 61.2 Circle 360 into
0.17 17
four segments
Total 70 100 360 as calculated
1.00
A 8 25
20
20
B 30
15 12
O 20
10 8
AB 12 5
0
A B O AB
Turnover in Rs.
50,000
2003 29,000 40,000
2004 44,000 30,000
2005 49,000 20,000
Qualitative
Univariate Bivariate
Frequency Frequency
Table Table
Percentages
Component Multiple
Pie Chart Bar Chart Bar Chart
Bar Chart
We will begin with the univariate situation, and will proceed to the
bivariate situation.
M. Arslan Bhatti, Department of Math & Stat 101
Frequency Distribution &
Histogram
distributi 4
4
3
on & 2 1
Histogra 0
85.5–90.5 90.5–95.5 95.5–100.5 100.5–105.5 105.5–110.5 110.5–115.5
m Class Boundries
M. Arslan Bhatti, Department of Math & Stat 103
Frequency Distribution
• Tabular arrangement of data in which various items
are arranged into classes or groups and the number of
items falling in each class is stated.
• The number of observations falling in a particular class
is referred to as class frequency "f".
• Data presented in the form of a frequency distribution
is also called grouped data.
87 91 89 88 89 91 87 92 90 98 95
97 96 100 101 96 98 99 98 100 102 99 101
105 103 107 105 106 107 112
• Class Boundaries
• Subtract any Upper Class Limit from its Subsequent Lower
Class limit and divide the difference with 2, you will get the
Continuity correction factor
• Subtract this factor from all Lower Class Limits and add it to
all Upper Class limits.
8
Frequency
6 6
6
4
4
3
2
1
0
85.5–90.5 90.5–95.5 95.5–100.5 100.5–105.5 105.5–110.5 110.5–115.5
Class Boundries
M. Arslan Bhatti, Department of Math & Stat 110
Frequency Polygon
10
Frequency
6
0
88 93 98 103 108 113
M. Arslan Bhatti, Department of Math & Stat Mid Points 111
Cumulative Frequency Polygon / Ogive
Cumulative Frequency
25
20
15
10
5
0
90.5 95.5 100.5 105.5 110.5 115.5
M. Arslan Bhatti, Department of Math & Stat Upper Class Boundaries 112
Stem & Leaf Display
• A relatively small data set can be represented by stem and
leaf display.
• In addition to information on the number of observations
falling in the various classes, it displays details of what those
observations actually are.
• Each number in the data set is divided into two parts, a Stem
and a Leaf. A stem is the leading digit(s) of each number and
is used in sorting, while a leaf is the rest of the number or the
trailing digit(s) and shown in display.
7 0589
These values are 70, 75, 78 and 79
M. Arslan Bhatti, Department of Math & Stat 114
Example
Represent the following data by Stem and Leaf display
by
(i) taking 10 unit as the width of the class
(ii) taking 5 unit as the width of the class
32 45 38 41 49 36 52 56 51 62 63 59
68 Steam Leaf *indicate 0—4
Steam Leaf 3* 2 .indicate 5—9
3. 8 6
3 2 8 6 4* 1
4. 5 9 * and . are called placeholder
4 5 1 9
5* 2 1
5 2 6 1 9 5. 6 9
6* 2 3
6 2 3 8 6. 8
M. Arslan Bhatti, Department of Math & Stat 115
Example
Minimum value = 8 Maximum value = 112
Stem unit = 10 Width of class = 10 Arranged stem and leaf table
Stem Leaf
8* -
8. 79897
9* 1120
9. 857668989
10* 010213
10. 57567
11* 2
11. -
Data 1) 32, 45, 38, 41, 49, 36, 52, 56, 51, 62, 63, 59, 68
Data 2) 23, 58, 26, 57, 55, 65, 29, 36, 59, 69, 60
Data 1 Data 2
(#13) (# 11)
Leaf Leaf
2 369
682 3 6
915 4
9162 5 8759
832 6 590
M. Arslan Bhatti, Department of Math & Stat 119
Exercises