I want to find the probability that I will flip a fair coin and get $10$ heads in a row before I flip a total of $20$ tails. Or the opposite, the probability that I will flip a total of $20$ heads before I flip $10$ tails in a row. I would like to see the work and have an explanation. Also, this should be able to be applied to an unfair coin. Thanks!
The probability of flipping $10$ heads or tails in a row would be $(0.5)^{10}$ for a fair coin. I know how to figure out the probability of a total of $20$ tails in $x$ flips, but $x$ has to be defined to get an answer, at least as far as I am aware.
Thanks!