0% found this document useful (0 votes)
12 views21 pages

Bayess

This document is a handout on Bayes' Theorem, detailing its definition, applications, and problem-solving strategies. It includes tips for tackling Bayes' theorem problems, as well as 15 solved examples to enhance understanding. The handout is prepared by Yussuf Hamoud and Ally Omar, dedicated to their mathematics teacher, Sir Shafii Athumani.

Uploaded by

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

Bayess

This document is a handout on Bayes' Theorem, detailing its definition, applications, and problem-solving strategies. It includes tips for tackling Bayes' theorem problems, as well as 15 solved examples to enhance understanding. The handout is prepared by Yussuf Hamoud and Ally Omar, dedicated to their mathematics teacher, Sir Shafii Athumani.

Uploaded by

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

MADUNGU SECONDARY SCHOOL

This quick handout is dedicated to our Mathematics teacher who works tirelessly for us to get a better
education SIR SHAFII ATHUMANI.

In this digging deeper handout, we take a look at BAYES’ THEOREM by covering:

 Introduction to Bayes’ theorem.


 Tips on dealing with Bayes’ theorem problems.
 15 solved problems for deeper understanding of the theory.
 It’s advisable that you take part of doing the question by yourself before looking the
solution of a particular question.
 Answers are of high degree accuracy.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


1
BAYES’ THEOREM

Bayes’ theorem, named after 18th century British mathematician Thomas Bayes, a Mathematical formula
for determining conditional probability.

Conditional probability is the probability in which occurrence of one event depends on occurrence of the
other. Thus, Bayes’ theorem provides way to revise existing predictions or theories given new or additional
evidence.

From conditional probability of two events let say event A and B we have,
𝑃(𝐴 ⋂ 𝐵) 𝑃(𝐴∩𝐵)
P(𝐴⁄𝐵 ) = 𝑃(𝐵)
and P(𝐵⁄𝐴) = 𝑃(𝐴)

Making subject of the formula P(A∩ 𝐵) then equating those two equations will give

P(A∩ 𝐵) = 𝑃(𝐴⁄𝐵) × 𝑃 (𝐵) = 𝑃(𝐵⁄𝐴) × 𝑃(𝐴)

Taking 𝑃(𝐴⁄𝐵) × 𝑃(𝐵) = 𝑃(𝐵⁄𝐴) × 𝑃(𝐴) divide by 𝑃(𝐵) both sides give

𝑃(𝐵⁄𝐴) × 𝑃(𝐴)
𝑃(𝐴⁄𝐵) =
𝑃 (𝐵)

Where P(B) is the sum of occurrence /probability of event B

This is the basic formula for BAYES’ THEOREM. Therefore, this theory helps to find the conditional
probability whose reverse conditional probability is known.

TIPS FOR DEALING WITH BAYES’ THEOREM PROBLEMS.

 Identify the normal probability, normal probability is when you are provided with two or
more source of events and they actually have equal probability unless specified otherwise.
Example assume you are provided with two urns A and B containing three red marbles and
five blue marbles in urn A and two red marbles and four blue marbles in the other
urn…….thus the probability (normal probability) of drawing a marble from either of the
two urns is 1⁄2 or 0.5. In other cases you might be given that the chance of drawing a
marble from urn A is 40%.......which implies that the normal probability of drawing a
marble from urn A is 0.4 and that of B is 1-0.4 = 0.6.
 Identify conditional probability in a given problem, this is the probability of choosing
element from something (source) ,example the probability of choosing red marbles from
urn or box A.
 Use suitable tree diagram .
 Apply BAYES’ formula to obtain the reverse conditional probability.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


2
SOLVED PROBLEMS.

1. Two boxes, first box contains 2 white and 3 red balls and the second box contains 4 white and 5 red
balls. One of the balls is drawn at random from one of the box and is found to be red, find the
probability that it was drawn from second box.
Solution
In this question the chance for a ball to be drawn from any of the two boxes is equal, thus normal
probability of the box is 1⁄2 .
Conditional probability of this question is that the drawn red ball maybe from first or second box with
corresponding probabilities of …
Let’s say first box be A and the second be B to make it more simple on notation of their probability
And the red ball be represented by letter R
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑟𝑒𝑑 𝑏𝑎𝑙𝑙𝑠 𝑝𝑟𝑒𝑠𝑒𝑛𝑡 𝑖𝑛 𝑏𝑜𝑥 𝐴 3
The probability that the red ball comes from box A, P(𝑅 ⁄𝐴) = 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑎𝑙𝑙𝑠 𝑖𝑛 𝑏𝑜𝑥 𝐴
=5
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑟𝑒𝑑 𝑏𝑎𝑙𝑙𝑠 𝑝𝑟𝑒𝑠𝑒𝑛𝑡 𝑖𝑛 𝑏𝑜𝑥 𝐵 5
The probability that the red ball comes from box B, P(𝑅 ⁄𝐵) = 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑎𝑙𝑙𝑠 𝑖𝑛 𝑏𝑜𝑥 𝐵
=9
Required to calculate is the probability that red ball has already occur and it is from second box that
means it is the probability that of second box given red occur , P(𝐵⁄𝑅)
From Bayes’ formula

𝑃(𝑅 ⁄𝐵) × 𝑃(𝐵)


𝑃(𝐵⁄𝑅) =
𝑃(𝑅)
1 3 1 5 26
But P(R) is the total probability of the drawn ball to be red = 2
× 5 + 2 × 9 = 45

1 5
× 25
2 9
𝑃(𝐵⁄𝑅) = 26 = 52
45

25
⸫The probability that the red ball was drawn from a second box is 52

2. Three girls, Aileen, Barbara and Cathy, pack biscuits in a factory. From the batch allotted to them
Aileen packs 55%, Barbara 30% and Cathy 15%. The probability that Aileen breaks some biscuits in a
packet is 0.7, and the respective probabilities for Barbara and Cathy are 0.2 and 0.1. What is the
probability that the packet with broken biscuits found by the checker was packed by Aileen.
Solution.
Let A be the event ‘the packet was packed by Aileen’, B be the event ‘the packet was packed by
Barbara’, C be the event ‘the packet was packed by Cathy’, D be the event ‘the packet contains broken
biscuits’.
We are given P(A) = 0.55, P(B) = 0.3, P(C) = 0.15 and
P(𝐷⁄𝐴) = 0.7, P(𝐷⁄𝐵 ) = 0.2 , P(𝐷⁄𝐶) = 0.1.

We need to find the probability that the packet containing broken biscuit found by the checker was packed
by Aileen that is….it is the probability that Aileen packed the broken biscuits given the broken biscuit has
already found by the checker , P(𝐴⁄𝐷), so we use Bayes’ theorem to ‘reverse the conditions’:
𝑃(𝐷⁄𝐴) × 𝑃(𝐴)
𝑃(𝐴⁄𝐷) =
𝑃 (𝐷)

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


3
Now P(D) is the ‘total’ probability of D, that is the probability that a packet contains broken biscuits.

Thus can be found very easily from the tree diagram. The outcomes resulting in a packet with broken
biscuits are shown with an asterisk.
State of biscuits
P(D/A) = 0.7 *P(D/A)P(A) = (0.7)(0.55)
Packer

P(A) = 0.55 P(D’/A) = 0.3

P(D/B) = 0.2
P(B) = 0.3 *P(D/B)P(B) = (0.2)(0.3)

P(D’/B) = 0.8
P(C) = 0.15
P(D/C) = 0.1 *P(D/C) P(C) = (0.1)(0.15)

P(D’/C) = 0.9
P(D) = P(D/A)P(A) + P(D/B)P(B) + P(D/C)P(C)

= (0.7)(0.55) +(0.2)(0.3) +(0.1)(0.15)

= 0.46

As shown in the tree diagram

P(D/A)P(A) = (0.7)(0.55)
0.7×0.55 77
Then P(A/D) = =
0.46 92

= 0.837 ( 3 d.p )

⸫The probability that a packet with broken biscuits was packed by Aileen is 0.837 (3 d.p)

3. Three children, Catherine, Michael and David , have equal plots in a circular patch garden. The boundaries
are marked out by pebbles. Catherine has 80 red and 20 white flowers in her patch, Michael has 30 red and
40 white flowers and David has 10 red and 60 white flowers. Their young sister, Mary, wants to pick a
flower for her teacher.
(a) Find the probability that she picks a red flower if she chooses a flower at random from the garden,
ignoring the boundaries.
(b) Find the probability that she picks a red flower if she first chooses a plot at random.
(c) If she chooses a flower by the method described in (b), find the probability that it comes from
Michael’s plot.
Solution
(a) If the boundaries are ignored:
The possibility space S = (flowers in the garden)
And n(S) = 100+70+70 = 240
Let R be the event ‘a red flower is chosen’ ,then
n(R) = 80+30+10 =120

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


4
𝑛(𝑅)
P(R) = 𝑛(𝑠)
120 1
= =
240 2
1
The probability that Mary picks a red flower if she ignores the boundaries is 2
(b) A plot is chosen first: given that the three plots are equal in circular patch this gives us
information that each of the three plots is equally likely to be chosen.
1 1
Let C be the event ‘Catherine’s plot is chosen’ then P(C) = 3 with similar notation P(M) = 3 and
1
P(D) = 3
The outcomes resulting in event R are shown with an asterisk on the tree diagram
Colour of flower
Plot
80 1
*P(R/C)P(C) = 100 × 3

30 1
*P(R/M)P(M) = ×
70 3

P(M) = ⅓

10 1
*P(R/D)P(D) = ×
70 3

Now P(R) = P(R/C)P(C) + P(R/M)P(M) + P(R/D)P(D)


80 1 30 1 10 1
= 100 × 3 + 70 × 3 + 70 × 3

16
= 35

16
The probability that Mary picks a red flower if she chooses a plot at random first is 35

NOTE : The two different result from part (a) and part (b) are slightly surprising. In the first case, there is one group flowers
because the whole circular patch was considered as single plot and thus each flower is equally likely to be chosen. In the
second case, even though each plot is equally likely to be chosen, the proportion of red and white flowers within these plots
are different.

(c) Using Bayes’ theorem:

𝑃(𝑅 ⁄𝑀) × 𝑃(𝑀)


𝑃(𝑀⁄𝑅) =
𝑃 (𝑅)

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


5
30 1 1
Now P(R/M)P(M) =70 × 3 = 7 (from tree diagram)

16
And P(R) = 35 (from part (b))

1
7 5
Therefore, P(M/R) = 16 =
16
35

5
Given that picks a flower, the probability that it came from Michael’s plot is .
16

1
4. I travel to work by route A or route B. The probability that I choose route A is . The probability that I am late for
4
2 1
work if I go via rout A is 3 and the corresponding probability if I go via route B is 3 .
(a) What is the probability that I am late for work on Monday?
(b) Given that I am late for work, what is the probability that I went via route B?
Solution .
(a) The probability of being late for work on Monday
The probability of being late for work is independent of the days in a week thus the probability of being late
at work on particular day, Monday, is equal to the probability of being late for work on any day depending
on the route used to arrive at work.
Let A be the event ‘I choose route A’ and B be the event ‘I choose route B’ also L be the event ‘I am late for
work’.
The outcomes in event L are shown with an asterisk on the tree diagram.

Arrival
1 2
Route *P(L/A)P(A) = ×
2 4 3
P(L/A)=
3

1
P(A)=
4

9
1 3
*P(L/B)P(B) = ×
1 3 4
3
P(L/B)=
3
P(A)=
4

Now P(L) = P(L/A)P(A) + P(L/B)P(B)


9
1 2 1 3 5
=4 × 3 + 3 × 4 = 12

5
The probability that I am late for work on Monday is .
12

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


6
(b) The probability that I went via route B given that I am late for work
By using Bayes’ theorem
𝑃(𝐿⁄𝐵) × 𝑃(𝐵)
𝑃(𝐵⁄𝐿) =
𝑃 (𝐿)
1 3 1
Now 𝑃(𝐿⁄𝐵) × 𝑃(𝐵) = × = (from tree diagram)
3 4 4
5
And P(L) = 12 form part (a)
1
4 3
Then P(B/L)= 5 =5
12
3
The probability that I am late for work via route B is .
5
5. A particular study showed that 12% of men will likely develop prostate cancer at some point in their
lives. A man with prostate cancer has a 95% chance of a positive test result from a medical screening
test. A man without prostate cancer has a 6% chance of getting a false positive test result .What is the
probability that a man has a cancer given that, he has a positive test result?
Solution.
Let C the event ‘a man with prostate cancer’ and D be event ‘positive result from a medical screening
test’.
The outcomes resulting in event D are shown with an asterisk on the tree diagram below

Screening test
Men *P(D/C)P(C) = 0.95 × 0.12
P(D/C)= 0.95

P(C)= 0.12

*P(D/C’)P(C’) = 0.06 × 0.88


P(D/C’)= 0.06
P(C’)= 0.88

The probability that a man has cancer given that, he has positive result, P(C/D)
By using Bayes’ theorem to ‘reverse the conditions’9

𝑃(𝐷⁄𝐶) × 𝑃(𝐶)
𝑃(𝐶 ⁄𝐷) =
𝑃(𝐷)

Now P(D) is the total probability in resulting D thus,

P(D) = P(D/C)P(C) + P(D/C’)P(C’)

= 0.95 × 0.12 + 0.06 × 0.88 = 0.1668

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


7
And 𝑃(𝐷⁄𝐶) × 𝑃(𝐶) = 0.95 × 0.12

= 0.144

0.114
Therefore P(C/D) = 0.1668

95
= = 0.683 (3 𝑑. 𝑝)
139

The probability that a man has cancer given that he has positive result is 0.683 (3 𝑑. 𝑝).

6. Of the buses leaving the bus station each day, 60% are double deckers and the rest are single deckers;
30% of the double deckers are ‘limited stop’ and 40% of the single deckers are ‘limited stop’ buses.
Draw a tree diagram to represent this information . Find the probability that a bus leaving the station
(a) Is not a ‘limited stop’ bus.
(b) Is a double decker, given that it is a ‘limited stop’ bus.
Solution.
Let D be the event ‘double deckers bus leaving the station’ and S be the event ‘single deckers bus
leaving the station’
And L be the event ‘the bus is ‘limited stop’’
We are given P(D)=0.6, P(S)=0.4, P(L/D)=0.3, and P(L/S)=0.4
The outcomes are displayed with an asterisk on the tree diagram below.

Limit status
Type of bus *P(L/D)P(D) = 0.3 × 0.6
P(L/D)= 0.3

P(D)= 0.6
P(L’/D)= 0.7 *P(L’/D)P(D) = 0.7 × 0.6

*P(L/S)P(S) = 0.4 × 0.4


P(L/S)= 0.4
P(S)= 0.4

P(L’/S)= 0.6
*P(L’/S)P(S) = 0.6 × 0.4

(a) The probability that the bus leaving the station


9 is not a ‘limited stop’ bus
P(L’) = P(L’/D)P(D) + P(L’/S)P(S)
= 0.7 × 0.6 + 0.6 × 0.4
= 0.66.
The probability that the bus leaving the station is not a ‘limited stop’ bus is 0.66.
9

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


8
(b) The probability that the bus leaving the station is a double decker , given that it is a ‘limited stop’
bus, P(D/L)
By using Bayes’ theorem to ‘reverse the conditions’

𝑃(𝐿⁄𝐷) × 𝑃(𝐷)
𝑃(𝐷⁄𝐿) =
𝑃(𝐿)

From an identity P(L) + P(L’) = 1

Then P(L) = 1- P(L’) but P(L’) = 0.66 from part (a)

P(L) = 1 – 0.66 = 0.34

And 𝑃(𝐿⁄𝐷) × 𝑃(𝐷) = 0.3 × 0.6 = 0.18


0.18
Therefore P(D/L) = 0.34

9
= 17

9
The probability that the bus leaving the station is double deckers given that it is a ‘limited stop’ bus is 17.

7. Susan takes examinations in mathematics, French and history. The probability that she passes
mathematics is 0.7 and the corresponding probabilities for French and history are 0.8 and 0.6 . Given
that her performance in each subject are independent, draw the tree diagram to show the possible
outcomes. Find the probability that Susan
(a) Fails all three examinations.
(b) Fails just one examination.
(c) Given that Susan fails just one examination, find the probability that she fails history.
Solution.

Let M, F and H be the event that ‘Susan takes Mathematics, French and History examinations respectively’

And P and P’ be the corresponding events that ‘Susan passes and fails a particular examination’

The outcomes are shown on the tree diagram below:


Result
P(P/M) = 0.7
Examination

P(F/M) = 0.3
Mathematics

9(
P(P/F) = 0.8

French

9(
P(P’/F) = 0.2

History 9(
P(P/H) = 0.6

9(
P(P’/H) = 0.4

9(
PREPARED BY YUSSUF HAMOUD & ALLY OMAR
9
9(
(a) The probability that Susan fails all three examinations, P(P’)
Given that, the performance in each subject are indecent
P(P’) = P(P’/M) × P(P’/F) × P(P’/H)
= 0.3 × 0.2 × 0.4
= 0.024
The probability that Susan fails all three examinations is 0.024.
(b) The probability that Susan fails just one examination, P(P’1)
P(P’1) = ( P(P’/M)×P(P/H)×P(P/F) ) + ( P(P/M)×P(P’/H)×P(P/F) ) + ( P(P/M)×P(P/H)×P(P’/F) )
= 0.3×0.8×0.6 + 0.7×0.2×0.6 + 0.7×0.8×0.4
= 0.452
The probability that Susan fails just one examination is 0.452.
(c) The probability that Susan fails history given that she fails just one examination
Let the probability that Susan fails just history be P(Hf) = P(P’/H)×P(P/M)×P(P/F)
= 0.4×0.8×0.7
= 0.224
𝑃(𝑃′1 / 𝐻𝑓)𝑃(𝐻𝑓)
Thus P(Hf /P’1 ) = 𝑃(𝑃′1 )
Now𝑃(𝑃 ′1 / 𝐻𝑓 )𝑃(𝐻𝑓 ) = P(Hf) = 0.224

And P(P’1) = 0.452 from part (b)


0.224 56
Then P(Hf /P’1 ) = =
0.452 113

= 0.496 (3 d.p )

The probability that Susan fails History given that she fail just one examination is 0.496

 This is true for all other examination when asked to fail one or two examination . On your
own you should be able to calculate the probability that she fails Mathematics given that
she fails just one subject as well as for French.
8. A bag contains 10 counters of which 4 are pink, 3 are green and 3 are yellow. Counters are removed at
random, one at a time and without replacement. Find the probability that
(a) The first one drawn is green
(b) The first two drawn are of the same colour
(c) The first three drawn are of different colours
(d) The second one drawn is green, given that the first one drawn is pink
(e) The third one drawn is green, given that the first two are the same colour as each other.
Solution
Let P, G and Y be the corresponding events that ‘ pink, green and yellow counter is drawn’
The outcomes of the events are shown on the tree diagram that follows.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


10
3⁄ P
9
3⁄
9
P G
3⁄
9 Y P
3⁄
8

4 2⁄ G
8
10
Y
P 3⁄
8
4⁄
9
3
4⁄
8
P
2⁄
10 9 1⁄
G G 8
G
3⁄
3⁄ 8 Y
9 Y 4⁄
8
P
2⁄
3 8
10 2⁄
G
8
P
4⁄
Y
9
3⁄
9
Y G
2⁄ Y
9

First draw Second draw Third draw

(a) The first one drawn is green


Number of green counters in a bag n(G) = 3
Number of all counters in a bag n(S) = 10
3
From basic formula of probability P(G) = 10
3
The probability that the first counter drawn to be green is
10
(b) The first two drawn are both the same colour
From the tree diagram, for first two counters drawn to be of the same colour can be either pink in
first draw then pink in second draw, similar way to green or red.
Therefore, the first two counters to be of the same color = P(P)×P(P) + P(G)×P(G) +P(Y)×P(Y)
4 3 3 2 3 2
= 10 × 9 + 10 × 9 + 10 × 9
4
=
15
4
The probability that the first two counters drawn to be of the same colour is 15.
(c) The first three drawn are of different colours

The occurrence of three counters in different can be of 6 different ways as PGY, GPY, GYP, YPG,
PYG, and YGP.

The probability of any of these possibilities is the same with minor difference of arrangement of
numbers for which does not affect the numerical value since it is the product of the three numbers hence
the sum of the six products, can easily be calculated by multiplication of the single product by six
4×3×3 3
Thus probability of first three drawn counter of different colours = 6(10×9×8) = 10.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


11
(d) The second one drawn is green, given the first one drawn is pink
Take a look on the second draw of green counter from pink as first draw
3 1
P(G/P) = 𝑤ℎ𝑖𝑐ℎ 𝑟𝑒𝑑𝑢𝑐𝑒𝑠 𝑡𝑜
9 3
1
The probability that the second counter drawn is green given the first counter drawn is pink = 3.
(e) The third one drawn is green, given that the first two are the same colour as each other.
Let S be the event that ‘the first two counters are of the colour’
Required to calculate is P(G/S)
By using Bayes’ formula

𝑃(𝑆⁄𝐺) × 𝑃(𝐺)
𝑃(𝐺 ⁄𝑆) =
𝑃(𝑆)

Since Bayes’ formula reverse the conditional probability as discussed earlier in this handout thus

P(S/G) is read as ‘the probability that the last two counters are of the same colour, given that the first on
drawn is green’ and can be calculated as

From the tree diagram, the last two counters of the same colour given the first is green

= P(PP) + P(GG) + P(YY)


4 3 2 1 3 2 5
P(S/G) = × + × + × =
9 8 9 8 9 8 18

3
And P(G) = 10

P(S) is the probability of the first two counters drawn were of the same colour which can be either PP, GG,
and YY
4 3 3 2 3 2 4
P(S) = 10 × 10 + 10 × 10 + 10 × 10 = 15

Substituting these values to Bayes’ formula


5⁄ ×3⁄ 5
18 10
P(G/S) = 4⁄ =
15 16

The probability that the third counter drawn is green, given the first two are the same colour as each
5
other is 16

9. On a given a petrol station serves three times as many men as women. Two types of petrol are
available, grade A and grade B. Customers pay by cheque or by cash. 70% of the men and 40% of the
women buy grade A petrol. Of the men buying grade A petrol, 80% pay by cheque, and of the men
buying grade B petrol, 60% pay by cheque. Of the women buying grade A petrol, half pay by cheque
and of the women buying grade B petrol, 40% pay by cheque. Find the probability that
(a) A customer buys grade A petrol.
(b) A customer pays by cheque.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


12
(c) A woman customer pays by cheque.
(d) A customer who pays by cheque for grade A petrol is a man.
Solution

Let x be the probability that the women customer access the service at the petrol station

Since the petrol serves men 3 times as many as women, the probability that men access service at this petrol
station will be 3x
1
Then, the probability always sums to 1 i.e x + 3x = 1 for which x =
4

3 1
Now the probability of men and women to access the service at this petrol station are 𝑎𝑛𝑑 respectively.
4 4

The given information can be summarized on tree diagram as follows

Let M and W be the corresponding events that ‘men and women access the service at the petrol station

A and B as given two grades petrol available at the station

C and C’ be the corresponding events for a customer to ‘pay by cash or cheque’

0.2 C
Customer A
0.8 C’
0.7

0.4 C
P(M)= 3⁄4
0.3 B
0.6 C’

C
0.5

A
0.4 0.5 C’
P(W)= 1⁄4

C
0.6
0.6
B
0.4 C’

Grade of petrol Paying method

(a) A customer buys grade A petrol


For not specified gender the customer can be man or woman
The probability that the customer buys grade A petrol = P(A/M)P(M) +P(A/W)P(W)
3 1 5
= 0.7 × 4 + 0.4 × 4 = 8
5
The probability that a customer buys grade A petrol is .
8

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


13
(b) A customer pays by cheque
Again the customer can be man or woman can pay for grade A or B by cheque
The probability that the customer pays by cheque
3 3 1 1
= 4 × 0.7 × 0.8 + 4 × 0.3 × 0.6 + 4 × 0.4 × 0.5 + 4 × 0.6 × 0.4
133
=
200
133
The probability that a customer pays by cheque is 200
.
(c) A woman customer pays by cheque
For specified gender only type of petrol and paying method matter
The probability that a woman customer pays by cheque = 0.4 × 0.5 + 0.6 × 0.4
11
= 25
11
The probability that a woman customer pays by cheque is 25 .
(d) A customer who pays by cheque for grade A is a man.
By using Bayes’ theorem
The probability that a customer who pays by cheque for grade A to be men
𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑡ℎ𝑎𝑡 𝑎 𝑚𝑎𝑛 𝑝𝑎𝑦𝑠 𝑏𝑦 𝑐ℎ𝑒𝑞𝑢𝑒 𝑓𝑜𝑟 𝑔𝑟𝑎𝑑𝑒 𝐴 𝑝𝑒𝑡𝑟𝑜𝑙
= 𝑝𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 𝑡ℎ𝑎𝑡 𝑎 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟 𝑝𝑎𝑦𝑠 𝑏𝑦 𝑐ℎ𝑒𝑎𝑢𝑒 𝑓𝑜𝑟 𝑔𝑟𝑎𝑑𝑒 𝐴 𝑝𝑒𝑡𝑟𝑜𝑙
3⁄ ×0.7×0.8
4
= 3⁄ ×0.7×0.8+1⁄ ×0.4×0.5
4 4
42
=
47
42
The probability that a customer pays by cheque for grade A petrol is 47
.
10. In an experiment two bags A and B, containing red and green marbles are used. Bag A contains 4 red
marbles and 1 green marble and bag B contains 2 red marbles and 7 green marbles. An unbiased coin is
tossed. If a head turns up, a marble is drawn at random from bag A while if a tail turns up, a marble is
drawn at random from bag B. Calculate the probability that a red marble is drawn in a single trial.
Given that a red marble is selected, calculate the probability that when a coin is tossed a head was
obtained.
Solution
1
Since head represent bag A and tail represent bag B their probability is 𝑒𝑎𝑐ℎ.
2
Let A and B be the event that ‘ a marble is drawn at random from bag A and B respectively’
R and G be the event that a red and green marble is drawn at random.

2⁄ R
Bag 9
A
7⁄
9 G
1⁄
2

R
4⁄
1⁄ 5
2

B
1⁄ G
5

Marble colour

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


14
(a) The probability that a red marble is drawn in a single trial

The red marble can be drawn from bag A or B

P(R) = P(R/A)P(A) + P(R/B)P(B)


2 1 4 1
=9×2+5×2

23
= 45

23
The probability that a red marble is drawn in a single trial = 45
.

(b) Given that a red marble is selected, the probability that when a coin is tossed and head is obtained
means the red marble is drawn from bag A
𝑃(𝑅 ⁄𝐴)×𝑃(𝐴)
From Bayes’ formula 𝑃(𝐴⁄𝑅) = 𝑃(𝑅)
4⁄ ×1⁄ 18
5 2
= 23⁄ = 25
45
23
The probability that head was obtained given that the red marble was selected is 45
11.
Age group Percentage
0-18 25
17-25 14
26-64 43
65 and over 18
In a town the percentage of males in particular age group are as shown in the table above. In a survey it
is found that the probability that a male aged 65 or over wearing glasses is 0.8. Similarly if a male is in
the age groups 0-16, 17-25, and 26-64 the probability of his wearing glasses are 0.2, 0.1, and 0.4
respectively. Given that a particular male is wearing glasses, use Bayes’ formula
𝑃(𝐴𝑘 )𝑃(𝐵/𝐴𝑘 )
P(Ak /B) = ∑𝑛 𝑃(𝐴𝑟 )𝑃(𝐵/𝐴𝑟 )
𝑟=1
to calculate the probability that is 65 or over . Similarly calculate the probabilities that he is in each
of the other age groups and hence state which age group is most likely to be in.
Solution
From the given Bayes’ formula Ak represent age group let k = 1, 2, 3 and 4 for corresponding age group
0-18, 17-25, 26-64 and 65 or over.
B represent the event that ‘a male wears glasses’
The outcomes are shown by an asterisk on the tree diagram below
Glasses
Age group
P(B/A1) = 0.2
*P(B/A1) P(A1) = 0.2×0.25

P(A1) = 0.25

P(B/A2) = 0.1 *P(B/A2) P(A2) = 0.1×0.14


P(A2) = 0.14

P(A3) = 0.43
P(B/A3) = 0.4 *P(B/A3) P(A3) = 0.4×0.43

P(A4) = 0.18
P(B/A4) = 0.8 *P(B/A4) P(A4) = 0.8×0.18

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


15
The probability that a male wearing glasses is 65 or over
𝑃(𝐴4 )𝑃(𝐵/𝐴4 )
P(A4 /B) = ∑4
𝑟=1 𝑃(𝐴𝑟 )𝑃(𝐵/𝐴𝑟 )
𝐵
Now ∑4𝑟=1 𝑃 (𝐴𝑟 )𝑃 ( ) = 0.25 × 0.2 + 0.14 × 0.1 + 0.43 × 0.4 + 0.18 × 0.8
𝐴𝑟
= 0.38
And 𝑃 (𝐴4 )𝑃(𝐵/𝐴4 ) = 0.18 × 0.8 = 0.144
0.144 36
P(A4 /B)= 0.38
= 95
= 0.379 (3 d.p)
Similarly ,
0.25×0.2 5
P(A1 /B)= 0.38
= 38
= 0.132 (3 d.p)
0.14×0.1 7
P(A2 /B)= 0.38
= 190
=0.037 (3 d.p)
0.43×0.4 43
P(A3 /B)= 0.38
= 95
= 0.453 (3 d.p)
Therefore, the male is most likely to be in 26-64 age group since it has high probability compared to
any other age group.
12. A factory has three machines X, Y and Z producing 1000, 2000 and 3000 belt per day respectively. The
machine X produce 1% defective belts, Y produces 1.5% and Z produces 2% defective belts. At the end
of a day, a belt is drawn at random and is found to to be defective. What is the probability that the
defective belt has been produced by machine X?
Solution
Number of total belts produced per day n(S) = 1000+2000+3000 =6000
Number of belts produced by machine X, Y and Z are 1000, 2000 and 3000 respectively
The probability of each machine to produce belts per day
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑒𝑙𝑡𝑠 𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑑 𝑏𝑦 𝑎 𝑝𝑎𝑟𝑡𝑖𝑐𝑢𝑙𝑎𝑟 𝑚𝑎𝑐ℎ𝑖𝑛𝑒 𝑝𝑒𝑟 𝑑𝑎𝑦
=
𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑏𝑒𝑙𝑡𝑠 𝑝𝑟𝑜𝑑𝑢𝑐𝑒𝑑 𝑝𝑒𝑟 𝑑𝑎𝑦
1000 1
Thus P(X) = 6000 = 6
2000 1
P(Y) = 6000 = 3
3000 1
And P(Z) = =
6000 2
Let D be the event that ‘defective belt is produced’ .
The outcomes are shown by an asterisk an tree diagram below.
Machine
P(D/X) = 0.01
*P(D/X)P(X) = 0.01×1⁄6

P(X) = 1⁄6

P(D/Y) = 0.015
*P(D/Y)P(Y) = 0.015×1⁄3
P(Y) = 1⁄3

P(Z) = 1⁄
2 P(D/Z) = 0.02 *P(D/Z)P(Z) = 0.02×1⁄2

Belts

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


16
The probability that machine X produced defective belt (it was first found defective belt) i.e P(X/D)

From Bayes’ formula


𝑃(𝐷⁄𝑋) × 𝑃(𝑋)
𝑃(𝑋⁄𝐷) =
𝑃 𝐷|𝑋 𝑃 𝑋 + 𝑃 (𝐷|𝑌)𝑃(𝑌) + 𝑃 (𝐷|𝑍)𝑃(𝑍)
( ) ( )

0.01×1⁄6
= 0.01×1⁄ +0.015×1⁄ +0.02×1⁄
6 3 2

1
=10

1
The probability that the defective belt has been produced by machine X is .
10

2 3 1
13. A and B are two events for which P(A) = , P(B’/A) = and P(B/A’) = .
5 4 3
(a) Draw a fully labeled tree diagram with A preceding B, that is with A and A’ on the first two
branches
(b) Calculate
(i) P(A∩B)
(ii)P(A’∩B)
(iii) P(A∪ 𝐵)
(c) Calculate
(i) P(A|B)
(ii) P(A’|B’)
(d) Use your answers to (c) to draw a fully labeled tree diagram with B preceding A.
Solution
(a) P(B|A) =
1
1 2
4 *P(B|A)P(A) = ×
4 5

2
P(A) = 3 3 2
5 P(B’|A) = *P(B’|A)P(A) = ×
4 4 5

1 1 3
P(B|A’) = *P(B|A’)P(A’) = ×
3 3 5
3
P(A’) =
5

2 3
2 *P(B’|A’)P(A’) = ×
P(B’|A’) = 3 5
3

(b)
(i) P(A∩B) = P(A) ×P(B)
From the tree diagram
2 1 1
P(A∩B) = 5 × 4 = 10
(ii) P(A’∩B) = P(A’) × P( B)
3 1 1
=5×3=5

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


17
(iii) P(A∪B)
From P(B’) = P(A∩B’) + P(A∪B)’
P(B’) = P(A)P(B’) + [1 - P(A∪B) ]
P(A∪B) = P(A)P(B) +1 – P(B’)
2 3 3 2 7
But P(B’) = 5 × 4 + 5 × 3 = 10
2 3 7
P(A∪B)= × + 1 −
5 4 10
3
P(A∪B)= 5
P(A∩B)
(c) (i) P(A|B) = 𝑃(𝐵)
P(A∩B)
= 1−𝑃(𝐵)′
1⁄
= 1−710

(from part (b)(i) and part (b)(iii) )
10
1
=3
P(A∪B)′
(ii) P(A’|B’) = 𝑃(𝐵′ )
1−P(A∪B)
= 𝑃(𝐵′ )
1−3⁄5
= 7⁄
10
4
= .
7
(d)
1
P(A |B) = 1 3
3 *P(A’|B)P(B) = ×
3 10

3
P(B) =
10
2 2 3
P(A’ |B) = *P(A’|B)P(B) = ×
3 3 10

3
P(A| B’) = 3 7
7
7 *P(A|B’)P(B’) = ×
P(B’) = 7 10
10
4 7
4
*P(A’|B’)P(B’) = ×
7 10
P(A’| B’) =
7

NOTE: To check the correctness of the probability distribution, the sum off all outcomes
must be 1
1 3 2 3 3 7 4 7
In above tree diagram, the sum of all outcomes = 3
×
10
+ ×
3 10
+ ×
7 10
+ ×
7 10

10
= =1
10

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


18
14. S
A

A’

(i) By considering the diagram which represent the sample space S, for A∪A’, where B is an abitrary
𝑃(𝐴)𝑃(𝐵|𝐴)
event of S such that P(B) ≠ 0, show that P(A|B) = 𝑃(𝐴)𝑃(𝐵 |𝐴)+𝑃(𝐴′ )𝑃(𝐵|𝐴′ )
(ii)The probabilities that a boy goes to school by bus, bicycle or on foot on a certain day are 0.2, 0.3 and
0.5 respectively. The probability of his being late by these methods are 0.6, 0.3 and 0.1 respectively.
If he was late on this particular day, using Bayes’ theorem or otherwise, calculate the probability that
he travelled by bus.
Solution
(i) From conditional probability
𝑃(𝐴 ⋂ 𝐵) 𝑃(𝐴∩𝐵)
P(𝐴⁄𝐵 ) = and P(𝐵⁄𝐴) =
𝑃(𝐵) 𝑃(𝐴)
For which 𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴 ∩ 𝐵) 𝑜𝑟 𝑃(𝐴⁄𝐵) × 𝑃(𝐵) = 𝑃(𝐵⁄𝐴) × 𝑃(𝐴)
Making P(A/B) subject of the formula

𝑃(𝐵⁄𝐴) × 𝑃(𝐴)
𝑃(𝐴⁄𝐵) =
𝑃 (𝐵)

From the given diagram of sample possibility P(B) = 𝑃(𝐴 ∩ 𝐵) + 𝑃(𝐴′ ∩ 𝐵)

By conditional probability 𝑃 (𝐴 ∩ 𝐵) = 𝑃(𝐵⁄𝐴) × 𝑃(𝐴) and 𝑃(𝐴′ ∩ 𝐵) = 𝑃(𝐵⁄𝐴′) × 𝑃(𝐴′)

substituting these values to equation

𝑃(𝐵⁄𝐴) × 𝑃(𝐴)
𝑃(𝐴⁄𝐵) =
𝑃 (𝐵)

Give the expression


𝑃(𝐴)𝑃(𝐵|𝐴)
P(A|B) =
𝑃(𝐴)𝑃(𝐵 |𝐴 )+𝑃(𝐴′ )𝑃(𝐵|𝐴′ )
Hence proved.

(ii) Let A, B and C be the event that ‘the boy goes to school by bus, bicycle or foot’
D be the event that ‘he is being late’
The outcomes are shown with an asterisk on tree diagram that follows.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


19
P(D|A)= 0.6 *P(D|A)P(A)= 0.6×0.2

P(A)= 0.2

P(D|B)= 0.3
P(B)= 0.3 *P(D|B)P(B)= 0.3×0.3

P(C)= 0.5
P(D|C)= 0.1 *P(D|C)P(C)= 0.1×0.5

Using Bayes’ theorem


The probability that the boy travelled by bus given that he was late on this particular day ,P(A|D)
𝑃(𝐷 |𝐴)𝑃(𝐴)
P(A|D) =
𝑃(𝐷 |𝐴)𝑃(𝐴)+𝑃(𝐷 |𝐵 )𝑃(𝐵)+𝑃(𝐷 |𝐶 )𝑃(𝐶)
0.6×0.2 6
P(A|D) = 0.6×0.2+0.3×0.3+0.1×0.5 = 13
6
The probability that the boy travelled by bus given that he was late is 13
15. If A1, A2 and A3 are mutually exclusive events whose union is sample space S of an experiment and B
𝑃(𝐴1 )𝑃(𝐵|𝐴1 )
is an arbitrary event of S such that P(B) ≠ 0, show that P(A1|B) = ∑3 and write down the
1 𝑃(𝐴𝑟)𝑃(𝐵|𝐴𝑟 )
results for P(A2|B) and P(A3|B).
A factory has three machines 1, 2 and 3, producing a particular type of item. One item is drawn at a
random from the factory’s production. Let B denote the event that the chosen item is defective and let
Ak denote the event that the item was produced on machine k where k = 1, 2 or 3. Suppose that
machine 1, 2 and 3 produce respectively 35%, 45% and 20% of total production of items and that
P(B|A1) = 0.02 P(B|A2) = 0.01 and P(B|A3). Given that an item chosen at random is defective, find
which machine was most likely to have produced it.
Solution
Consider the sample possibility below
From conditional probability , P(A1∩B) = P(B|A1)P(A1)
A1 A2 P(A2∩B) = P(B|A2)P(A2) and P(A3∩B) = P(B|A3)P(A3)
A1∩B

A2∩B From the diagram P(B) = P(A1∩B)+ P(A2∩B)+ P(A3∩B)


A3∩B
A3
P(B) = P(B|A1)P(A1)+ P(B|A2)P(A2)+ P(B|A3)P(A3) = ∑31 𝑃(𝐴𝑟 )𝑃(𝐵|𝐴𝑟 )

Using the concept of conditional probability P(A1∩B) = P(B|A1)P(A1) = P(A1|B)P(B)

𝑃(𝐴1 )𝑃(𝐵|𝐴1)
Making P(A1|B) subject of the formula give the expression P(A1|B) = but P(B)= ∑31 𝑃 (𝐴𝑟 )𝑃(𝐵|𝐴𝑟 )
𝑃(𝐵)

𝑃(𝐴 )𝑃(𝐵|𝐴1 )
Therefore, P(A1|B) = ∑3 𝑃(𝐴1 hence shown.
1 𝑟 )𝑃(𝐵|𝐴𝑟 )

𝑃(𝐴 )𝑃(𝐵|𝐴2 ) 𝑃(𝐴 )𝑃(𝐵|𝐴3 )


Similarly P(A2|B) = ∑3 𝑃(𝐴2 and P(A3|B) = ∑3 𝑃(𝐴3
1 𝑟 )𝑃(𝐵|𝐴𝑟) 1 𝑟 )𝑃(𝐵|𝐴𝑟 )

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


20
P(B|A1)= 0.02 *P(B|A1)P(A1)= 0.02×0.35

P(A1)= 0.35

P(B|A2)= 0.01
P(A2)= 0.45 *P(B|A2)P(A2)= 0.01×0.45

P(A3)= 0.2
P(B|A3)= 0.03 *P(B|A3)P(A3)= 0.03×0.2

From Bayes’ theorem


𝑃(𝐴1 )𝑃(𝐵|𝐴1)
P(A1|B) = ∑3
1 𝑃(𝐴𝑟)𝑃(𝐵|𝐴𝑟)

But ∑31 𝑃 (𝐴𝑟 )𝑃(𝐵|𝐴𝑟 ) = P(B|A1)P(A1) + P(B|A2)P(A2) + P(B|A3)P(A3)

= 0.02×0.35 + 0.01×0.45 + 0.03×0.2


7
=
400

1 𝑃(𝐴 )𝑃(𝐵|𝐴1)
P(A1|B) = ∑3 𝑃(𝐴
1 𝑟)𝑃(𝐵|𝐴𝑟)

0.02×0.35 2
= 7⁄ =5
400

= 0.4

2 𝑃(𝐴 )𝑃(𝐵|𝐴2)
P(A2|B) = ∑3 𝑃(𝐴
1 𝑟)𝑃(𝐵|𝐴𝑟 )

0.01×0.45 9
= 7⁄ = 35
400

= 0.257 (3 d.p)

3 𝑃(𝐴 )𝑃(𝐵|𝐴3)
P(A3|B) = ∑3 𝑃(𝐴
1 𝑟)𝑃(𝐵|𝐴𝑟 )

0.03×0.2 12
= 7⁄ =
400 35

= 0.343 (3 d.p )

Machine 1 is most likely to have produced it.

PREPARED BY YUSSUF HAMOUD & ALLY OMAR


21

You might also like