The following a gambling game:
We have a sequence of i.i.d. random variables, $X_1, X_2, \dots,$ with $P(X_n=1)=p, P(X_n=-1)=1-p, p<1/2$. A game is played by generating a sequence of realizations of the X's. The game ends when a sequence of $k$ (a given parameter) consecutive "losses" is first encountered. For example if $k=4$ a possible game would be
All sequences of consecutive losses have length at most 3 except one which has length 4 and is at the tail.
We know for sure that the game will end in a finite time. Question is now what's the distribution of the game time and what's the distribution of the maximum of the partial sums of the X's over the game duration.
I've done some poking around with this using recurrence relations but didn't quite crack it. For $k=1$ the game is a series of "wins" until the first "loss". In this case $T$ (the game time) is given by the geometric distribution. Is there a generalization of that for $k>1$ ?
All ideas appreciated.
Can we find the probability that a sequence of $t$ trials does not contain a $m$ losing streak ? We could take it from there