Xpectation Mania #3

Probability Level pending

Halum is tossing a fair coin until he ends up getting n pairs of HT (Head before Tail) in a row. That is, if n = 3 , n = 3, he is looking for the sequence "HTHTHT".

The function g ( n ) g(n) counts the expected number of tosses for Halum to accomplish the same. Calculate g ( 7 ) . g(7).

76822 5460 21844 16384 128

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.

1 solution

Mark Hennings
May 14, 2021

For 0 j n 0 \le j \le n , let T j T_j be the expected number of additional tosses required to obtain a sequence of HT n n times in a row, given that the last 2 j 2j tosses have resulted in HT j j times in a row. Note that T n = 0 T_n = 0 , and T 0 = g ( n ) T_0 = g(n) . Also, for 0 j n 1 0 \le j \le n-1 , let H n H_n be the expected number additional tosses required to obtain a sequence of HT n n times in a row, given that the last 2 j + 1 2j+1 tosses have resulted in HT j j times in a row, followed by a H. Conditional probability considerations tell us that T j = 1 2 ( 1 + H j ) + 1 2 ( 1 + T 0 ) H j = 1 2 ( 1 + T j + 1 ) + 1 2 ( 1 + H 0 ) 0 j n 1 T_j \; = \; \tfrac12(1 + H_j) + \tfrac12(1 + T_0) \hspace{2cm} H_j \; = \; \tfrac12(1 + T_{j+1}) + \tfrac12(1 + H_0) \hspace{2cm} 0 \le j \le n-1 In particular we deduce that H 0 = T 0 2 H_0 = T_0 - 2 , and we have the equations 2 T j = H j + T 0 + 2 2 H j = T j + 1 + T 0 0 j n 1 2T_j \; = \; H_j + T_ 0 + 2 \hspace{1cm} 2H_j \; = \; T_{j+1} + T_0 \hspace{2cm} 0 \le j \le n-1 Thus 4 T j = 2 H j + 2 T 0 + 4 = T j + 1 + 3 T 0 + 4 T j 4 j = T j + 1 4 j + 1 + 3 T 0 + 4 4 j + 1 T 0 T j 4 j = k = 0 j 1 3 T 0 + 4 4 k + 1 = 1 3 ( 3 T 0 + 4 ) ( 1 4 j ) \begin{aligned} 4T_j & = \; 2H_j + 2T_0 + 4 \; = \; T_{j+1} + 3T_0 + 4 \\ \frac{T_j}{4^j} & = \; \frac{T_{j+1}}{4^{j+1}} + \frac{3T_0 + 4}{4^{j+1}} \\ T_0 - \frac{T_j}{4^j} & = \; \sum_{k=0}^{j-1}\frac{3T_0 + 4}{4^{k+1}} \; = \; \tfrac13(3T_0 + 4)(1 - 4^{-j}) \end{aligned} and hence T j = T 0 4 3 ( 4 j 1 ) 0 j n T_j \; = \; T_0 - \tfrac43(4^j - 1) \hspace{2cm} 0 \le j \le n Since T n = 0 T_n=0 we deduce that g ( n ) = T 0 = 4 3 ( 4 n 1 ) g(n) \; = \; T_0 \; = \; \tfrac43(4^n - 1) and hence g ( 7 ) = 21844 g(7) = \boxed{21844} .

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...