Two "Heads" are better than one

I toss a fair coin 100 times in a row. If the expected number of times that two Heads are tossed consecutively is equal to N N , what is the value of 100 N 100N ?

Clarification : A run of three or more Heads in a row will contribute more than one instance of consecutive Heads. If three Heads are tossed in a row, then two Heads have been tossed consecutively twice. If six Heads are tossed in a row, then two Heads have been tossed consecutively five times, and so on. For example, two Heads have been tossed consecutively 11 times in the following sequence of 30 tosses:

T H H T H H H H T H H H T H T H H H H H T T T T H H T H T T THHTHHHHTHHHTHTHHHHHTTTTHHTHTT


The answer is 2475.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Mark Hennings
May 15, 2016

Relevant wiki: Expected Value - Problem Solving

Suppose that I toss a coin n n times in a row. For any 1 j n 1 1 \le j \le n-1 , let X j X_j be the random variable which is equal to 1 1 if Heads is tossed by the j t h j^\mathrm{th} and ( j + 1 ) s t (j+1)^\mathrm{st} coins, and 0 0 otherwise, so that the total number of occurrences of consecutive Heads is X = X 1 + X 2 + + X n 1 . X \; = \; X_1 + X_2 + \cdots + X_{n-1} \;. It is clear that E [ X j ] = P [ X j = 1 ] = 1 4 E[X_j] \,=\, P[X_j = 1] \; = \; \tfrac14 for each 1 j n 1 1 \le j \le n-1 , and hence that N = E [ X ] = E [ X 1 ] + E [ X 2 ] + + E [ X n 1 ] = 1 4 ( n 1 ) . N \; = \; E[X] \; = \; E[X_1] + E[X_2] + \cdots + E[X_{n-1}] \; = \; \tfrac14(n-1) \;.

For n = 100 n=100 , the value of 100 N 100N is 25 × 99 = 2475 25 \times 99 = \boxed{2475} .

For those who are not comfortable with using random variables like this, here is another approach. Let H n H_n be the expected number of consecutive Heads obtained in n n tosses, given that the first toss is Heads, and let T n T_n be the expected number of consecutive Heads obtained in n n tosses, given that the first toss is Tails. If N n N_n is the number of consecutive Heads obtained in n n tosses, then (conditioning on the outcome of the first toss) we have N n = 1 2 ( H n + T n ) N_n \,=\, \tfrac12(H_n + T_n) .

Conditioning on the outcome of the second toss tells us that H n = 1 2 ( 1 + H n 1 ) + 1 2 T n 1 = 1 2 + N n 1 T n = 1 2 H n 1 + 1 2 T n 1 = N n 1 H_n \; = \; \tfrac12(1 + H_{n-1}) + \tfrac12T_{n-1} \; = \; \tfrac12 + N_{n-1} \qquad \qquad T_n \; =\; \tfrac12H_{n-1} + \tfrac12T_{n-1} \; = \; N_{n-1} Averaging these equations gives N n = 1 4 + N n 1 N_n \,=\, \tfrac14 + N_{n-1} . Since N 1 = 0 N_1 = 0 we obtain N n = 1 4 ( n 1 ) N_n = \tfrac14(n-1) .

I used a shorter version of your 2nd method, the last of nth toss can be either H or T and the n+1th toss can be H or T, the number of head pairs increases by 1 1/4 th of the time and remains the same rest of the time

So (Nn+1)=1/4((Nn)+1)+3/4(Nn) or (N n+1)=(N n)+1/4

Ajinkya Shivashankar - 4 years, 7 months ago
Paulo Filho
May 16, 2016

In 100 100 tosses, we have 99 99 "double tosses". In each one of these 99 99 "double tosses", two heads will come up with probability 1 / 4 1/4 . Then the expected value of two heads in a row is 99 ( 1 / 4 ) = 24.75 99*(1/4) = 24.75

That's basically it. Because we can add expectations it does not matter that the outcomes of the various "double tosses" are not independent of each other.

Mark Hennings - 5 years, 1 month ago
James Pohadi
May 24, 2016

The total different result we can have in 100 100 toss is 2 100 2^{100} .

If we write the result of 100 100 toss in a row, we can see that there are 99 99 positions for two heads.

Example:

First position : HH####...

Second position : #HH###...

Third position : ##HH##...

........

Each position has 2 98 2^{98} different path.

The the total number of two heads in all result is 2 98 99 2^{98}*99

The expected number ( N ) (N) is 2 98 99 / 2 100 2^{98}*99/2^{100} = 24.75 24.75

100 N 100N = 24.75 100 24.75*100 = 2475 2475

This is not quite right. You say that the "total number of two heads" is 2 98 × 99 2^{98}\times99 . This is not correct, or really meaningful. It is possible to get no double heads at all, by alternately tossing Heads and Tails. You have to introduce expectation at an earlier stage of your argument.

The probability of getting HH in any one of the 99 99 possible places is 2 98 / 2 100 = 1 / 4 2^{98}/2^{100} =1/4 . As in the other two solutions, you can multiply 1 / 4 1/4 by 99 99 to get the correct expectation.

Mark Hennings - 5 years ago

Log in to reply

Sorry Sir, what I mean in "total number of two heads" is the number of "two heads" in all possible outcome of 100 100 tosses, it is not 99 99 "double heads" appears in each position. So in #, we can fill it with either H H or T T .

James Pohadi - 5 years ago

Log in to reply

How are you sure you are not double-counting? The sequence #HHH##### contributes (at least) two HHs. Your argument can be made to work, but it still needs to be tidied up to be clear, and the tidying-up approach is likely to bring you back to the indicator random variables I discussed...

Mark Hennings - 5 years ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...