You the captain of a ship want to communicate a number betwe
You, the captain of a ship, want to communicate a number between 1 and 5 to a friend in a neighboring ship using Morse code and a flashlight. As far as your friend in the neighboring ship, is concerned, you are going to choose a random number between 1 and 5 to communicate. You are not very good with Morse code so when you try to send a 1 there is a 10% chance your friend sees a 2. When you send a 2 there is a 10% chance he sees a 1 and a 5% chance he sees a 3. Every time you send a 3 he sees a 3 perfectly. When you send a 4 there Is a 30% chance he gets a 2 and when you send a 5 there is a 20% chance he gets a 3. Let X be the number you communicate and let Y be the number he receives, (i) What estimate should your friend do of X, the number you send, using Y, the number he receives, so that his estimate minimizes the expected squared error? (ii) What estimate should your friend do to minimize the probability of error?
Solution
P(Y=1 | X=1) = 9/10
P(Y=1 | X= 2) = 1/10
P(Y=2 | X=1) = 1/10
P(Y=2 | X= 2) = 85/100
P(Y=3 | X=2 ) = 5/100
P(Y=3 | X= 3) = 1
P(Y=4 | X=4) = 7/10
P(Y=2 | X= 4) = 3/10
P(Y=5 | X=5) = 8/10
P(Y=3 | X= 5) = 2/10
Theorem of total prob and baye\'s
P(X=1 | Y=1) = 0.9/(0.9 + 0.1) = 0.9
P(X=2 | Y=2) = 0.85/(0.1 + 0.85 + 0.3) = 0.68
P(X=3 | Y=3) = 1/(0.2 + 0.05 + 1) = 0.8
P(X=4 | Y=4) = 0.7/(0.7) = 1
P(X=5 | Y=5) = 0.8/(0.8) = 1
