Q.4.69

Question

A fair coin is flipped 10 times. Find the probability that there is a string of 4 consecutive heads by

(a) using the formula derived in the text; 

(b) using the recursive equations derived in the text. 

(c) Compare your answer with that given by the Poisson approximation. 

Step-by-Step Solution

Verified
Answer
  1.  The probability that there is a string of 4 consecutive heads by using the formula derived in the text is 0.2451343.
  2. The probability that there is a string of 4 consecutive heads by  using the recursive equations derived in the text is  0.2451172.
  3. By comparing the answer we get 0.2211992
1Step 1: Given information (part a)

A fair coin is flipped 10 times.

We have to find the probability that there is a string of 4consecutive heads by  using the formula derived in the text.

2Step 2: Explanation (part a)

Define event Ei that marks that starting from the i th position and on, we have k consecutive Heads.

From the inclusion-exclusion formula, we have that the probability that there exist such a sequence is

Pl=17El=r=17(-1)r+1l1<<lrPEl1Elr

since we have that n-k+1=7. Using the formula from the text (page 151), we have that the probability is equal to

Pl=17El=r=17(-1)r+110-4rr+210-4rr-1125r

Use Ror some similar programming language (code in R given below) yields that the answer is 0.2451343.

3Step 3: Program (part a)

calc=function(r){c=(-1)^(r+1)*0.5^(5*r)*(choose(10-4*r,r)+2* choose(10-4*r,r-1))return(c)}

x=c(1,2,3,4,5,6,7)

for (r in x)

{c[r]=calc(c)}

sum(c)

4Step 4: Final answer (part a)

The probability that there is a string of  consecutive heads by using the formula derived in the text is0.2451343.

5Step 5: Given information (part b)

A fair coin is flipped 10 times.

We need to find the probability that there is a string of 4 consecutive heads by using the recursive equations derived in the text.

6Step 6: Explanation (part b)

If we mark withPn the probability that there exist a sequence of k consecutive Heads, from the page 151 we have recursive relation

Pn=j=1kPn-j(1/2)j+(1/2)k

Where we have that P1=P2=P3=0

and P4=116

By Writing the code we obtain the answer 0.2451172

7Step 7:Program(part b)

recursion = function (n)

{If (n==0n==1n==2n==3) return (0)

If (n==4)  return  (0.0625)

If (n>4)


{ Vector =c(1,2,3,4)Summand ==c(4)For ( j in vector) { summand [j]=recursion(n-j)×0.5(j)} return (sum(summand) +0.54}}

recursion (10)

8Step 8: Final answer (part b)

By using the recursive equations, we get 0.2451172

9Step 9:Given information(part c)

A fair coin is flipped 10 times. We need to compare your answer with that given by the Poisson approximation.  

10Step 10: Explanation (part c)

With L10<4 mark the event that the longest strike of consecutive Heads is shorter than 4 .

From the formula on the page 149 , we have that the Poisson approximation of that probability is

P(L10<4) exp[-10-4+224+1] =e-0.25=0.7788008

So the probability that exist a strike of length 4 or even longer is

P(L10 4)-1-P(L10<4)=0.2211992

11Step 11:Final answer(part c)

By the Poisson approximation, we get  0.2211992