(This is not a homework question; I just want to understand how this works)
Let's say I am playing a game, where I need to flip a coin. I need to get $X$ number of heads in a row in order to win. The coin is unbalanced, and has $p$ probability of landing on heads and $1-p$ probability of landing on tails. Consecutive flips are independent of previous ones.
The game ends when I flip $X$ heads in a row; if I flip only heads the game ends in $X$ flips, if I flip $X-1$ heads, then one tail, then $X$ heads, the game ends in $2X$ flips.
- What is the expected value of coin flips?
- What is this distribution called?
I understand that this can probably be defined as some sum of binomial distributions; just curious if there's another way to do it.