[Math] Bayes Theorem and LOTP problem with repetition – Chapter 2 Question 12 of Introduction to Probability Blitzstein

bayes-theorem

I feel confident I have answered part a of this question correctly but not sure if I have answered part b correctly. I've included my solution to part a in case I made a mistake. Do you think I have answered part b correctly?

Alice is trying to communicate with Bob, by sending a message (encoded in binary) across a channel.

(a) Suppose for this part that she sends only one bit (a 0 or 1), with equal probabilities. If she sends a 0, there is a 5% chance of an error occurring, resulting in Bob receiving a 1; if she sends a 1, there is a 10% chance of an error occurring, resulting in Bob receiving a 0. Given that Bob receives a 1, what is the probability that Alice actually sent a 1?

(b) To reduce the chance of miscommunication, Alice and Bob decide to use a repetition code. Again Alice wants to convey a 0 or a 1, but this time she repeats it two more times, so that she sends 000 to convey 0 and 111 to convey 1. Bob will decode the message by going with what the majority of the bits were. Assume that the error probabilities are as in (a), with error events for different bits independent of each other. Given that Bob receives 110, what is the probability that Alice intended to convey a 1?

Solution:

PART (a)

Let

A = Event Alice sent a 1
B = Event Bob receives a 1

Given

$P(A)=0.5$
$P(A^C)=0.5$

$P(B\vert A)=0.90$
$P(B\vert A^C)=0.05$

Find

$P(A\vert B) =\space ?$

Use Bayes Theorem

$P(A\vert B) = \dfrac{P(A,B)}{P(B)} = \dfrac{P(B\vert A)P(A)}{P(B)}$

Using LOTP to find $P(B)$

$P(B) = P(B\vert A)P(A) + P(B\vert A^C)P(A^C)$

Therefore

$P(A\vert B) = \dfrac{P(B\vert A)P(A)}{P(B\vert A)P(A) + P(B\vert A^C)P(A^C)}$

$P(A\vert B) = \dfrac{0.90 * 0.5}{0.90 * 0.5 + 0.05 * 0.5} = \dfrac{18}{19} \approx 0.9473$

PART (b)

Let

A = Event Alice sent 111
B = Event Bob receives 110

Given

$P(A)=0.5$
$P(A^C)=0.5$

This portion of the problem I'm not confident I did it correctly.
All bits are sent independently
$P(B\vert A)= P(Bob\space receiving\space 110\space given\space she\space sent\space 111) = 0.90 * 0.90 * 0.10 = 0.081$
$P(B\vert A^C)= P(Bob\space receiving\space 110\space given\space she\space sent\space 000) = 0.05 * 0.05 * 0.95 = 0.0002375$

Find

$P(A\vert B) =\space ?$

Use Bayes Theorem

$P(A\vert B) = \dfrac{P(A,B)}{P(B)} = \dfrac{P(B\vert A)P(A)}{P(B)}$

Using LOTP to find $P(B)$

$P(B) = P(B\vert A)P(A) + P(B\vert A^C)P(A^C)$

Therefore

$P(A\vert B) = \dfrac{P(B\vert A)P(A)}{P(B\vert A)P(A) + P(B\vert A^C)P(A^C)}$

$P(A\vert B) = \dfrac{0.081 * 0.5}{0.081 * 0.5 + 0.0002375 * 0.5} \approx 0.9715$

The confidence goes up for Bob receiving 1 from Alice, 0.9473 < 0.9715 so I feel like it might be close but still feel like I might have made a mistake determining $P(B\vert A)$ and $P(B\vert A^C)$ on part (b).

Best Answer

I arrived at the same answer as you for part B. However I believe that you forgot to include the 0.1 probability of the received zero in the middle of your last line.

$$ P(A|B) = \frac{0.1 \cdot 0.9^2 \cdot 0.5}{(0.1 \cdot 0.9^2 \cdot 0.5)+(0.95 \cdot 0.05^2 \cdot 0.5)} \approx 0.9715 $$

Related Question