Skip to main content



Coins

In the study of probability, so many questions come up with the background of ‘tossing coins.’ These problems always take ‘fair coins’, which means the coin has head and tail, into account. When tossing the coin, there might be two outcomes with the sample space  S = {H, T}. Pr(Head) = Pr(Tail) = 1/2

When doing the homework for CS2800, there is an interesting question about tossing a fair coin:

  • ‘ To determine which of two people gets a prize, a coin is flipped twice. If the flips are a Head and then a Tail, the first player wins. If the flips are a Tail and then a Head, the second player wins. However, if both coins land the same way, the flips don’t count and the whole process starts over. Assume that on each flip, a Head comes up with probability p, regardless of what happened on other flips. Find the probabilities that the first player wins, and that nobody wins.’

By drawing a tree diagram, we can tell that the probability for the first player to win: Pr(First wins) = 1/2. And the probability that no one wins: Pr(no one wins) = 0.

Besides questions related to fair coins, there are also problems with ‘unfair coin’, which is the coin with head-head. Recently I read an interesting question online with both fair coins and unfair coin.

  • ‘You randomly draw a coin from 100 coins – 1 unfair coin (head to head), 99 fair coins (head to tail) and roll it 10 times. If the result is 10 heads, what is the probability that the coin is UNFAIR.’

Although this is said to be the interview question for the AI department of a famous company, we can approach it with what we learned in class: ‘Bayes Rule’.

When we draw a random coin from the 100 coins, Pr(Unfair) = 1/100; Pr(fair)  = 99/100. Let us suppose ‘A’ be the situation that ‘tossing 10 times and getting 10 Heads’. For fair coins: Pr(A|Fair) = 1/(2^10) = 1/1024. For unfair coins: Pr(A|Unfair) = 1.

Now, by Bayes Rule, Pr(Unfair|A) = (Pr(A|Unfair)*Pr(Unfair)) / (Pr(A)) = (Pr(A|Unfair)*Pr(Unfair)) / (Pr(A|Fair) + Pr(A|Fair)) = (1/100)/(1/100+99/100*1/1024) = 1024/102500

Comments

Leave a Reply

Blogging Calendar

November 2018
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  

Archives