Q. If tossing a fair coin, how many tosses does it take to get two heads in a row, on average?

_________________________________________________
I was a bit unsure about what 'on average' meant. I'm a bit unsure about what I tried:

I considered cases of getting two heads in a row for increasing total tosses and considered each of their probabilities as such to take an average:

HH - 0.25
THH - 0.125
TTHH - 1/16
And so on, until 8 tosses

But it wouldn't make sense because it would end up being an infinite series.

Also, I've found that the answer is 6, but I'm more interested in how to get there. Thanks.

google is you friend. You might start here:

https://www.quora.com/What-is-the-expected-number-of-coin-flips-until-you-get-two-heads-in-a-row

Thanks! This clears it up.

To determine the average number of tosses required to get two heads in a row, we can use a recursive approach. Let's consider the possible outcomes of the first coin toss:

1. If the first toss results in a head (H), we need one more head to get two in a row.
2. If the first toss results in a tail (T), we need to start over and consider the outcome of the next toss.

Let's denote the average number of tosses required to get two heads in a row as N. Given this information, we can express N in terms of the outcomes of the first toss:

N = (1/2) * 1 + (1/2) * (1 + N)

In the above equation, the first term (1/2) * 1 represents the case when the first toss results in a head, requiring only one more head to get two in a row. The second term (1/2) * (1 + N) represents the case when the first toss results in a tail. In this case, one more toss is needed to start over, but we also need to consider the average number of tosses required from that point onwards, hence the N term.

Now, let's solve the equation to find the value of N:

N = (1/2) * 1 + (1/2) * (1 + N)
N = 1/2 + 1/2 + N/2
N = 1 + N/2
N/2 = 1
N = 2

Hence, it takes an average of two tosses to get two heads in a row.

To determine how many tosses it takes to get two heads in a row on average, we can use the concept of expected value. In this case, the expected value represents the average number of tosses required to achieve the desired outcome.

Let's break down the problem step by step:

1. Start with the simplest scenario: What is the expected number of tosses required to get two heads in a row after the first toss?

Since the first toss does not guarantee two heads in a row, the expected number of tosses after the first one is the same as the overall expected value. In other words, we need to find the expected value from scratch now.

2. Consider the possibilities after the second toss:

- If the second toss is a head, we have achieved the desired outcome in just two tosses.
- If the second toss is a tail, we are back to the initial situation and need to start over.

Therefore, after the second toss, we have a 50% chance of having two heads in a row and a 50% chance of starting again from scratch.

3. Combine the results:

To find the expected number of tosses required to get two heads in a row, we can write an equation:

E = 1 + (0.5 * 2) + (0.5 * E)

Here, the initial "1" accounts for the first toss, the "0.5 * 2" represents the expectation for the second toss of either having two heads in a row or starting over, and the final "0.5 * E" reflects starting over with an expected value of E. The expected value is unknown at this point.

4. Solve the equation:

Rearrange the equation slightly:

E = 1 + E/2
Multiply both sides by 2 to eliminate the fraction:

2E = 2 + E
Subtract E from both sides:

E = 2

Therefore, the expected number of tosses required to get two heads in a row is 2.

Now, let's generalize this concept to the case of getting two heads in a row after any number of tosses that are greater than or equal to 2:

E(n) = 1 + (0.5 * 2) + (0.5 * E(n))

Here, E(n) represents the expected value after n tosses. The equation is similar to what we had before, but this time, instead of starting from scratch, we use the expected value we are trying to find.

Solving this equation:

E(n) = 2

Therefore, it takes, on average, 2 tosses to get two heads in a row, regardless of the initial number of tosses or previous outcomes.