Q. 4.24

Question

Here is another way to obtain a set of recursive equations for determining Pn, the probability that there is a string of k consecutive heads in a sequence of n flips of a fair coin that comes up heads with probability p :

(a) Argue that for k<n, there will be a string of k consecutive heads if either

1. there is a string of k consecutive heads within the first n-1 flips, or

2. there is no string of k consecutive heads within the first n-k-1 flips, flip n-k is a tail, and flips n-k+1,,n are all heads.

(b) Using the preceding, relate PntoPn-1. Starting with Pk=pk, the recursion can be used to obtain Pk+1, then Pk+2, and so on, up to Pn.

Step-by-Step Solution

Verified
Answer

(a) 1 The probability for this case is Pn-1.

     2 we have not obtained k consecutive heads.

(b) Pn=Pn-1+(1-p)·1-Pn-k-1·pk

1Step 1: Given information Part (a)

We found that there is another way to obtain a set of recursive equations for determining Pn, the probability that there is a string of k consecutive heads in a sequence of n flips of a fair coin that comes up heads with probability p.

2Step 2: Explanation Part (a)

Let's condition on what happens with the last k  flips. We have two options

1

There has been obtained k consecutive Heads within first n-1 flips. That means that we are not interested what happens in the last trial (the probability l), so the probability for this case is Pn-1.

2

Suppose that we have obtained k consecutive Heads in the last k flips. That means that in n-k-1st flip we had to have tail and that in the first n-k-1 flips we have not obtained kconsecutive heads.

3Step 3: Given information Part (b)

We found that there is another way to obtain a set of recursive equations for determining Pn, the probability that there is a string of k consecutive heads in a sequence of n flips of a fair coin that comes up heads with probability p.

4Step 4: Explanation Part (b)

Considering the discussion in (a), the required recursion is

Pn=Pn-1+(1-p)·1-Pn-k-1·pk

That recursive relation can be solved using the method given in the exercise, but it is not part of this task.