# Thread: Probability (Is what I did correct?)

1. ## Probability (Is what I did correct?)

A fair coin is tossed 5 times. What is the probability of getting at least 3 heads on consecutive tosses?

I said HHHHH, HHHHT, HHHTH, HHHTT, THHHT, THHHH, TTHHH, HTHHH are all the possible ways this can happen.

Since there are 32 possible ways of doing five coin tosses:

8/32 = 1/4 = .25

2. Yes, that looks good. That's a brute force approach. Works OK for smaller trials, but what if it were the probability of 8 consecutive heads in 20 tosses?.

You could show off and use a Markov chain.

The entry in the upper right hand corner tells us the probability of getting 3 conscutive heads by the time we throw 5 times. See?. It matches yours.

$\begin{bmatrix}1/2&1/2&0&0\\1/2&0&1/2&0\\1/2&0&0&1/2\\0&0&0&1\end{bmatrix}^{5}=\begin{bmatrix}13/32&7/32&1/8&\boxed{1/4}\\11/32&3/16&3/32&3/8\\7/32&1/8&1/16&19/32\\0&0&0&1\end{bmatrix}$

I hope I set that up right.

3. could you kindly explain how did you set up the Markov chain for those of us not yet inducted into the Markov world?

4. Anyway, I present my brute force method using calculation:

We let Event "At Least 3 Consecutive Heads in 5 Throws" be R.
Let H= Number of Heads Thrown in 5 Throws

P(R) =
P(R|H=0).P(H=0) + P(R|H=1).P(H=1) + P(H|T=2).P(H=2) + P(R|H=3).P(H=3) + P(R|H=4).P(H=4) + P(R|H=5).P(H=5)

Let's get the trivial cases off first.

P(R|H=0), P(R|H=1). P(R|H=2) all equal 0.
P(R|H=5) = 1.

We only need to calculate P(R|H=3) and P(R|H=4).

$P(R|H=3) = {{3 \choose 2} \over {5 \choose 3}} = {3 \over 10}$

$P(R|H=4) = {{3 \choose 1} - {2 \choose 1} \over {5 \choose 4}} = {4 \over 5}$

$P(R) = {3 \over 10}{5 \choose 3}({1 \over 2})^{5} + {4 \over 5}{5 \choose 4}({1 \over 2})^5 + { 5 \choose 5}({1 \over 2})^5 = 0.09375 + 0.125 + 0.03125 = 0.25$