0% found this document useful (0 votes)
19 views8 pages

PS1 Solutions Fall2023

The document presents various examples of problem-solving using Bayes' Rule and Total Probability in the context of probability theory. It includes scenarios such as determining the likelihood of a football fan's origin, the probability of selecting a specific number, and the reliability of a relay network. Each example is accompanied by detailed calculations and explanations to illustrate the application of the concepts.

Uploaded by

shali23
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)
19 views8 pages

PS1 Solutions Fall2023

The document presents various examples of problem-solving using Bayes' Rule and Total Probability in the context of probability theory. It includes scenarios such as determining the likelihood of a football fan's origin, the probability of selecting a specific number, and the reliability of a relay network. Each example is accompanied by detailed calculations and explanations to illustrate the application of the concepts.

Uploaded by

shali23
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/ 8

ELEC 402/501

PROBLEM SOLVING SESSION I

Example 1 (Bayes’ Rule):


While watching a game of Champions League football in a cafe, you observe someone who is
clearly supporting Manchester United in the game.
What is the probability that they were actually born within 25 miles of Manchester ? Assume
that:
• the probability that a randomly selected person in a typical local bar environment is born
within 25 miles of Manchester is 1/20, and;
• the chance that a person born within 25 miles of Manchester actually supports United is 7/10;
• the probability that a person not born within 25 miles of Manchester supports United is
probability 1/10.

Solution:
Define
• 𝐵 – event that the person is born within 25 miles of Manchester
• 𝑈 – event that the person supports United.
We want 𝑃(𝐵|𝑈). By Bayes’ Theorem,
7 1
𝑃(𝑈|𝐵)𝑃(𝐵) 𝑃(𝑈|𝐵)𝑃(𝐵) 10 20
𝑃(𝐵|𝑈) = = =
𝑃(𝑈) ̅ ̅
𝑃(𝑈|𝐵)𝑃(𝐵) + 𝑃(𝑈|𝐵)𝑃(𝐵 ) 7 1 1 19
+
10 20 10 20
7
= ≈ 0.269.
26

1
ELEC 402/501

Example 2 (Total Probability):


Two numbers are chosen at random from among the numbers 1 to 10 without replacement. Find
the probability that the second number chosen is 5
Solution:
Let 𝐹𝑖 , 𝑖 = 1,2, … ,10 denote the event that the first number chosen is 𝑖. Let S be the event that
the second number chosen is 5.
10

𝑃(𝑆) = ∑ 𝑃(𝑆|𝐹𝑖 ) 𝑃(𝐹𝑖 )


𝑖=1

Now 𝑃(𝐹𝑖 ) = 1/10.


𝑃(𝑆|𝐹𝑖 ) is the probability that the second number chosen is 5, given that the first is 𝑖.
If 𝑖 = 5, then 𝑃(𝑆|𝐹𝑖 ) = 0.
If 𝑖 ≠ 5, then 𝑃(𝑆|𝐹𝑖 ) = 1/9.
Hence,
10
1 1 1
𝑃(𝑆) = ∑ 𝑃(𝑆|𝐹𝑖 ) 𝑃(𝐹𝑖 ) = 9 ( ) ( ) =
9 10 10
𝑖=1

2
ELEC 402/501

Example 3 (Total Probability and Bayes’ Rule):


A company producing electric relays has three manufacturing plants producing 50, 30, and 20
percent, respectively, of its product. Suppose that the probabilities that a relay manufactured by
these plants is defective are 0.02, 0.05, and 0.01, respectively.
a) If a relay is selected at random from the output of the company, what is the probability
that it is defective?
b) If a relay selected at random is found to be detective, what is the probability that it was
manufactured by plant 2?

Solution:
a) Let 𝐷 be the event that the relay is defective, and let 𝑃𝑖 be the event that the relay is
manufactured by plant 𝑖 (𝑖 = 1,2,3). The desired probability is 𝑃(𝐷);

𝑃(𝐷) = ∑ 𝑃(𝐷|𝑃𝑖 ) 𝑃(𝑃𝑖 )


𝑖=1

= (0.02)(0.5) + (0.05)(0.3) + (0.01)(0.2) = 0.027

b) The desired probability is 𝑃(𝑃2 |𝐷);

𝑃(𝐷|𝑃2 )𝑃(𝑃2 ) (0.05)(0.3)


𝑃(𝑃2 |𝐷) = = = 0.556
𝑃(𝐷) 0.027

3
ELEC 402/501

Example 4 (Bayes’ Rule):


It is estimated that 50% of emails are spam emails. Some software has been applied to filter
these spam emails before they reach your inbox. A certain brand of software claims that it can
detect 99% of spam emails, and the probability for a false positive (a non-spam email detected
as spam) is 5%.
Now if an email is detected as spam, then what is the probability that it is in fact a non-spam
email?

Solution:
Define events
𝐷 = event that an email is detected as spam,
𝑆 = event that an email is spam,
𝑆̅ = event that an email is not spam.
We know 𝑃(𝑆) = 𝑃(𝑆̅) = 0.5, 𝑃(𝐷|𝑆) = 0.99, 𝑃(𝐷|𝑆̅) = 0.05.
Hence by the Bayes’ formula we have
𝑃(𝐷|𝑆̅)𝑃(𝑆̅)
𝑃(𝑆̅|𝐷) =
𝑃(𝐷|𝑆)𝑃(𝑆) + 𝑃(𝐷|𝑆̅)𝑃(𝑆)
0.05 × 0.5
= = 5/104.
0.99 × 0.5 + 0.05 × 0.5

4
ELEC 402/501

Example 5 (Total Probability and Bayes’ Rule):


Information is transmitted digitally as a binary sequence known as “bits”. However, noise on
the channel corrupts the signal, in that a digit transmitted as 0 is received as 1 with probability
1 − 𝛼, with a similar random corruption when the digit 1 is transmitted. It has been observed
that, across a large number of transmitted signals, the 0s and 1s are transmitted in the ratio 3: 4.
Given the sequence 101 is received, what is the probability of correct reception? Assume that
the transmission and reception processes are independent.
Solution:
Define:
• Sample space ψ to consist of all possible binary sequences of length three that is:

{000,001,010,011,100,101,110,111}
• A corresponding set of
signal events {𝑆0 , 𝑆1 , 𝑆2 , 𝑆3 , 𝑆4 , 𝑆5 , 𝑆6 , 𝑆7 } and
reception events {𝑅0 , 𝑅1 , 𝑅2 , 𝑅3 , 𝑅4 , 𝑅5 , 𝑅6 , 𝑅7 }.

We need to find
𝑃(𝑅5 |𝑆5 )𝑃(𝑆5 )
𝑃(𝑆5 |𝑅5 ) =
𝑃(𝑅5 )
Let’s calculate,
7

𝑃(𝑅5 ) = ∑ 𝑃(𝑅5 |𝑆𝑖 ) 𝑃(𝑆𝑖 ).


𝑖=0

Consider 𝑃(𝑅5 |𝑆0); if 000 is transmitted, the probability that 101 is received is
(1 − 𝛼) × 𝛼 × (1 − 𝛼) = 𝛼(1 − 𝛼)2 (corruption, no corruption, corruption). By complete
evaluation we have:
𝑃(𝑅5 |𝑆0) = 𝛼(1 − 𝛼)2 , 𝑃(𝑅5 |𝑆1) = 𝛼 2 (1 − 𝛼),
𝑃(𝑅5 |𝑆2 ) = (1 − 𝛼)3 , 𝑃(𝑅5 |𝑆3 ) = 𝛼(1 − 𝛼)2 ,
𝑃(𝑅5 |𝑆4) = 𝛼 2 (1 − 𝛼), 𝑃(𝑅5 |𝑆5 ) = 𝛼 3 ,
𝑃(𝑅5 |𝑆6 ) = 𝛼(1 − 𝛼)2 , 𝑃(𝑅5 |𝑆7) = 𝛼 2 (1 − 𝛼).
Now, the prior informantion about digits transmitted is that the probability of transmitting a 1
is 4/7, so

3 3 4 3 2
𝑃(𝑆0 ) = ( ) , 𝑃(𝑆1 ) = ( ) ( )
7 7 7

5
ELEC 402/501

4 3 2 3 4 2
) )
𝑃(𝑆2 = ( ) ( ) , 𝑃(𝑆3 = ( ) ( )
7 7 7 7
4 3 2 3 4 2
𝑃(𝑆4 ) = ( ) ( ) , 𝑃(𝑆5 ) = ( ) ( )
7 7 7 7
3 4 2 4 7
𝑃(𝑆6 ) = ( ) ( ) , 𝑃(𝑆7 ) = ( )
7 7 7
and hence 𝑃(𝑅5 ) can be computed as

𝑃(𝑅5 ) = ∑ 𝑃(𝑅5 |𝑆𝑖 ) 𝑃(𝑆𝑖 )


𝑖=0
33 3∙3∙4 3∙3∙4
= 𝛼(1 − 𝛼) 3 + 𝛼 2 (1 − 𝛼)
2
+ (1 − 𝛼) 3
⏟ 7 ⏟ 73 ⏟ 73
000 001 010
3∙4∙4 4∙3∙3 4∙4∙3
+ 𝛼(1 − 𝛼)2 + 𝛼 2 (1
− 𝛼) + (1 − 𝛼) 3
⏟ 73 ⏟ 73 ⏟ 73
011 100 101
3∙4∙4 43
+ 𝛼(1 − 𝛼)2 + 𝛼 2 (1
− 𝛼)
⏟ 73 ⏟ 73
110 111

48𝛼 3 + 136𝛼 2 (1 − 𝛼) + 123𝛼(1 − 𝛼)2 + 36(1 − 𝛼)3


𝑃(𝑅5 ) =
343
Finally, using Bayes’ Theorem, the probability of correct reception is:
𝑃(𝑅5 |𝑆5 )𝑃(𝑆5 ) 48𝛼 3
𝑃(𝑆5 |𝑅5 ) = =
𝑃(𝑅5 ) 48𝛼 3 + 136𝛼 2 (1 − 𝛼) + 123𝛼(1 − 𝛼)2 + 36(1 − 𝛼)3
For 𝛼 = 0.99;
𝑃(𝑆5 |𝑅5 ) = 0.9719

6
ELEC 402/501

Example 6 (System Reliability):


The relay network in Fig. 1 operates if and only if there is a closed path of relays from left to
right. Assume that relays fail independently and that the probability of failure of each relay is
as shown. What is the probability that the relay network operates?

Figure 1

Solution 1:

Fail probability for the system: 𝑃(𝐹 ∪ 𝐸) = 𝑃(𝐹) + 𝑃(𝐸) − 𝑃(𝐹 ∩ 𝐸)


𝑃(𝐹 ∩ 𝐸) = 𝑃(𝐹)𝑃(𝐸)

Fail probability for 𝐹: 𝑃(𝐹) = 𝑃(𝐴 ∩ (𝐵 ∪ 𝐶) ∩ 𝐷) = 𝑃(𝐴)𝑃(𝐵 ∪ 𝐶)𝑃(𝐷)


𝑃(𝐵 ∪ 𝐶) = 𝑃(𝐵) + 𝑃(𝐶) − 𝑃(𝐵 ∩ 𝐶) = 0.4 + 0.4 − 0.4 × 0.4 = 0.8 − 0.16 = 0.64
𝑃(𝐹) = 0.2 × 0.64 × 0.3 = 0.0384

𝑃(𝐹 ∪ 𝐸) = 0.0384 + 0.1 − 0.0384 × 0.1 = 0.13456


Success: 𝑃((𝐹 ∪ 𝐸)∁ ) = 1 − 0.13456 = 0.8654

7
ELEC 402/501

Solution 2 (Success Probabilities – Long Way):

Here, we define 𝐴, 𝐵, 𝐶, 𝐷, 𝐸, 𝐹, 𝐺 as success probabilities


Success Probability: 𝑃(𝐹 ∩ 𝐸)
𝑃(𝐹) = 𝑃(𝐴 ∪ (𝐵 ∩ 𝐶) ∪ 𝐷) = 𝑃(𝐴 ∪ 𝐺 ∪ 𝐷)
𝑃(𝐵 ∩ 𝐶) = 𝑃(𝐵)𝑃(𝐶) = 0.36 = 𝑃(𝐺)
= 𝑃(𝐴) + 𝑃(𝐺) + 𝑃(𝐷) − 𝑃(𝐴)𝑃(𝐺) − 𝑃(𝐴)𝑃(𝐷) − 𝑃(𝐺)𝑃(𝐷) + 𝑃(𝐴)𝑃(𝐺)𝑃(𝐷)
= 0.8 + 0.36 + 0.7 − 0.8 × 0.36 − 0.8 × 0.7 − 0.36 × 0.7 + 0.8 × 0.36 × 0.7 = 0.9616
𝑃(𝐹 ∩ 𝐸) = 0.9616 × 0.9 = 0.8654

You might also like