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

DAF 1104 Q. Methods Teaching Notes

Uploaded by

yussufmohamed031
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views

DAF 1104 Q. Methods Teaching Notes

Uploaded by

yussufmohamed031
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 63

DAF1104 QUANTATIVE METHODS

Definition of a set:

A set is a well-defined collection or group of objects.

For instance, - Set of all courses offered at the School of Business, University of Nairobi.

Types of Sets

The sets are further categorised into different types, based on elements or types of elements.
These different types of sets in basic set theory are:

 Finite set: The number of elements is finite

 Infinite set: The number of elements are infinite

 Empty set: It has no elements

 Singleton set: It has one only element

 Equal set: Two sets are equal if they have same elements

 Equivalent set: Two sets are equivalent if they have same number of elements

 Power set: A set of every possible subset.

 Universal set: Any set that contains all the sets under consideration.

 Subset: When all the elements of set A belong to set B, then A is subset of B

Set Theory Symbols

There are several symbols that are adopted for common sets. They are given in the table below:

Table 1: Symbols denoting common sets

Symbol Corresponding Set

Represents the set of all Natural numbers i.e. all the positive integers.

N This can also be represented by Z+Z+ .

Examples: 9, 13, 906, 607, etc.

1
Represents the set of all integers

The symbol is derived from the German word Zahl, which means number.
Z
Positive and negative integers are denoted by Z+Z+ and Z−Z− respectively.

Examples: -12, 0, 23045, etc.

Represents the set of Rational numbers

The symbol is derived from the word Quotient. It is defined as the quotient of two integers
Q (with non-zero denominator)

Positive and negative rational numbers are denoted by Q+Q+ and Q−Q− respectively.

Examples: 139139,−67−67 , 143143, etc.

Represents the Real numbers i.e. all the numbers located on the number line.

R Positive and negative real numbers are denoted by R+R+ and R−R− respectively.

Examples: 4.34.3, ππ,4√343,, etc.

Represents the set of Complex numbers.


C
Examples: 4 + 3i, i, etc.

Other Notations

Symbol Symbol Name

{} Set

A∪B A union B

A∩B A intersection B

A⊆B A is subset of B

2
A⊄B A is not subset B

A⊂B proper subset / strict subset

A⊃B proper superset / strict superset

A⊇B Superset

A⊅B not superset

Ø empty set

P (C) power set

A=B Equal set

Ac Complement of A

a∈B a element of B

x∉A x not element of A

Set Theory Formulas

 n( A ∪ B ) = n(A) +n(B) – n (A ∪ B)

 n(A∪B)=n(A)+n(B) {when A and B are disjoint sets}

 n(U)=n(A)+n(B)–n(A∩B)+n((A∪B)c)

 n(A∪B)=n(A−B)+n(B−A)+n(A∩B)

 n(A−B)=n(A∩B)−n(B)
3
 n(A−B)=n(A)−n(A∩B)

 n(Ac)=n(U)−n(A)

 n(PUQUR)=n(P)+n(Q)+n(R)–n(P⋂Q)–n(Q⋂R)–n(R⋂P)+n(P⋂Q⋂R)

Set Operations

The four important set operations that are widely used are:

 Union of sets

 Intersection of sets

 Complement of sets

 Difference of sets

Fundamental Properties of Set operations:

Like addition and multiplication operation in algebra, the operations such as union and
intersection in set theory obeys the properties of associativity and commutativity. Also, the
intersection of sets distributes over the union of sets.

Sets are used to describe one of the most important concepts in mathematics i.e. functions.
Everything that you observe around you, is achieved with mathematical models which are
formulated, interpreted and solved by functions.

Problems and Solutions

Q.1: If U = {a, b, c, d, e, f}, A = {a, b, c}, B = {c, d, e, f}, C = {c, d, e}, find (A ∩ B) ∪ (A ∩
C).

Solution: A ∩ B = {a, b, c} ∩ {c, d, e, f}

A∩B={c}

A ∩ C = { a, b, c } ∩ { c, d, e }

A∩C={c}

∴ (A ∩ B) ∪ (A ∩ C) = { c }

Q.2: Give examples of finite sets.

Solution: The examples of finite sets are:


4
Set of months in a year

Set of days in a week

Set of natural numbers less than 20

Set of integers greater than -2 and less than 3

Q.3: If U = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, A = {3, 5, 7, 9, 11} and B = {7, 8, 9, 10, 11}, Then
find (A – B)′.

Solution: A – B is a set of member which belong to A but do not belong to B

∴ A – B = {3, 5, 7, 9, 11} – {7, 8, 9, 10, 11}

A – B = {3, 5}

According to formula,

(A − B)′ = U – (A – B)

∴ (A − B)′ = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11} – {3, 5}

(A − B)′ = {2, 4, 6, 7, 8, 9, 10, 11}.

For more set theory rules, formulas and examples, register with us. To watch videos and
understand the concepts, download BYJU’S-The Learning App from Google Play Store.

Frequently Asked Questions – FAQs

What is the basic of set theory?

Set theory defines the collection of objects, where the order of objects does not matter. It relates
with the collection of group of members or elements in mathematics or in real world.

What are the types of sets?

The different types of sets are finite and infinite sets, subset, power set, empty set or null set,
equal and equivalent sets, proper and improper subsets, etc.

What is the formula of set?

n(P U Q) = n(P) + (n(Q) – n (P ⋂ Q), where n denotes the number of elements.


If we have two sets, P and Q, then,

5
For three sets, P, Q and R, the formula is given by;
n(PUQUR)=n(P)+n(Q)+n(R)–n(P⋂Q)–n(Q⋂R)–n(R⋂P)+n(P⋂Q⋂R)

How many elements does a singleton set have? Give an example.

A singleton set has only one element. Example are {1}, {a}, {x:x is an integer that has only one
factor}, etc.

How can we represent the sets?

Sets can be represented in two different ways: Roster form and Set-builder form

e properties of union and intersection of sets.

Solved basic word problems on sets:

1. Let A and B be two finite sets such that n(A) = 20, n(B) = 28 and n(A ∪ B) = 36, find n(A ∩
B).

Solution:

Using the formula n(A ∪ B) = n(A) + n(B) - n(A ∩ B).

then n(A ∩ B) = n(A) + n(B) - n(A ∪ B)

= 20 + 28 - 36

= 48 - 36

= 12

2. If n(A - B) = 18, n(A ∪ B) = 70 and n(A ∩ B) = 25, then find n(B).

Solution:

Using the formula n(A∪B) = n(A - B) + n(A ∩ B) + n(B - A)

70 = 18 + 25 + n(B - A)

70 = 43 + n(B - A)

n(B - A) = 70 - 43

n(B - A) = 27

Now n(B) = n(A ∩ B) + n(B - A)


6
= 25 + 27

= 52

Different types on word problems on sets:

3. In a group of 60 people, 27 like cold drinks and 42 like hot drinks and each person likes at
least one of the two drinks. How many like both coffee and tea?

Solution:

Let A = Set of people who like cold drinks.

B = Set of people who like hot drinks.

Given

(A ∪ B) = 60 n(A) = 27 n(B) = 42 then;

n(A ∩ B) = n(A) + n(B) - n(A ∪ B)

= 27 + 42 - 60

= 69 - 60 = 9

=9

Therefore, 9 people like both tea and coffee.

4. There are 35 students in art class and 57 students in dance class. Find the number of students
who are either in art class or in dance class.

• When two classes meet at different hours and 12 students are enrolled in both activities.

• When two classes meet at the same hour.

Solution:

n(A) = 35, n(B) = 57, n(A ∩ B) = 12

(Let A be the set of students in art class.

B be the set of students in dance class.)

(i) When 2 classes meet at different hours n(A ∪ B) = n(A) + n(B) - n(A ∩ B)

= 35 + 57 - 12
7
= 92 - 12

= 80

(ii) When two classes meet at the same hour, A∩B = ∅ n (A ∪ B) = n(A) + n(B) - n(A ∩ B)

= n(A) + n(B)

= 35 + 57

= 92

Further concept to solve word problems on sets:

5. In a group of 100 persons, 72 people can speak English and 43 can speak French. How many
can speak English only? How many can speak French only and how many can speak both
English and French?

Solution:

Let A be the set of people who speak English.

B be the set of people who speak French.

A - B be the set of people who speak English and not French.

B - A be the set of people who speak French and not English.

A ∩ B be the set of people who speak both French and English.

Given,

n(A) = 72 n(B) = 43 n(A ∪ B) = 100

Now, n(A ∩ B) = n(A) + n(B) - n(A ∪ B)

= 72 + 43 - 100

= 115 - 100

= 15

Therefore, Number of persons who speak both French and English = 15

n(A) = n(A - B) + n(A ∩ B)

8
⇒ n(A - B) = n(A) - n(A ∩ B)

= 72 - 15

= 57

and n(B - A) = n(B) - n(A ∩ B)

= 43 - 15

= 28

Therefore, Number of people speaking English only = 57

Number of people speaking French only = 28

Word problems on sets using the different properties (Union & Intersection):

6. In a competition, a school awarded medals in different categories. 36 medals in dance, 12


medals in dramatics and 18 medals in music. If these medals went to a total of 45 persons and
only 4 persons got medals in all the three categories, how many received medals in exactly two
of these categories?

Solution

Let A = set of persons who got medals in dance.

B = set of persons who got medals in dramatics.

C = set of persons who got medals in music.

Given,

n(A) = 36 n(B) = 12 n(C) = 18

n(A ∪ B ∪ C) = 45 n(A ∩ B ∩ C) = 4

We know that number of elements belonging to exactly two of the three sets A, B, C

= n(A ∩ B) + n(B ∩ C) + n(A ∩ C) - 3n(A ∩ B ∩ C)

= n(A ∩ B) + n(B ∩ C) + n(A ∩ C) - 3 × 4 ……..(i)

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) - n(A ∩ B) - n(B ∩ C) - n(A ∩ C) + n(A ∩ B ∩ C)

9
Therefore, n(A ∩ B) + n(B ∩ C) + n(A ∩ C) = n(A) + n(B) + n(C) + n(A ∩ B ∩ C) - n(A ∪ B ∪
C)

From (i) required numbe

= n(A) + n(B) + n(C) + n(A ∩ B ∩ C) - n(A ∪ B ∪ C) - 12

= 36 + 12 + 18 + 4 - 45 - 12

= 70 - 57

= 13

Apply set operations to solve the word problems on sets:

7. Each student in a class of 40 plays at least one indoor game chess, carrom and scrabble. 18
play chess, 20 play scrabble and 27 play carrom. 7 play chess and scrabble, 12 play scrabble and
carrom and 4 play chess, carrom and scrabble. Find the number of students who play (i) chess
and carrom. (ii) chess, carrom but not scrabble.

Solution:

Let A be the set of students who play chess

B be the set of students who play scrabble

C be the set of students who play carrom

Therefore, We are given n(A ∪ B ∪ C) = 40,

n(A) = 18, n(B) = 20 n(C) = 27,

n(A ∩ B) = 7, n(C ∩ B) = 12 n(A ∩ B ∩ C) = 4

We have

n(A ∪ B ∪ C) = n(A) + n(B) + n(C) - n(A ∩ B) - n(B ∩ C) - n(C ∩ A) + n(A ∩ B ∩ C)

Therefore, 40 = 18 + 20 + 27 - 7 - 12 - n(C ∩ A) + 4

40 = 69 – 19 - n(C ∩ A)

40 = 50 - n(C ∩ A) n(C ∩ A) = 50 - 40

n(C ∩ A) = 10

10
Therefore, Number of students who play chess and carrom are 10.

Also, number of students who play chess, carrom and not scrabble.

= n(C ∩ A) - n(A ∩ B ∩ C)

= 10 – 4

=6

Therefore, we learned how to solve different types of word problems on sets without using Venn
diagram.

Set Theory Tutorial | Problems, Formulas, Examples

Set theory has its own notations and symbols that can seem unusual for many. In this tutorial, we
look at some solved examples to understand how set theory works and the kind of problems it
can be used to solve.

Definition

A set is a collection of objects.

It is usually represented in flower braces.

For example:
Set of natural numbers = {1,2,3,…..}
Set of whole numbers = {0,1,2,3,…..}

Each object is called an element of the set.

The set that contains all the elements of a given collection is called the universal set and is
represented by the symbol ‘µ’, pronounced as ‘mu’.

For two sets A and B,

 n(AᴜB) is the number of elements present in either of the sets A or B.

 n(A∩B) is the number of elements present in both the sets A and B.

 n(AᴜB) = n(A) + (n(B) – n(A∩B)

For three sets A, B and C,

 n(AᴜBᴜC) = n(A) + n(B) + n(C) – n(A∩B) – n(B∩C) – n(C∩A) + n(A∩B∩C)

11
Consider the following example:

Question: In a class of 100 students, 35 like science and 45 like math. 10 like both. How many
like either of them and how many like neither?

Solution:

Total number of students, n(µ) = 100

Number of science students, n(S) = 35

Number of math students, n(M) = 45

Number of students who like both, n(M∩S) = 10

Number of students who like either of them,

n(MᴜS) = n(M) + n(S) – n(M∩S)

→ 45+35-10 = 70

Number of students who like neither = n(µ) – n(MᴜS) = 100 – 70 = 30

The easiest way to solve problems on sets is by drawing Venn diagrams, as shown below.

As it is said, one picture is worth a thousand words. One Venn diagram can help solve the
problem faster and save time. This is especially true when more than two categories are involved
in the problem.

Let us see some more solved examples.


12
Problem 1: There are 30 students in a class. Among them, 8 students are learning both English
and French. A total of 18 students are learning English. If every student is learning at least one
language, how many students are learning French in total?

Solution:

The Venn diagram for this problem looks like this.

Every student is learning at least one language. Hence there is no one who fall in the category
‘neither’.

So in this case, n(EᴜF) = n(µ).

It is mentioned in the problem that a total of 18 are learning English. This DOES NOT mean that
18 are learning ONLY English. Only when the word ‘only’ is mentioned in the problem should
we consider it so.

Now, 18 are learning English and 8 are learning both. This means that 18 – 8 = 10 are learning
ONLY English.

n(µ) = 30, n(E) = 10

n(EᴜF) = n(E) + n(F) – n(E∩F)

30 = 18+ n(F) – 8

n(F) = 20

Therefore, total number of students learning French = 20.


13
Note: The question was only about the total number of students learning French and not about
those learning ONLY French, which would have been a different answer, 12.

Finally, the Venn diagram looks like this.

Problem 2: Among a group of students, 50 played cricket, 50 played hockey and 40 played
volley ball. 15 played both cricket and hockey, 20 played both hockey and volley ball, 15 played
cricket and volley ball and 10 played all three. If every student played at least one game, find the
number of students and how many played only cricket, only hockey and only volley ball?

Solution:

n(C) = 50, n(H) = 50, n(V) = 40

n(C∩H) = 15

n(H∩V) = 20

n(C∩V) = 15

n(C∩H∩V) = 10

No. of students who played at least one game

n(CᴜHᴜV) = n(C) + n(H) + n(V) – n(C∩H) – n(H∩V) – n(C∩V) + n(C∩H∩V)

= 50 + 50 + 40 – 15 – 20 – 15 + 10

Total number of students = 100.

14
Let a denote the number of people who played cricket and volleyball only.
Let b denote the number of people who played cricket and hockey only.
Let c denote the number of people who played hockey and volleyball only.
Let d denote the number of people who played all three games.

Accordingly, d = n (CnHnV) = 10

Now, n(CnV) = a + d = 15

n(CnH) = b + d = 15

n(HnV) = c + d = 20

Therefore, a = 15 – 10 = 5 [cricket and volleyball only]

b = 15 – 10 = 5 [cricket and hockey only]

c = 20 – 10 = 10 [hockey and volleyball only]

No. of students who played only cricket = n(C) – [a + b + d] = 50 – (5 + 5 + 10) = 30

No. of students who played only hockey = n(H) – [b + c + d] = 50 – ( 5 + 10 + 10) = 25

No. of students who played only volley ball = n(V) – [a + c + d] = 40 – (10 + 5 + 10) = 15

Alternatively, we can solve it faster with the help of a Venn diagram.

15
The Venn diagram for the given information looks like this.

Subtracting the values in the intersections from the individual values gives us the number of
students who played only one game.

Question 2

Can anyone help me and solve this question. In a bank of 320 staffs, 120 speak French, 140
speak English, 170 speak Arabic, 50 speak both French and English, 35 speak both English and
Arabic, 40 speak both French and Arabic. Required ;

(a) Determine the number of staffs who speak all the three

n(U) = 320, //n(F)= 120, n(E)= 140, n(A)= 170,// n(F n E)= 50, n(E n A)= 35, n(F n A)= 40// n(F
n E n A)=?.// So let n(F n E n A)= X.
THE FORMULA STATED THAT
n(U) = n(F) + n(E) + n(A) – n(F n E) – n(F n A) – n(E n A) + n(F n E n A) where n(F n E n A) is
X
320 = 120 + 140 + 170 – 50 -35 + 40 + X
320 = 430 – 125 + X
320 =305 + X
320 – 305 =X
16
15 = X
X = 15, Where X is the number of staffs who spokes all the three languages.
So the number of staffs who spokes all the three subject are 15.

2.

.If A = {X:X is a prime number between 4 and 16} list the subset with exactly two elements

here we have A be set of prime numbers between 4 and 16 so the set be X = {5,7,11,13}
SUBSETS with exactly two elements in above set X = {5,7},{5,11},{5,13},{7,11},{7,13},
{11,13}

Data given
Total no of staffs=320
Let F be number of staffs who speak French , E for English And A for Arabic
n(F)=120
n(E)=140
n(A)=170
n(FnE)=50
n(EnA)=35
n(FnA)=40
n(FnEnA)=?
From
n(FuEuA)=n(F)+n(E)+n(A)_n(FnE)_n(EnA)_n(AnF)+n(FnEnA)
320=120+140+170_50_35_40+n(FnEnA)
320=430_125
320_305=15
So
n(FnEnA)=15
So number of staffs who speak both languages are 15 staffs

Out of 45 students questioned, 42 like mathematics or english or both, 27 students like maths and
22 like english.
1) who didn’t like any of the subjects
2)who like maths only
3)both maths and english

HERE
we have the total number of students questioned (U)=45
17
the number of students like either mathematics or english n(MuE)=42
the no. of students like mathematics n(M)=27
the no.of students like english n(E)=22

1)the no.of students didn’t like any subject= U-n(MuE) =45-42=3


3)the no.of students like both maths and english = x
n(MuE)=n(M)+n(E)-x
42=27+22-x
42=49-x
x=49-42=7
2)who like math only =n(M)-x =27-7=20

. PROBABILITY
Meaning and definition of Probability

As the Oxford dictionary states it, Probability means ‘The extent to which something is probable;
the likelihood of something happening or being the case’.

In mathematics too, probability indicates the same – the likelihood of the occurrence of an event.

Examples of events can be :

 Tossing a coin with the head up


 Drawing a red pen from a pack of different coloured pens
 Drawing a card from a deck of 52 cards etc.
Basic formula of probability

P(A) = (No. of ways A can occur)/(Total no. of possible outcomes)

Probability classification

Compound probability

18
Compound probability is when the problem statement asks for the likelihood of the occurrence of
more than one outcome.

Formula for compound probability

P(A or B) = P(A) + P(B) – P(A and B)


where A and B are any two events.

P(A or B) is the probability of the occurrence of atleast one of the events.

P(A and B) is the probability of the occurrence of both A and B at the same time.

Mutually exclusive events:

Mutually exclusive events are those where the occurrence of one indicates the non-occurrence of
the other

OR

When two events cannot occur at the same time, they are considered mutually exclusive.

Note: For a mutually exclusive event, P(A and B) = 0.

Example 1: What is the probability of getting a 2 or a 5 when a die is rolled?

Solution:

Taking the individual probabilities of each number, getting a 2 is 1/6 and so is getting a 5.

Applying the formula of compound probability,

Probability of getting a 2 or a 5,

P(2 or 5) = P(2) + P(5) – P(2 and 5)

==> 1/6 + 1/6 – 0

==> 2/6 = 1/3.

19
Example 2: Consider the example of finding the probability of selecting a black card or a 6 from
a deck of 52 cards.

Solution:

We need to find out P(B or 6)

Probability of selecting a black card = 26/52

Probability of selecting a 6 = 4/52

Probability of selecting both a black card and a 6 = 2/52

P(B or 6) = P(B) + P(6) – P(B and 6)

= 26/52 + 4/52 – 2/52

= 28/52

= 7/13.

Independent and Dependent Events

Independent Event

When multiple events occur, if the outcome of one event DOES NOT affect the outcome of the
other events, they are called independent events.

Say, a die is rolled twice. The outcome of the first roll doesn’t affect the second outcome. These
two are independent events.

Example 1: Say, a coin is tossed twice. What is the probability of getting two consecutive tails ?

Probability of getting a tail in one toss = 1/2

The coin is tossed twice. So 1/2 * 1/2 = 1/4 is the answer.

Here’s the verification of the above answer with the help of sample space.

20
When a coin is tossed twice, the sample space is {(H,H), (H,T), (T,H), (T,T)}.

Our desired event is (T,T) whose occurrence is only once out of four possible outcomes and
hence, our answer is 1/4.

Example 2: Consider another example where a pack contains 4 blue, 2 red and 3 black pens. If a
pen is drawn at random from the pack, replaced and the process repeated 2 more times, What is
the probability of drawing 2 blue pens and 1 black pen?

Solution

Here, total number of pens = 9

Probability of drawing 1 blue pen = 4/9


Probability of drawing another blue pen = 4/9
Probability of drawing 1 black pen = 3/9
Probability of drawing 2 blue pens and 1 black pen = 4/9 * 4/9 * 3/9 = 48/729 = 16/243

Dependent Events

When two events occur, if the outcome of one event affects the outcome of the other, they are
called dependent events.

Consider the aforementioned example of drawing a pen from a pack, with a slight difference.

Example 1: A pack contains 4 blue, 2 red and 3 black pens. If 2 pens are drawn at random from
the pack, NOT replaced and then another pen is drawn. What is the probability of drawing 2 blue
pens and 1 black pen?

Solution:

Probability of drawing 1 blue pen = 4/9


Probability of drawing another blue pen = 3/8
Probability of drawing 1 black pen = 3/7
Probability of drawing 2 blue pens and 1 black pen = 4/9 * 3/8 * 3/7 = 1/14

Let’s consider another example:

Example 2: What is the probability of drawing a king and a queen consecutively from a deck of
52 cards, without replacement.

21
Probability of drawing a king = 4/52 = 1/13

After drawing one card, the number of cards are 51.

Probability of drawing a queen = 4/51.

Now, the probability of drawing a king and queen consecutively is 1/13 * 4/51 = 4/663

Conditional probability

Conditional probability is calculating the probability of an event given that another event has
already occured .

The formula for conditional probability P(A|B), read as P(A given B) is

P(A|B) = P (A and B) / P(B)

Consider the following example:

Example: In a class, 40% of the students study math and science. 60% of the students study
math. What is the probability of a student studying science given he/she is already studying
math?

Solution

P(M and S) = 0.40

P(M) = 0.60

P(S|M) = P(M and S)/P(S) = 0.40/0.60 = 2/3 = 0.67

Complement of an event

A complement of an event A can be stated as that which does NOT contain the occurrence of A.

A complement of an event is denoted as P(Ac) or P(A’).

P(Ac) = 1 – P(A)

22
or it can be stated, P(A)+P(Ac) = 1

For example,

if A is the event of getting a head in coin toss, Ac is not getting a head i.e., getting a tail.

if A is the event of getting an even number in a die roll, Ac is the event of NOT getting an even
number i.e., getting an odd number.

if A is the event of randomly choosing a number in the range of -3 to 3, Ac is the event of


choosing every number that is NOT negative i.e., 0,1,2 & 3 (0 is neither positive or negative).

Consider the following example:

Example: A single coin is tossed 5 times. What is the probability of getting at least one head?

Solution:

Consider solving this using complement.

Probability of getting no head = P(all tails) = 1/32

P(at least one head) = 1 – P(all tails) = 1 – 1/32 = 31/32.

Sample Probability questions with solutions

Probability Example 1

What is the probability of the occurrence of a number that is odd or less than 5 when a fair die is
rolled.

Solution

Let the event of the occurrence of a number that is odd be ‘A’ and the event of the occurrence of
a number that is less than 5 be ‘B’. We need to find P(A or B).

P(A) = 3/6 (odd numbers = 1,3 and 5)

P(B) = 4/6 (numbers less than 5 = 1,2,3 and 4)

23
P(A and B) = 2/6 (numbers that are both odd and less than 5 = 1 and 3)

Now, P(A or B) = P(A) + P(B) – P(A or B)

= 3/6 + 4/6 – 2/6

P(A or B) = 5/6.

Probability Example 2

A box contains 4 chocobars and 4 ice creams. Tom eats 3 of them one after another. What is the
probability of sequentially choosing 2 chocobars and 1 icecream?

Solution

Probability of choosing 1 chocobar = 4/8 = 1/2

After taking out 1 chocobar, the total number is 7.

Probability of choosing 2nd chocobar = 3/7

Probability of choosing 1 icecream out of a total of 6 = 4/6 = 2/3

So the final probability of choosing 2 chocobars and 1 icecream = 1/2 * 3/7 * 2/3 = 1/7

Probability Example 3

When two dice are rolled, find the probability of getting a greater number on the first die than the
one on the second, given that the sum should equal 8.

Solution

Let the event of getting a greater number on the first die be G.

There are 5 ways to get a sum of 8 when two dice are rolled = {(2,6),(3,5),(4,4), (5,3),(6,2)}.

And there are two ways where the number on the first die is greater than the one on the second
given that the sum should equal 8, G = {(5,3), (6,2)}.

24
Therefore, P(Sum equals 8) = 5/36 and P(G) = 2/36.

Now, P(G|sum equals 8) = P(G and sum equals 8)/P(sum equals 8)

= (2/36)/(5/36)

= 2/5

PROBABILITY RULES

There are three main rules associated with basic probability: the addition rule, the multiplication
rule, and the complement rule. You can think of the complement rule as the 'subtraction rule' if it
helps you to remember it.

25
1.) The Addition Rule: P(A or B) = P(A) + P(B) - P(A and B)

If A and B are mutually exclusive events, or those that cannot occur together, then the third
term is 0, and the rule reduces to P(A or B) = P(A) + P(B). For example, you can't flip a coin and
have it come up both heads and tails on one toss.

2.) The Multiplication Rule: P(A and B) = P(A) * P(B|A) or P(B) * P(A|B)

If A and B are independent events, we can reduce the formula to P(A and B) = P(A) * P(B).
The term independent refers to any event whose outcome is not affected by the outcome of
another event. For instance, consider the second of two coin flips, which still has a .50 (50%)
probability of landing heads, regardless of what came up on the first flip. What is the probability
that, during the two coin flips, you come up with tails on the first flip and heads on the second
flip?

Let's perform the calculations: P = P(tails) * P(heads) = (0.5) * (0.5) = 0.25

3.) The Complement Rule: P(not A) = 1 - P(A)

Do you see why the complement rule can also be thought of as the subtraction rule? This rule
builds upon the mutually exclusive nature of P(A) and P(not A). These two events can never
occur together, but one of them always has to occur. Therefore P(A) + P(not A) = 1. For
example, if the weatherman says there is a 0.3 chance of rain tomorrow, what are the chances of
no rain?

Let's do the math: P(no rain) = 1 - P(rain) = 1 - 0.3 = 0.7

Law of Total Probability

Law of Total Probability: P(A) = P(A|B) * P(B) + P(A|not B) * P(not B)

For example, what is the probability of a person's favorite color being blue if you know the
following:
26
 Left-handed people have blue as a favorite color 30% of the time
 Right-handed people like blue 40% of the time
 Left-handed people make up 10% of the population

Let's complete the equation:

1.) P(Blue) = P(left handed) * P(like blue|left handed) + P(not left handed) * (P(like blue|not
left handed)

2.) P(Blue) = (0.1)(0.3) + (0.9)(0.4)

3.) P(Blue) = .03 + .36 = 0.39

Terms in Probability

The following terms in probability help in a better understanding of the concepts of probability.

 Experiment: A trial or an operation conducted to produce an outcome is called an


experiment.
 Sample Space: All the possible outcomes of an experiment together constitute a sample
space. For example, the sample space of tossing a coin is head and tail.
 Favorable Outcome: An event that has produced the desired result or expected event is
called a favorable outcome. For example, when we roll two dice, the possible/favorable
outcomes of getting the sum of numbers on the two dice as 4 are (1,3), (2,2), and (3,1).
 Trial: A trial denotes doing a random experiment.
 Random Experiment: An experiment that has a well-defined set of outcomes is called a
random experiment. For example, when we toss a coin, we know that we would get ahead or
tail, but we are not sure which one will appear.
 Event: The total number of outcomes of a random experiment is called an event.
 Equally Likely Events: Events that have the same chances or probability of occurring are
called equally likely events. The outcome of one event is independent of the other. For
example, when we toss a coin, there are equal chances of getting a head or a tail.
27
 Exhaustive Events: When the set of all outcomes of an experiment is equal to the sample
space, we call it an exhaustive event.
Mutually Exclusive Events: Events that cannot happen simultaneously are called mutually
exclusive events. For example, the climate can be either hot or cold. We cannot experience the
same weather simultaneously

PROBABILITY TREE DIAGRAMS

What Is A Probability Tree Diagram

We can construct a probability tree diagram to help us solve some probability problems.

A probability tree diagram shows all the possible events. The first event is represented by a
dot. From the dot, branches are drawn to represent all possible outcomes of the event. The
probability of each outcome is written on its branch.

Example:
A bag contains 3 black balls and 5 white balls. Paul picks a ball at random from the bag and
replaces it back in the bag. He mixes the balls in the bag and then picks another ball at random
from the bag.
a) Construct a probability tree of the problem.
b) Calculate the probability that Paul picks:
i) two black balls
ii) a black ball in his second draw

Solution:

a) Check that the probabilities in the last column add up to 1.

28
b) i) To find the probability of getting two black balls, first locate the B branch and then follow
the second B branch. Since these are independent events we can multiply the probability of each
branch.

ii) There are two outcomes where the second ball can be black, either (B, B) or (W, B)

From the probability tree diagram, we get:

P(second ball black)


= P(B, B) or P(W, B)

29
= P(B, B) + P(W, B)

Example:
Bag A contains 10 marbles of which 2 are red and 8 are black. Bag B contains 12 marbles of
which 4 are red and 8 are black. A ball is drawn at random from each bag.
a) Draw a probability tree diagram to show all the outcomes the experiment.
b) Find the probability that:
(i) both are red.
(ii) both are black.
(iii) one black and one red.
(iv) at least one red.

Solution:
a) A probability tree diagram that shows all the outcomes of the experiment.

b) The probability that:


(i) both are red.

P(R, R) =

30
(ii) both are black.

P(B, B) =

(iii) one black and one red.

P(R, B) or P(B, R) =

(iv) at least one red.

1 - P(B, B) =

Example:
A box contains 4 red and 2 blue chips. A chip is drawn at random and then replaced. A second
chip is then drawn at random.
a) Show all the possible outcomes using a probability tree diagram.
b) Calculate the probability of getting:
(i) at least one blue.
(ii) one red and one blue.
(iii) two of the same color.

Solution:
a) A probability tree diagram to show all the possible outcomes.

31
b) The probability of getting:
(i) at least one blue.

P(R, B) or P(B, R) or P(B, B) =

(ii) one red and one blue.

P(R, B) or P(B, R) =

(iii) two of the same color.

P(R, R) or P(B, B) =

Probability Tree Diagrams For Independent Events

How To Solve Probability Problems Using Probability Tree Diagrams?


Example:
A coin is biased so that it has a 60% chance of landing on heads. If it is thrown three times, find
the probability of getting
a) three heads
b) 2 heads and a tail
c) at least one head

How To Use A Tree Diagram To Calculate Combined Probabilities Of Two Independent


Events?
Example:
Jenny has a bag with seven blue sweets and 3 red sweets in it. She picks up a sweet at random
from the bag, replaces it and then picks again at random. Draw a tree diagram to represent this
situation and use it to calculate the probabilities that she picks:
(a) two red sweets
(b) no red sweets
(c) at least one blue sweet
(d) one sweet of each color

Probability Tree Diagrams For Dependent Events

How To Use A Probability Tree Diagram To Calculate Probabilities Of Two Events Which
Are Not Independent?
Example:
Jimmy has a bag with seven blue sweets and 3 red sweets in it. He picks up a sweet at random

32
from the bag, but does not replaces it and then picks again at random. Draw a tree diagram to
represent this situation and use it to calculate the probabilities that he picks:
(a) two red sweets
(b) no red sweets
(c) at least one blue sweet
(d) one sweet of each color

Binomial expansion

The binomial is a type of distribution that has two possible outcomes (the prefix “bi” means two,
or twice). ... The first variable in the binomial formula, n, stands for the number of times the
experiment runs. The second variable, p, represents the probability of one specific outcome.

Binomials in Real Life

Binomial distributions are the results from experiments with two outcomes. The term
“experiment” can mean a trial, a decision, or just a roll of the die. They are really just a measure
of success (or failure). In other words, something happens, or it doesn’t. Will I live to 100, or
won’t I? Will my car start, or won’t it? Can I pay my college tuition or not?

33
Measures of Central Tendency
Measures of Central Tendency

Generally, the central tendency of a dataset can be described using the following measures:

 Mean (Average): Represents the sum of all values in a dataset divided by the total
number of the values.
 Median: The middle value in a dataset that is arranged in ascending order (from the
smallest value to the largest value). If a dataset contains an even number of values, the
median of the dataset is the mean of the two middle values.
 Mode: Defines the most frequently occurring value in a dataset. In some cases, a dataset
may contain multiple modes, while some datasets may not have any mode at all.

Mean (Arithmetic)
The mean (or average) is the most popular and well known measure of central tendency. It can
be used with both discrete and continuous data, although its use is most often with continuous
data (see our Types of Variable guide for data types). The mean is equal to the sum of all the
values in the data set divided by the number of values in the data set. So, if we have

values in a data set and they have values …, the sample mean, usually denoted by

(pronounced "x bar"), is:

This formula is usually written in a slightly different manner using the Greek capitol letter,

, pronounced "sigma", which means "sum of...":

You may have noticed that the above formula refers to the sample mean. So, why have we called
it a sample mean? This is because, in statistics, samples and populations have very different
meanings and these differences are very important, even if, in the case of the mean, they are
calculated in the same way. To acknowledge that we are calculating the population mean and not
the sample mean, we use the Greek lower case letter "mu", denoted as

The mean is essentially a model of your data set. It is the value that is most common. You will
notice, however, that the mean is not often one of the actual values that you have observed in
your data set. However, one of its important properties is that it minimises error in the prediction
of any one value in your data set. That is, it is the value that produces the lowest amount of error
from all other values in the data set.

34
An important property of the mean is that it includes every value in your data set as part of the
calculation. In addition, the mean is the only measure of central tendency where the sum of the
deviations of each value from the mean is always zero.

When not to use the mean

The mean has one main disadvantage: it is particularly susceptible to the influence of outliers.
These are values that are unusual compared to the rest of the data set by being especially small or
large in numerical value. For example, consider the wages of staff at a factory below:

Staff 1 2 3 4 5 6 7 8 9 10
Salary 15k 18k 16k 14k 15k 15k 12k 17k 90k 95k

The mean salary for these ten staff is $30.7k. However, inspecting the raw data suggests that this
mean value might not be the best way to accurately reflect the typical salary of a worker, as most
workers have salaries in the $12k to 18k range. The mean is being skewed by the two large
salaries. Therefore, in this situation, we would like to have a better measure of central tendency.
As we will find out later, taking the median would be a better measure of central tendency in this
situation.

Another time when we usually prefer the median over the mean (or mode) is when our data is
skewed (i.e., the frequency distribution for our data is skewed). If we consider the normal
distribution - as this is the most frequently assessed in statistics - when the data is perfectly
normal, the mean, median and mode are identical. Moreover, they all represent the most typical
value in the data set. However, as the data becomes skewed the mean loses its ability to provide
the best central location for the data because the skewed data is dragging it away from the typical
value. However, the median best retains this position and is not as strongly influenced by the
skewed values. This is explained in more detail in the skewed distribution section later in this
guide.

Mean of grouped data:

While calculating the mean of the grouped data, the values x1, x2, x3, ……. xn are taken as the
mid-values or the class marks of various class intervals. If the frequency distribution is inclusive,
then it should be first converted to exclusive distribution.

4. The following table shows the number of plants in 20 houses in a group

Number of Plants 0-2 2-4 4-6 6-8 8 - 10 10 - 12 12 - 14


Number of Houses 1 2 2 4 6 2 3

35
Find the mean number of plans per house

Solution:

We have

Number of Houses Class Mark


Number of Plant fixi
(fi) (xi)
0-2 1 1 1×1=1
2–4 2 3 2×3=6
4–6 2 5 2 × 5 = 10
6–8 4 7 4 × 7 = 28
8 – 10 6 9 6 × 9 = 54
10 – 12 2 11 2 × 11 = 22
12 -14 3 13 3 × 13 = 39

∑fi = 1 + 2 + 2 + 4 + 6 + 2 + 3 = 20

∑fi xi =1 + 6 + 10 + 28 + 54 + 22 + 39 = 160

Therefore, mean = ∑(fixi)/ ∑fi = 160/20 = 8 plants

Median
The median is the middle score for a set of data that has been arranged in order of magnitude.
The median is less affected by outliers and skewed data. In order to calculate the median,
suppose we have the data below:

65 55 89 56 35 14 56 55 87 45 92

We first need to rearrange that data into order of magnitude (smallest first):

14 35 45 55 55 56 56 65 87 89 92

Our median mark is the middle mark - in this case, 56 (highlighted in bold). It is the middle mark
because there are 5 scores before it and 5 scores after it. This works fine when you have an odd
number of scores, but what happens when you have an even number of scores? What if you had
36
only 10 scores? Well, you simply have to take the middle two scores and average the result. So,
if we look at the example below:

65 55 89 56 35 14 56 55 87 45

We again rearrange that data into order of magnitude (smallest first):

14 35 45 55 55 56 56 65 87 89

Only now we have to take the 5th and 6th score in our data set and average them to get a median
of 55.5.

Mode
The mode is the most frequent score in our data set. On a histogram it represents the highest bar
in a bar chart or histogram. You can, therefore, sometimes consider the mode as being the most
popular option. An example of a mode is presented below:

37
Mean of Grouped Data

Mean of grouped data is the data set formed by aggregating individual observations of a variable
into different groups. Grouped data is data that is grouped together in different categories. Mean
is considered as the average of the data. For the mean of grouped data, it might be difficult to
find the exact value however, we can always estimate it. Let us learn more about the mean of
grouped data, the methods to find the mean of grouped data, and solve a few examples to
understand this concept better.

38
What is Mean of Grouped Data?

Mean of grouped data is the process of finding the average of a set of data that are grouped
together in different categories. To determine the mean of a grouped data, a frequency table is
required to set across the frequencies of the data which makes it simple to calculate. There are
three main methods of calculating the mean of grouped data, they are - direct method, assumed
mean method, and step deviation method. Each of these methods has its own formulas and ways
to calculate the mean.

Definition of Mean

The mean is the average or a calculated central value of a set of numbers that is used to measure
the central tendency of the data. Central tendency is the statistical measure that recognizes the
entire set of data or distribution through a single value. In statistics, the mean can also be defined
as the sum of all observations to the total number of observations. Given a data set,
X=x1,x2,...,xn

, the mean (or arithmetic mean, or average), denoted x̄ , is the mean of the n values x1,x2,...,xn

. The mean is represented as x-bar, x̄ .

Mean of Grouped Data Formula

The mean formula is defined as the sum of the observations divided by the total number of
observations. There are two different formulas for calculating the mean for ungrouped data and the
mean for grouped data. Let us look at the formula to calculate the mean of grouped data. The formula
is: x̄ = Σfi/N
Where,

 x̄ = the mean value of the set of given data.

 f = frequency of the individual data

 N = sum of frequencies

Hence, the average of all the data points is termed as mean.


39
Data
To calculate the mean of grouped data we have three different methods - direct method, assumed
mean method, and step deviation method. The mean of grouped data deals with the frequencies
of different observations or variables that are grouped together. Let us look at each of these
methods separately.

Direct Method

The direct method is the simplest method to find the mean of the grouped data. If the values of
the observations are x1

, x2, x3,.....xn with their corresponding frequencies are f1, f2, f3,.....fn

then the mean of the data is given by,

x̄ = x1

f1 + x2f2 + x3f3 +.....xnfn / f1 + f2 + f3 +.....fn

x̄ = ∑xi

fi / ∑fi

, where i = 1, 2, 3, 4,......n

Here are the steps that can be followed to find the mean for grouped data using the direct
method,

Create a table containing four columns such as class interval, class marks (corresponding),
denoted by xi frequencies fi (corresponding), and xifi

 Calculate Mean by the Formula Mean = ∑xifi / ∑fi. Where fi is the frequency and xi
 is the midpoint of the class interval.
 Calculate the midpoint, xi, we use this formula xi = (upper class limit + lower class limit)/2.

Let us look at an example.

Class Interval 0 - 10 10 - 20 20 - 30 30 - 40 40 - 50

Frequency (fi 9 13 8 15 10

40
Solution: The first step is to create the table with the midpoint or marks and the product of the
frequency and midpoint. To calculate the midpoint we find the average between the class interval
by using the formula mentioned above.

Midpoint xi

= 0 - 10 = 5 ([10 + 0]/2), 10 - 20 = 15 ([20 + 10]/2) and so on.

xifi = For the class interval 0 - 10 = 5 × 9 = 45, For the class interval 10 - 20 = 13 × 15 = 195 and
so on.

Question 1

The following data represent the annual rainfall distribution in St. Louis, Missouri, for a sample
of 25 years from 1870 to 2004.
Rainfall (inches) Number of Years
20 - 24 1
25 - 29 3
30 - 34 5
35 - 39 8
40 - 44 5
45 - 49 2
50 - 54 0
55 - 59 1

Required

i.compute the mean of the data

ii.median of the data

iii.mode of the data\

THE MEAN FROM GROUPED DATA

The following data show the various runners and the time they take to complete a race.

Seconds Frequency

51 – 55 2

56 – 60 7

41
61 – 65 8

66 – 70 4

The groups (51-55, 56-60, etc), also called class intervals, are of width 5

The midpoints are in the middle of each class: 53, 58, 63 and 68

Midpoint Frequency Midpoint ×


x f Frequency
fx

53 2 106

58 7 406

63 8 504

68 4 272

Totals: 21 1288

And then our estimate of the mean time to complete the race is:

Estimated Mean = 128821 = 61.333

Estimating the Median from Grouped Data

Seconds Frequency
51 - 55 2
56 - 60 7
61 - 65 8
66 - 70 4
Median formular N+1/2

The median is the middle value, which in our case is the 11th one, which is in the 61 - 65 group:

We can say "the median group is 61 - 65"

42
Estimated Median = L + (n/2)/G − B × w

where:

 L is the lower class boundary of the group containing the median


 n is the total number of values
 B is the cumulative frequency of the groups before the median group
 G is the frequency of the median group
 w is the group width

Estimating the Mode from Grouped Data

Again, looking at our data:

Seconds Frequency

51 - 55 2

56 - 60 7

61 - 65 8

66 - 70 4

We can easily find the modal group (the group with the highest frequency), which is 61 - 65

We can say "the modal group is 61 - 65"

But the actual Mode may not even be in that group! Or there may be more than one mode.
Without the raw data we don't really know.

But, we can estimate the Mode using the following formula:

Estimated Mode = L + fm − fm-1(fm − fm-1) + (fm − fm+1) × w

where:

 L is the lower class boundary of the modal group

 fm-1 is the frequency of the group before the modal group

 fm is the frequency of the modal group

43
 fm+1 is the frequency of the group after the modal group

 w is the group width

In this example:

 L = 60.5

 fm-1 = 7

 fm = 8

 fm+1 = 4

 w=5

Estimated Mode= 60.5 + 8 − 7(8 − 7) + (8 − 4) × 5

= 60.5 + (1/5) × 5

= 61.5

LINEAR PROGRAMMING

What is Linear Programming


44
Now, what is linear programming? Linear programming is a simple technique where we depict
complex relationships through linear functions and then find the optimum points. The important
word in the previous sentence is depicted. The real relationships might be much more complex –
but we can simplify them to linear relationships.

Applications of linear programming are everywhere around you. You use linear programming at
personal and professional fronts. You are using linear programming when you are driving from
home to work and want to take the shortest route. Or when you have a project delivery you make
strategies to make your team work efficiently for on-time delivery.

Example of a linear programming problem

Let’s say a FedEx delivery man has 6 packages to deliver in a day. The warehouse is located at
point A. The 6 delivery destinations are given by U, V, W, X, Y, and Z. The numbers on the
lines indicate the distance between the cities. To save on fuel and time the delivery person wants
to take the shortest route.

45
So, the delivery person will calculate different routes for going to all the 6 destinations and then
come up with the shortest route. This technique of choosing the shortest route is called linear
programming.

Operation Research

the objective of the delivery person is to deliver the parcel on time at all 6 destinations. The
process of choosing the best route is called Operation Research. Operation research is an
approach to decision-making, which involves a set of methods to operate a system. In the above
example, my system was the Delivery model.

Linear programming is used for obtaining the most optimal solution for a problem with given
constraints. In linear programming, we formulate our real-life problem into a mathematical
model. It involves an objective function, linear inequalities with subject to constraints.

Is the linear representation of the 6 points above representative of the real-world? Yes and No. It
is an oversimplification as the real route would not be a straight line. It would likely have
multiple turns, U-turns, signals and traffic jams. But with a simple assumption, we have reduced
the complexity of the problem drastically and are creating a solution that should work in most
scenarios.

Formulating a problem – Let’s manufacture some chocolates

Example: Consider a chocolate manufacturing company that produces only two types of
chocolate – A and B. Both the chocolates require Milk and Choco only. To manufacture each
unit of A and B, the following quantities are required:

 Each unit of A requires 1 unit of Milk and 3 units of Choco

 Each unit of B requires 1 unit of Milk and 2 units of Choco

The company kitchen has a total of 5 units of Milk and 12 units of Choco. On each sale, the
company makes a profit of

 Rs 6 per unit A sold

46
 Rs 5 per unit B sold.

Now, the company wishes to maximize its profit. How many units of A and B should it produce
respectively?

Solution: The first thing I’m gonna do is represent the problem in a tabular form for better
understanding.

Milk Choco Profit per unit

A 1 3 Rs 6

B 1 2 Rs 5

Total 5 12

Let the total number of units produced by A be = X

Let the total number of units produced by B be = Y

Now, the total profit is represented by Z

The total profit the company makes is given by the total number of units of A and B produced
multiplied by its per-unit profit of Rs 6 and Rs 5 respectively.

Profit: Max Z = 6X+5Y

which means we have to maximize Z.

The company will try to produce as many units of A and B to maximize the profit. But the
resources Milk and Choco are available in a limited amount.

As per the above table, each unit of A and B requires 1 unit of Milk. The total amount of Milk
available is 5 units. To represent this mathematically,

X+Y ≤ 5

47
Also, each unit of A and B requires 3 units & 2 units of Choco respectively. The total amount of
Choco available is 12 units. To represent this mathematically,

3X+2Y ≤ 12

Also, the values for units of A can only be integers.

So we have two more constraints, X ≥ 0 & Y ≥ 0

For the company to make maximum profit, the above inequalities have to be satisfied.

This is called formulating a real-world problem into a mathematical model.

Common terminologies used in Linear Programming

Let us define some terminologies used in Linear Programming using the above example.

 Decision Variables: The decision variables are the variables that will decide my output.
They represent my ultimate solution. To solve any problem, we first need to identify the
decision variables. For the above example, the total number of units for A and B denoted
by X & Y respectively are my decision variables.

 Objective Function: It is defined as the objective of making decisions. In the above


example, the company wishes to increase the total profit represented by Z. So, profit is
my objective function.

 Constraints: The constraints are the restrictions or limitations on the decision variables.
They usually limit the value of the decision variables. In the above example, the limit on
the availability of resources Milk and Choco are my constraints.

 Non-negativity restriction: For all linear programs, the decision variables should always
take non-negative values. This means the values for decision variables should be greater
than or equal to 0.

The process to formulate a Linear Programming problem

Let us look at the steps of defining a Linear Programming problem generically:

48
1. Identify the decision variables

2. Write the objective function

3. Mention the constraints

4. Explicitly state the non-negativity restriction

For a problem to be a linear programming problem, the decision variables, objective function and
constraints all have to be linear functions.

If all the three conditions are satisfied, it is called a Linear Programming Problem.

2. Solve Linear Programs by Graphical Method

A linear program can be solved by multiple methods. In this section, we are going to look at the
Graphical method for solving a linear program. This method is used to solve a two-variable
linear program. If you have only two decision variables, you should use the graphical method to
find the optimal solution.

A graphical method involves formulating a set of linear inequalities subject to the constraints.
Then the inequalities are plotted on an X-Y plane. Once we have plotted all the inequalities on a
graph the intersecting region gives us a feasible region. The feasible region explains what all
values our model can take. And it also gives us the optimal solution.

Let’s understand this with the help of an example.

Example: A farmer has recently acquired a 110 hectares piece of land. He has decided to grow
Wheat and barley on that land. Due to the quality of the sun and the region’s excellent climate,
the entire production of Wheat and Barley can be sold. He wants to know how to plant each
variety in the 110 hectares, given the costs, net profits and labor requirements according to the
data shown below:

Variety Cost (Price/Hec) Net Profit (Price/Hec) Man-days/Hec

Wheat 100 50 10

49
Barley 200 120 30

The farmer has a budget of US$10,000 and availability of 1,200 man-days during the planning
horizon. Find the optimal solution and the optimal value.

Solution: To solve this problem, first we gonna formulate our linear program.

Formulation of Linear Problem

Step 1: Identify the decision variables

The total area for growing Wheat = X (in hectares)

The total area for growing Barley = Y (in hectares)

X and Y are my decision variables.

Step 2: Write the objective function

Since the production from the entire land can be sold in the market. The farmer would want to
maximize the profit for his total produce. We are given net profit for both Wheat and Barley. The
farmer earns a net profit of US$50 for each hectare of Wheat and US$120 for each Barley.

Our objective function (given by Z) is, Max Z = 50X + 120Y

Step 3: Writing the constraints

1. It is given that the farmer has a total budget of US$10,000. The cost of producing Wheat and
Barley per hectare is also given to us. We have an upper cap on the total cost spent by the farmer.
So our equation becomes:

100X + 200Y ≤ 10,000

2. The next constraint is the upper cap on the availability of the total number of man-days for the
planning horizon. The total number of man-days available is 1200. As per the table, we are given
the man-days per hectare for Wheat and Barley.

10X + 30Y ≤ 1200

50
3. The third constraint is the total area present for plantation. The total available area is 110
hectares. So the equation becomes,

X + Y ≤ 110

Step 4: The non-negativity restriction

The values of X and Y will be greater than or equal to 0. This goes without saying.

X ≥ 0, Y ≥ 0

We have formulated our linear program. It’s time to solve it.

Solving an LP through Graphical method

Since we know that X, Y ≥ 0. We will consider only the first quadrant.

To plot for the graph for the above equations, first I will simplify all the equations.

100X + 200Y ≤ 10,000 can be simplified to X + 2Y ≤ 100 by dividing by 100.

10X + 30Y ≤ 1200 can be simplified to X + 3Y ≤ 120 by dividing by 10.

The third equation is in its simplified form, X + Y ≤ 110.

Plot the first 2 lines on a graph in the first quadrant (like shown below)

The optimal feasible solution is achieved at the point of intersection where the budget & man-
days constraints are active. This means the point at which the equations X + 2Y ≤ 100 and X +
3Y ≤ 120 intersect gives us the optimal solution.

The values for X and Y which gives the optimal solution is at (60,20).

To maximize profit the farmer should produce Wheat and Barley in 60 hectares and 20 hectares
of land respectively.

The maximum profit the company will gain is,

Max Z = 50 * (60) + 120 * (20)

= US$5400
51
52
THE SIMPLEX METHOD
1. Set up the problem. That is, write the objective function and the inequality constraints.
2. Convert the inequalities into equations. This is done by adding one slack variable for
each inequality.
3. Construct the initial simplex tableau. Write the objective function as the bottom row.
4. The most negative entry in the bottom row identifies the pivot column.
5. Calculate the quotients. The smallest quotient identifies a row. The element in the
intersection of the column identified in step 4 and the row identified in this step is
identified as the pivot element. The quotients are computed by dividing the far right
column by the identified column in step 4. A quotient that is a zero, or a negative number,
or that has a zero in the denominator, is ignored.
6. Perform pivoting to make all other entries in this column zero. This is done the same
way as we did with the Gauss-Jordan method.
7. When there are no more negative entries in the bottom row, we are finished;
otherwise, we start again from step 4.
8. Read off your answers. Get the variables using the columns with 1 and 0s. All other
variables are zero. The maximum value you are looking for appears in the bottom right
hand corner.
Now, we use the simplex method to solve Example 3.1.1 solved geometrically in section 3.1.
Example 4.2.1
Niki holds two part-time jobs, Job I and Job II. She never wants to work more than a total of 12
hours a week. She has determined that for every hour she works at Job I, she needs 2 hours of
preparation time, and for every hour she works at Job II, she needs one hour of preparation time,
and she cannot spend more than 16 hours for preparation. If she makes $40 an hour at Job I, and
$30 an hour at Job II, how many hours should she work per week at each job to maximize her
income?
Solution
In solving this problem, we will follow the algorithm listed above.
STEP 1. Set up the problem. Write the objective function and the constraints.
Since the simplex method is used for problems that consist of many variables, it is not practical
to use the variables x, y, z etc. We use symbols x1, x2, x3
, and so on.

53
Let
 x1 = The number of hours per week Niki will work at Job I and
x2= The number of hours per week Niki will work at Job II.
It is customary to choose the variable that is to be maximized as Z
The problem is formulated the same way as we did in the last chapter.
Maximize Subject to: Z=40x1+30x2x1+x2≤122x1+x2≤16x1≥0;x2≥0
STEP 2. Convert the inequalities into equations. This is done by adding one slack variable for
each inequality.
For example to convert the inequality x1+x2≤12
into an equation, we add a non-negative variable y1
, and we get
x1+x2+y1=12
Here the variable y1 picks up the slack, and it represents the amount by which x1+x2 falls short
of 12. In this problem, if Niki works fewer than 12 hours, say 10, then y1 is 2. Later when we
read off the final solution from the simplex table, the values of the slack variables will identify
the unused amounts.
We rewrite the objective function Z=40x1+30x2
as −40x1−30x2+Z=0
.
After adding the slack variables, our problem reads
Objectivefunction Subject to
constraints: −40x1−30x2+Z=0x1+x2+y1=122x1+x2+y2=16x1≥0;x2≥0
STEP 3. Construct the initial simplex tableau. Each inequality constraint appears in its own
row. (The non-negativity constraints do not appear as rows in the simplex tableau.) Write the
objective function as the bottom row.
Now that the inequalities are converted into equations, we can represent the problem into an
augmented matrix called the initial simplex tableau as follows.

54
Here the vertical line separates the left hand side of the equations from the right side. The
horizontal line separates the constraints from the objective function. The right side of the
equation is represented by the column C.
The reader needs to observe that the last four columns of this matrix look like the final matrix for
the solution of a system of equations. If we arbitrarily choose x1=0
and x2=0
, we get

y1100y2010Z001

which reads
y1=12y2=16Z=0
The solution obtained by arbitrarily assigning values to some variables and then solving for the
remaining variables is called the basic solution associated with the tableau. So the above
solution is the basic solution associated with the initial simplex tableau. We can label the basic
solution variable in the right of the last column as shown in the table below.

STEP 4. The most negative entry in the bottom row identifies the pivot column.
The most negative entry in the bottom row is -40; therefore the column 1 is identified.

Question Why do we choose the most negative entry in the bottom row?
55
Answer The most negative entry in the bottom row represents the largest coefficient in the
objective function - the coefficient whose entry will increase the value of the objective function
the quickest.
The simplex method begins at a corner point where all the main variables, the variables that have
symbols such as x1
, x2, x3 etc., are zero. It then moves from a corner point to the adjacent corner point always
increasing the value of the objective function. In the case of the objective function Z=40x1+30x2,
it will make more sense to increase the value of x1 rather than x2. The variable x1 represents the
number of hours per week Niki works at Job I. Since Job I pays $40 per hour as opposed to Job
II which pays only $30, the variable x1 will increase the objective function by $40 for a unit of
increase in the variable x1
.
STEP 5. Calculate the quotients. The smallest quotient identifies a row. The element in the
intersection of the column identified in step 4 and the row identified in this step is identified
as the pivot element.
Following the algorithm, in order to calculate the quotient, we divide the entries in the far right
column by the entries in column 1, excluding the entry in the bottom row.

The smallest of the two quotients, 12 and 8, is 8. Therefore row 2 is identified. The intersection
of column 1 and row 2 is the entry 2, which has been highlighted. This is our pivot element.
Question Why do we find quotients, and why does the smallest quotient identify a row?
Answer When we choose the most negative entry in the bottom row, we are trying to increase the
value of the objective function by bringing in the variable x1
. But we cannot choose any value for x1. Can we let x1=100? Definitely not! That is because
Niki never wants to work for more than 12 hours at both jobs combined: x1+x2≤12. Can we let
x1=12
? Again, the answer is no because the preparation time for Job I is two times the time spent on
the job. Since Niki never wants to spend more than 16 hours for preparation, the maximum time
she can work is 16 ÷ 2 = 8.

56
Now you see the purpose of computing the quotients; using the quotients to identify the pivot
element guarantees that we do not violate the constraints.
Question Why do we identify the pivot element?
Answer As we have mentioned earlier, the simplex method begins with a corner point and then
moves to the next corner point always improving the value of the objective function. The value
of the objective function is improved by changing the number of units of the variables. We may
add the number of units of one variable, while throwing away the units of another. Pivoting
allows us to do just that.
The variable whose units are being added is called the entering variable, and the variable whose
units are being replaced is called the departing variable. The entering variable in the above
table is x1
, and it was identified by the most negative entry in the bottom row. The departing variable y2
was identified by the lowest of all quotients.
STEP 6. Perform pivoting to make all other entries in this column zero.
In chapter 2, we used pivoting to obtain the row echelon form of an augmented matrix. Pivoting
is a process of obtaining a 1 in the location of the pivot element, and then making all other
entries zeros in that column. So now our job is to make our pivot element a 1 by dividing the
entire second row by 2. The result follows.

To obtain a zero in the entry first above the pivot element, we multiply the second row by -1 and
add it to row 1. We get

To obtain a zero in the element below the pivot, we multiply the second row by 40 and add it to
the last row.

57
We now determine the basic solution associated with this tableau. By arbitrarily choosing x2=0
and y2=0, we obtain x1=8, y1=4, and z=320
. If we write the augmented matrix, whose left side is a matrix with columns that have one 1 and
all other entries zeros, we get the following matrix stating the same thing.
⎡⎣⎢⎢⎢⎢x1010y1100Z001||||C48320⎤⎦⎥⎥⎥⎥
We can restate the solution associated with this matrix as x1=8
, x2=0, y1=4, y2=0 and z=320. At this stage of the game, it reads that if Niki works 8 hours at Job
I, and no hours at Job II, her profit Z will be $320. Recall from Example 3.1.1 in section 3.1 that
(8, 0) was one of our corner points. Here y1=4 and y2=0
mean that she will be left with 4 hours of working time and no preparation time.
STEP 7. When there are no more negative entries in the bottom row, we are finished;
otherwise, we start again from step 4.
Since there is still a negative entry, -10, in the bottom row, we need to begin, again, from step 4.
This time we will not repeat the details of every step, instead, we will identify the column and
row that give us the pivot element, and highlight the pivot element. The result is as follows.

We make the pivot element 1 by multiplying row 1 by 2, and we get

Now to make all other entries as zeros in this column, we first multiply row 1 by -1/2 and add it
to row 2, and then multiply row 1 by 10 and add it to the bottom row.
58
We no longer have negative entries in the bottom row, therefore we are finished.
Question Why are we finished when there are no negative entries in the bottom row?
Answer The answer lies in the bottom row. The bottom row corresponds to the equation:
0x1+0x2+20y1+10y2+Z=400 or z=400−20y1−10y2
Since all variables are non-negative, the highest value Z
can ever achieve is 400, and that will happen only when y1 and y2
are zero.
STEP 8. Read off your answers.
We now read off our answers, that is, we determine the basic solution associated with the final
simplex tableau. Again, we look at the columns that have a 1 and all other entries zeros. Since
the columns labeled y1
and y2 are not such columns, we arbitrarily choose y1=0, and y2=0
, and we get
⎡⎣⎢⎢⎢⎢x1010x2100Z001||||C84400⎤⎦⎥⎥⎥⎥
The matrix reads x1=4
, x2=8 and z=400
.
The final solution says that if Niki works 4 hours at Job I and 8 hours at Job II, she will
maximize her income to $400. Since both slack variables are zero, it means that she would have
used up all the working time, as well as the preparation time, and none will be left.

59
What Is Utility Function?
In economics, utility represents the satisfaction or pleasure that consumers receive for consuming
a good or service. Utility function measures consumers' preferences for a set of goods and
services.
Utility is measured in units called utils—the Spanish word for useful— but calculating the
benefit or satisfaction that consumers receive is abstract and difficult to pinpoint. As a result,
economists measure utility in terms of revealed preferences by observing consumers' choices.
From there, economists create an ordering of consumption baskets from least desired to the most
preferred.
Key points
 In economics, utility function is an important concept that measures preferences over a
set of goods and services.
 Utility represents the satisfaction that consumers receive for choosing and consuming a
product or service.
 Economists track consumer choices to ascertain one product's utility versus another and
assign a numerical value to that utility.
 Company executives research consumers' utility to guide the company's sales and
marketing plans, advertising, and new product offerings.
 Ordinal utility ranks choices by preference, whereas cardinal utility measures the utility
received from a choice.
Understanding Utility Function
In economics, the utility function measures the welfare or satisfaction of a consumer as a
function of the consumption of real goods, such as food or clothing. Utility function is widely
used in rational choice theory to analyze human behavior.
When economists measure or rank the preferences of consumers, it is referred to as ordinal
utility. In other words, the order in which consumers choose one product over another can
establish that consumers assign a higher value to the chosen product. Ordinal utility measures
how consumers rank products, but it does not measure how much more one ranks above the
other.
To better understand ordinal utility, consider the following example. Three contestants vie for
first place in a dance competition. Contestant A is declared the winner. Contestant B is the
runner-up, and contestant B ranked third. Ordinal utility reveals that the judges preferred
contestant A over contestants B and C and contestant B over C. What ordinal function does not
tell us is to what degree one was preferred over the other.

60
Mainly used in microeconomics, cardinal utility assigns a numeric value to the consumer's
preference, indicating the degree to which one choice ranks above another. Cardinal utility will
define how much more contestant A was preferred over contestants B and C, and so on.
When considering utility, it is important to understand the concepts of total utility and marginal
utility. Marginal utility measures the satisfaction or benefits a person gets from consuming an
additional unit of a product or service. Total utility measures the satisfaction or benefits a person
gets from the total consumption—including marginal utility—of a product or service.
If consuming 10 units of a product yields 20 utils, and consuming one additional unit yields 1
util, the total utility is 21 utils. If consuming another unit yields .5 utils, the total utility would
then become 21.5 utils.
Economists believe that the amount of satisfaction one receives from each additional unit of
consumption diminishes with each unit consumed. This concept is called the law of diminishing
marginal utility. Diminishing marginal utility doesn't state that consuming additional units will
fail to satisfy the consumer; it states that the satisfaction from consuming more and more units is
less than the first additional units consumed.
How to Calculate a Utility Function
Utility functions are expressed as a function of the quantities of a bundle of goods or services. It
is often denoted as U(X1, X2, X3, Xn).
A utility function that describes a preference for one bundle of goods (X a) vs another bundle of
goods (Xb) is expressed as U(Xa, Xb).
Where there are perfect complements, the utility function is written as U(X a, Xb) = MIN[Xa, Xb],
where the smaller of the two is assigned the function's value.
In certain situations, the goods may be considered perfect substitutes for each other, and the
appropriate utility function must reflect such preferences with a utility form of U(X a, Xb) = Xa+
Xb.1
Example of Utility Function
Let's say a consumer is shopping for a new car and has narrowed the choice down to two cars.
The cars are nearly identical, except the second car has enhanced safety features. As a result, the
second car costs $2,000 more than the first car.
The incremental or marginal utility or satisfaction derived from car two could be represented
numerically as the $2,000 price difference between the two cars. In other words, the consumer is
receiving $2,000 in incremental or marginal utility from car two.
Furthermore, let's say that 100,000 consumers throughout the economy preferred car two to car
one. Economists might infer that consumers, overall, received $200 million (100,000 x $2,000)
worth of incremental utility from the safety features of car two. Utility is derived from the
61
consumer's belief that they are likely to have fewer accidents due to the added safety features of
car two.
Advantages and Disadvantages of Utility Function
Economists can't assign a true numerical value to a consumer's level of satisfaction from a
preference or choice. Also, pinpointing the reason for purchase can be difficult; there are usually
many variables to consider.
In the previous example, the two cars were nearly identical. In reality, there might be several
features or differences between the two cars. As a result, assigning a value to a consumer's
preference can be challenging since one consumer might prefer the safety features while another
might prefer something else.
Tracking and assigning values to utility can still be useful to economists. Over time, choices and
preferences may indicate changes in spending patterns and in utility.
Understanding the logic behind consumer choices and their level of satisfaction is not only
important to economists but to companies, as well. Company executives can use utility to track
how consumers view their products.
Utility function is essentially a "model" used to represent consumer preferences, so companies
often implement them to gain an edge on the competition. For example, studying consumers'
utility can help guide management on anything from marketing and sales to product upgrades
and new offerings.
Utility Function FAQs
What Is Utility Function?
Utility describes the benefits gained or satisfaction experienced with the consumption of goods
or services. Utility function measures the preferences consumers apply to their consumption of
goods and services. For instance, if a customer prefers apples to oranges no matter the amount
consumed, the utility function could be expressed as U(apples) > U(oranges).
What Is the Difference Between Utility Function and Marginal Utility?
Utility function ranks consumers' consumption of goods or services by preference. Marginal
utility measures the change in utility when the rate of consumption changes (i.e., how much more
satisfaction is gained by consuming another unit of a good or service).
Why Is Utility Function Important?
Economists use utility function to better understand consumer behaviors, as well as determine
how well goods and services provide satisfaction to consumers.

62
Utility function can also help analysts determine how to distribute goods and services to
consumers in a way that total utility is realized.
Companies can use utility function to determine which product(s) within their product line (or
that of a competitor) consumers prefer. Knowing these preferences can help management teams
enhance product development to assume a competitive advantage.
The Bottom Line
Utility describes the benefit or satisfaction received from consuming a good or service. The unit
of measurement economists use to gauge satisfaction is called util. Utility function measures
consumers' preferences for bundles of goods or services. Ordinal utility ranks a customer's
choice by preference, and cardinal utility assigns a numeric value to each preference to
determine how much more one good is preferred over another.

63

You might also like