Summarized Notes GST 05222 6.0 Bayes' Theorem

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

6.

0 BAYES’ THEOREM

6.1 The Rule (Law) of Total Probability

6.1.1 Considering any two events A and B; we can generalize that:


P(A) = P(A∩B) + P(A∩B’) -------------------------(1)
(1) is the simple Rule (Law) of Total Probability; it can be easily verified through
the venn diagrams
6.1.2 The general Rule (Law) of Total Probability
6.1.2.1 Two or more events are said to be collectively exhaustive iff the sum of their
probabilities equals 1.
6.1.2.2 A partition of the sample space is the division of the sample space into a set of
events that are mutually exclusive AND collectively exhaustive. In the case given
in (1); the events B and B’ do form a partition.
6.1.2.3 The simple rule of total probability (1) may be extended to more complex
situations, where the sample S is partitioned into more than two events. Say, we
partition S into n events B1, B2,……. Bn. Hence generally, the Rule (Law) of Total
Probability is given by:
P(A) = ∑ P(A∩Bi); i= 1, 2,………,n -------------------------(2)

But for each event, Bi; P(A∩Bi) = P(Bi) * P(A|Bi)

Hence P(A) = ∑ P(Bi) * P(A|Bi); i= 1, 2,………,n -------------------------(3)

Taking a case of one of the events B1, B2,……. Bn; say Br, and taking the
multiplication rule P(A∩Br) = P(Br) * P(A|Br) -------------(4)
 P(Br|A) = P(A∩ Br)/P(A) ----------------------------------(5)

Substituting (3), (4) in (5)


 P(Br|A) = P(Br) * P(A|Br) /∑ P(Bi) * P(A|Bi); i= 1, 2,………,n -------------------(4)
(4) is called the Baye’s theorem.

Note that:
(a) The numerator of (4) is the probability of reaching A via the rth path among
the n mutually exclusive and collectively exhaustive paths. The denominator
is the probability for the event A to occur (found by the sum of probabilities
of reaching A via ALL possible paths).
1
(b) The probabilities P(Bi) are called prior probabilities of the events B and in
practice it is difficult to determine these probabilities.
(c) The probability P(Br|A) is called the posterior probability of the event Br.
(d) Usually in such cases; one may have some approximation of the prior
probability P(Br), but when additional/new information comes into
knowledge; the prior probability is revised to the posterior probability
P(Br|A)

Example 6.1.2.3.1: During the beginning of the COVID-19 pandemic, a test that
was administered to an infected person for checking the COVID-19 infection,
would give a positive result with 0.92 probability. When the test was administered
to a person who was not infected, the test was giving a positive result with 0.04
probability. By then, the COVID-19 was known to have affected only 0.1% of the
entire population. If a randomly selected person gives a positive test, what is the
probability that the person is indeed infected?

▪ Let I be the event that a given person is infected by COVID-19 and P be the
event that a person gives a positive result when he/she is been tested.
▪ Given that P(P|I) = 0.92, P(P|I’) = 0.04 and P(I) = 0.001. Strongly
recommended to use a tree diagram to demonstrate the given information.
▪ Required to determine P(I|P)
▪ From the Bayes’ theorem,
P(I|P) = P(I∩P)/P(P) = P(I) * P(P|I)/P(P)
= P(I) * P(P|I)/{P(I) * P(P|I) + P(I’) * P(P|I’)}
= 0.001 * 0.92/{(0.001 * 0.92) + (0.999 * 0.04)}
= 0.0225

Example 6.1.2.3.2: Four technicians make repairs when breakdowns occur on an


automated production line. Juma who services 20% of the breakdowns, makes an
incomplete repair 1 time in 20; Thomas who services 60% of the breakdowns,
makes an incomplete repair 1 time in 10; George who services 15% of the
breakdowns, makes an incomplete repair 1 time in 10 and Peter who services 5%
of the breakdowns, makes an incomplete repair 1 time in 20. If the problem is
diagnosed as being due to an incomplete repair, what is the probability that the
repair was made by Juma?
▪ Let J, T, G and P be the events that the repair was made by Juma, Thomas,
George and Peter, respectively.
▪ Let C be the event that the repair that was made was complete.
▪ Given that P(J) = 0.2, P(T) = 0.6, P(G) = 0.15 and P(T) = 0.05

2
▪ Note that J, T, G and P are mutually exclusive and collectively exhaustive
events, which implies that they are partitioning the given sample space.
Strongly recommended to use a tree diagram to demonstrate the given
information.
▪ Further, given that P(C’|J) = 0.05, P(C’|T) = 0.1, P(C’|G) = 0.1 and P(C’|P)
= 0.05
▪ Required to determine P(J|C’)
▪ From the Bayes’ theorem,
P(J|C’) = P(J∩C’)/P(C’) = P(J) * P(C’|J) /P(C’)
= P(J) * P(C’|J) /{P(J) * P(C’|J) + P(T) * P(C’|T) + P(G) * P(C’|G) + P(P) *
P(C’|P)}
= 0.2 * 0.05/{(0.2 * 0.05) + (0.6 * 0.1) + (0.15 * 0.1) + (0.05 * 0.05)}
= 0.114

You might also like