In: Math
[Counting and Probability] Consider the experiment of flipping a coin four times.
a. Using a tree, determine the probability of one or two tails, with a biased coin with P(H) = 2/3. Compare to the probability with an unbiased coin
b. [Bayes’ Rule] Using the results of the part a suppose we have
two coins, one unbiased, and a biased coin with P(H) = 2/3. We
select a coin at random, flip it three times, and observe either
one or two tails. What is the probability we started with the
biased coin?
[Hint: use a two-level tree, with the second level using the
probabilities from a.]
A)
First create tree for four tosses as given below
So
Outcomes for both coin be like
{HHHH,HHHT,HHTH,HTHH,THHH,HHTT,HTHT,HTTH,THTH,TTHH,THHT,THHH,TTHT,THTT,HTTT,TTTT}
Now for biased coin
There are 6 outcomes with 2tails while 4 outcomes with 1 tail
As each toss is independent hence probability of getting 2 heads and two tails is (1/3)(2/3)(1/3)(2/3)=4/81
Since there are total 6 cases with 2 head and 2 tail so
If X is no.of tails then
P(X=2)=6*(4/81)=24/81
Similarly for 1 tail probability is (2/3)*(2/3)*(2/3)*(1/3)=8/81
Since there are 4 cases with one Tail hence
P(X=1)=4*8/81=32/81
We have to find P(X =1 or X=2)
Now
P(X=1 or X=2)=P(X=1)+P(X=2)-P(X=1 and X=2)
=(24/81)+(32/81)=56/81
P(X=1 and X=2)=0 since it's not possible to get two tails if we have 1 tail
Similarly for unbiased coin here in each case probability is (1/2)*(1/2)*(1/2)*(1/2)=1/16
So there are 6 cases with 2 tails hence
P(X=2)=6*(1/16)=6/16
While 4 cases of two tails hence P(X=1)=4*(6/16)=4/16
Hence
P(X=1 or X=2)=P(X=1)+P(X=2)=10/16
We can easily see that Probability of getting 2 tails or 1 tail in biased coin is more than that in unbiased coin.
B)
From the above trees we can get easily following outcomes for 3 tosses
{HHH,HHT,HTH,THH,HTT,TTH,THT,TTT}
For biased coin
Probability for 2 tails =(2/3)(1/3)(1/3)=2/27
Since 3 two tail cases hence P(X=2)=3*(2/27)=6/27
Probability of 1 tail =(2/3)(2/3)(1/3)=4/27
Since there are 3 one Tail cases hence P(X=1)=3*(4/27)=12/27
Hence
P(X=1 or X=2)=(6/27)+(12/27)=18/27
For unbiased coin
Probability of getting two tails =(1/2)(1/2)(1/2)=1/8
So P(X=2)=3*(1/8)=3/8
Probability of getting 1 tail =(1/2)(1/2)(1/2)=1/8
So P(X=1)=3*(1/8)=3/8
Hence P(X=1or 2)=(3/8)+(3/8)=6/8
Let
U is event that coin is unbiased and B is event that coin is biased
While let A is event that represent two or one Tail on tossing a coin 3 times so
As selecting any one of two coin at random have equal chance hence
P(U)=P(B)=1/2
Also
P(A|B)=18/27
P(A|U)=6/8
We have to find P(B|A)
So using Bayes rule
=8/17