[Math] Markov Chain: flip coin 8 times and get 3 consecutive heads

markov chainsmarkov-processprobabilityprobability theorystochastic-processes

I have confusion while reading the following example in the course material.

Q: In a sequence of independent flips of a fair coin, let N denote the
number of flips until there is a run of three consecutive heads. Find

(a) $P(N \leq8)$

and
(b) $P(N = 8)$.


For part b), the solution is given by here.
However, I am confused about the solution for part a). The solution is given by below:

[![enter image description here][2]][2]


Confusion:

I guess the source of confusion is because I don't understand the setup of this problem (in particular, the absorbing state=3). Most importantly, I don't understand how $P(X_{8}=3)$ will give $P(N\leq8)=P(N=1)+P(N=2)+…+P(N=8).$ It is possible that the state reaches 3 in any $N=6$ (as shown by the picture below).

[![enter image description here][3]][3]

One additional question, can I say $P(N\leq8)$ is the probability of getting a run of three consecutive heads in 8 flips (in the original question, it is asking the probability of getting 3 heads until N number of flips)?

Best Answer

Once you have got 3 consecutive heads, your goal is attained, and the task is over.

1.The probabilities in question obtained after N trials are the cumulative probabilities.
2. No, you can't say that. $P(N \le 8)$ is the probability that at most $8$ flips are needed.

you can understand from the probability values for trials 3 through 8

$3\quad 0.125 000 000$
$4\quad 0.187 500 000$
$5\quad 0.250 000 000$
$6\quad 0.312 500 000$
$7\quad 0.367 187 500$
$8\quad 0.417 968 750$