Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I keep tossing a fair coin until I get two consecutive heads or a tail and then immediately a head following it. Why are these two patterns not equally probable? I thought they were since the coin is fair...

Should I model this problem using a geometric distribution or some other distribution? Perhaps I should just think in terms of conditional probability?

share|cite|improve this question
This problem can be solved in a number of ways, e.g. by constructing an appropriate MC. Have a look here:… – Alex Nov 15 '12 at 23:44
@Alex: But you don’t need to calculate the actual probabilities to see why they’re not equal. – Brian M. Scott Nov 15 '12 at 23:46
Drawing a picture also helps, e.g. – Rahul Nov 15 '12 at 23:51
up vote 11 down vote accepted

If the first toss is a tail, you’re certain to get TH before you get HH. If the first toss is a head, however, you could still get TH before getting HH. Thus, the probability of getting TH first is greater than $\frac12$. (I’m assuming a fair coin.)

Added: This answers the original question, but the reasoning can be extended to get a numerical result. If you get a T before getting HH, you are certain to get TH before HH. Thus, the only way to get HH first is to get it before tossing even one T, which means getting it in the first two tosses. That occurs with probability $\frac14$, so the probability of getting TH first must be $\frac34$. (The only outcome that results in never getting HH or TH is an infinite string of tails, which has probability $0$.)

share|cite|improve this answer

Brian Scott's answer is good. Here's another point of view. First consider what happens on the first three tosses: \begin{array}{lll} \text{HHH} & & \text{HH first} \\ \text{HHT} & & \text{HH first} \\ \text{HTH} & & \text{TH first} \\ \text{HTT} \\ \text{THH} & & \text{TH first} \\ \text{THT} & & \text{TH first} \\ \text{TTH} & & \text{TH first} \\ \text{TTT} \end{array} In four cases you get $\text{TH}$ first and in only two you get $\text{HH}$ first, and in the other two, you've got a $50\%$ chance of getting $\text{TH}$ on the next trial and no chance of getting $\text{HH}$ on the next trial.

What happens after that? You've got a four-state Markov chain whose states are $\text{HH}$, $\text{HT}$, $\text{TH}$, $\text{TT}$, and if after $\text{TH}$ (for the first and second trials) you get $\text{T}$, then you've moved to state $\text{HT}$, (for the second and third trials) etc. The transition probabilities are not all equal, but if you raise the transition matrix to a higher power than $1$, then they're always equal to $1/4$. So in further steps beyond that, the four states are always equally likely (although of course they're not conditionally equally likely given where you are on the immediately preceding trial).

share|cite|improve this answer

If you have a run of length $n\ge 2$ in which neither HH nor TH has occurred, then it is either HTTTT...T (length $n$) or it is TTT...T. (length $n$). Both of these have the same probability. Then on the $(n+1)^{st}$ flip you want to get either the HH or the TH. But you cannot get the HH since so far it ends in T. So it looks like in all cases where you haven't stopped by $n \ge 2$ the first time you get one of them, it is TH. You can stop with HH only on the first two flips. So with probability 1/4 you end with the HH on flip two and in all remaining 3/4 of the probability you stop with TH.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.