- #1

- 611

- 117

- Homework Statement
- Suppose we are flipping a fair coin. What is the probability that we observe a run of 5 consecutive heads before seeing a run of 2 consecutive tails.

- Relevant Equations
- Probability

Hi,

I was just having a go at this question, and I suppose I have two sub-questions:

1. Does my approach look correct?

2. If my approach is correct, is there a better approach than what I have done?

Let ##p_k## be the probability of seeing 5 consecutive heads, given that we have seen ##k## consecutive heads so far. ##k = -1## means we have seen a tail and ##k = -2 ## means that we have seen two consecutive tails. Then I basically just set up a system of equations which basically take the form of: ##p{k} = P(\text{get a head}) p_{k + 1} + P(\text{get a tail}) p_{0} ##

[tex] p_{-2} = 0 [/tex]

[tex] p_{-1} = \frac{1}{2} p_{-2} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} [/tex]

[tex] p_{5} = 1 [/tex]

[tex] p_{4} = \frac{1}{2} p_{5} + \frac{1}{2} p_{0} = \frac{1}{2} + \frac{1}{2} p_0 [/tex]

[tex] p_{3} = \frac{1}{2} p_{4} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} + \frac{1}{2} \left( \frac{1}{2} + \frac{1}{2} p_0 \right) = \frac{1}{4} + \frac{3}{4} p_{0} [/tex]

[tex] p_{2} = \frac{1}{2} p_{3} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} + \frac{1}{2} \left( \frac{1}{4} + \frac{3}{4} p_0 \right) = \frac{1}{8} + \frac{7}{8} p_{0} [/tex]

[tex] p_{1} = \frac{1}{2} p_{2} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} + \frac{1}{2} \left( \frac{1}{8} + \frac{7}{8} p_0 \right) = \frac{1}{16} + \frac{15}{16} p_{0} [/tex]

[tex] p_{0} = \frac{1}{2} p_{-1} + \frac{1}{2} p_{1} = \frac{1}{2} \cdot \frac{1}{2} p_{0} + \frac{1}{2} p_{1} \rightarrow p_{0} = \frac{2}{3} p_{1} [/tex]

which leads to:

[tex] p_{0} = \frac{2}{3} \left( \frac{1}{16} + \frac{15}{16} p_{0} \right) \rightarrow p_{0} = \frac{1}{9} [/tex]

Does that seem correct? Are there more elegant ways to get to the answer? Perhaps I could use Markov chains, but that is not something I have really come across before to a large extent.

Any help would be greatly appreciated.

[tex] p_{k} = \frac{2^{(N - k)} - 1}{2^{(N - k)}} p_{0} + \frac{1}{2^{(N - k)}} [/tex]

for ## 1 \leq k < N ##. Then I may be able to generalize the form for ## k < 0 ## and then get to a general probability of 'getting N consecutive heads before M consecutive tails', but I will continue to develop this offline and post any updates

I was just having a go at this question, and I suppose I have two sub-questions:

1. Does my approach look correct?

2. If my approach is correct, is there a better approach than what I have done?

**Original question:**Suppose we are flipping a fair coin. What is the probability that we observe a run of 5 consecutive heads before seeing a run of 2 consecutive tails.**My approach:**Let ##p_k## be the probability of seeing 5 consecutive heads, given that we have seen ##k## consecutive heads so far. ##k = -1## means we have seen a tail and ##k = -2 ## means that we have seen two consecutive tails. Then I basically just set up a system of equations which basically take the form of: ##p{k} = P(\text{get a head}) p_{k + 1} + P(\text{get a tail}) p_{0} ##

[tex] p_{-2} = 0 [/tex]

[tex] p_{-1} = \frac{1}{2} p_{-2} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} [/tex]

[tex] p_{5} = 1 [/tex]

[tex] p_{4} = \frac{1}{2} p_{5} + \frac{1}{2} p_{0} = \frac{1}{2} + \frac{1}{2} p_0 [/tex]

[tex] p_{3} = \frac{1}{2} p_{4} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} + \frac{1}{2} \left( \frac{1}{2} + \frac{1}{2} p_0 \right) = \frac{1}{4} + \frac{3}{4} p_{0} [/tex]

[tex] p_{2} = \frac{1}{2} p_{3} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} + \frac{1}{2} \left( \frac{1}{4} + \frac{3}{4} p_0 \right) = \frac{1}{8} + \frac{7}{8} p_{0} [/tex]

[tex] p_{1} = \frac{1}{2} p_{2} + \frac{1}{2} p_{0} = \frac{1}{2} p_{0} + \frac{1}{2} \left( \frac{1}{8} + \frac{7}{8} p_0 \right) = \frac{1}{16} + \frac{15}{16} p_{0} [/tex]

[tex] p_{0} = \frac{1}{2} p_{-1} + \frac{1}{2} p_{1} = \frac{1}{2} \cdot \frac{1}{2} p_{0} + \frac{1}{2} p_{1} \rightarrow p_{0} = \frac{2}{3} p_{1} [/tex]

which leads to:

[tex] p_{0} = \frac{2}{3} \left( \frac{1}{16} + \frac{15}{16} p_{0} \right) \rightarrow p_{0} = \frac{1}{9} [/tex]

Does that seem correct? Are there more elegant ways to get to the answer? Perhaps I could use Markov chains, but that is not something I have really come across before to a large extent.

Any help would be greatly appreciated.

**Extension**: (this is a side note, not part of the main problem) I could see a pattern developing in terms of the equations for ##p_4##, ##p_3##, ##p_2##, etc. which took the form: if we require ##N## consecutive heads in a row, then:[tex] p_{k} = \frac{2^{(N - k)} - 1}{2^{(N - k)}} p_{0} + \frac{1}{2^{(N - k)}} [/tex]

for ## 1 \leq k < N ##. Then I may be able to generalize the form for ## k < 0 ## and then get to a general probability of 'getting N consecutive heads before M consecutive tails', but I will continue to develop this offline and post any updates