PS1 Solutions Fall2023
PS1 Solutions Fall2023
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
2
ELEC 402/501
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 𝑃(𝐷);
3
ELEC 402/501
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
{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
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
6
ELEC 402/501
Figure 1
Solution 1:
7
ELEC 402/501