Probability Lecture 5
Probability Lecture 5
Variables
Dr. Sadiq Ali
Motivation
A = A ∩ B1 ∪ A ∩ B2 ∪ A ∩ B3
Set A in a Partitioned Sample Space
A = A ∩ B1 ∪ A ∩ B2 ∪ A ∩ B3
• Note that the three sets A∩B1, A∩B2, and A∩B3 are
mutually exclusive (i.e. disjoint). Then, according to
Axiom 4,
P A = P A ∩ B1 + P A ∩ B2 + P A ∩ B3
Theorem on Total Probability
• P A = P A ∩ B1 + P A ∩ B2 + P A ∩ B3
B3 … Bn-1
B1
A
B2
Bn
…
Theorem on Total Probability
• If our sample space is partitioned into mutually exclusive and
exhaustive sets A1, A2, … , An, the probability of event B is
given by:
A3 … An-1
A1
B
A2
An
…
Theorem on Total Probability
• Conditional probabilities often confuse students, so it's
best to focus on the previously explained intersection
concept.
• P B = P B ∩ A1 + P B ∩ A2 + ⋯ + P B ∩ An
• P[A∩B] = Probability that Pakistan wins the toss and wins the
match.
• P[AC∩B] = Probability that Pakistan looses the toss and wins
the match.
P[B] = (0.5×0.4) + (0.5×0.23) = 0.315
Example – Alternate Method
• A – Pakistan winning the toss
• B – Pakistan winning the match
Example – Alternate Method
• A – Pakistan winning the toss
• B – Pakistan winning the match
Example – Alternate Method
• P B = P B P A1 + P B P A2 + ⋯ + P B P An
Total Probability and Bayes’ Rule
• Using the law of total probability and applying it to
the definition of the conditional probability, yields
P Ai ∩ B P Ai ∩ B
P A i |B = = n
P B σi=1 P Ai ∩ B
P Ai P(B|Ai )
= n
σi=1 P(B|Ai )P Ai
22
Example 1: Binary (Symmetric) Channel
• Many communication systems can be modeled in the
following way.
• For i = 0,1, let Ai be the event “input was i,” and let
Bi be the event “receiver decision was i.”
Input Output
1
0
1
0
0
Example 1: Binary (Symmetric) Channel
Input Output
1
1−𝜀
1 𝜀
𝑝 0
1−𝑝
1
0 𝜀
1−𝜀
0
Example 1: Binary (Symmetric) Channel
Input Output
P A1 ∩ B1 = p 1 − ε
1
1−𝜀
1 𝜀
𝑝 0
P A1 ∩ B0 = pε
1−𝑝 P A0 ∩ B1 = 1 − p ε
1
0 𝜀
1−𝜀
0
P A 0 ∩ B0 = 1 − p 1 − ε
Example 2 : Binary (Symmetric) Channel
• Given the binary symmetric channel depicted in
figure and given that P A0 = 0.4, P A1 = 0.6.
find P A𝑖 |Bj ; i, j = 0,1.
P B0 |A0 = 2/3
0 0
P B1 |A0 = 1/3
Input Output
P B0 |A1 = 1/4
1 1
P B1 |A1 = 3/4
28
Example : Binary (Symmetric) Channel
• Using Bayes Rule:
P A i ∩ Bj P A i ∩ Bj
P Ai ቚBj = =
P Bj σ1i=0 P Ai ∩ Bj
P Ai P(Bj หAi )
=
σ1i=0 P(Bj หAi )P Ai
P Aj P(Bi |Aj )
=
P Bj หA0 P A0 + P(Bj หA1 )P A1
29
Example : Binary (Symmetric) Channel
P A0 P(B0 |A0 )
P A0 หB0 =
P B0 |A0 P A0 + P(B0 |A1 )P A1
P A1 P(B0 |A1 )
P A1 หB0 =
P B0 |A0 P A0 + P(B0 |A1 )P A1
P A0 P(B1 |A0 )
P A0 หB1 =
P B1 |A0 P A0 + P(B1 |A1 )P A1
P A1 P(B1 |A1 )
P A1 หB1 =
P B1 |A0 P A0 + P(B1 |A1 )P A1
30
Example : Binary (Symmetric) Channel
0.4 (2/3)
P A0 หB0 = = 0.64
2/3 0.4 + (1/4) 0.6
0.6 (1/4)
P A1 หB0 = = 0.36
2/3 0.4 + (1/4) 0.6
0.4 (1/3)
P A0 หB1 = = 0.23
1/3 0.4 + (3/4) 0.6
0.6 (3/4)
P A1 หB1 = = 0.77
1/3 0.4 + (3/4) 0.6
31
Home Practice: Example 1
• Ahmed tosses a biased coin three times with probability
of heads 1/3.
• Find the probability that he gets one head in the
three tosses.
Solution: Using Total Probability
• A – Heads in the first coin toss
• We have to find,
P A ∩ B C ∩ C c + P AC ∩ B ∩ C C + P AC ∩ B C ∩ C