Flipping Coins and Advantages You and I decide to play a game where we take turns flipping a coin.  The first player to flip 10 heads wins the game.  Naturally, there is an argument about who should go first.
Simulations of this game show that the player to flips first wins 2% more than the player who flips second.  I'd like to make this more precise but have run into some problems.
This isn't a binomial random variable, as there are no fixed number of trials (flip until someone gets 10 heads).  How can I model this?
 A: We can play this equivalent game: both players flip simultaneously. Repeat until at least one of the players has flipped heads ten times. If both players flip their tenth head simultaneously, player A wins. Otherwise the player who first flips their tenth head wins.
Let $p$ be the probability that the players simultaneously reach ten heads each. Then the probability that player A wins is
$(1+p)/2.$
To reach ten heads simultaneously, the players must each have flipped $9$ heads in the first $n+9$ flips, then both flip heads on flip number $n+10,$ where $n\geq0.$
So
$$
p = \sum_{n=0}^\infty \binom{n+9}{9}^2 4^{-(n+10)}.
$$
Wolfram Alpha says this is approximately 
$0.0658195.$
Therefore player A wins with probability approximately $0.53291.$
This agrees with the other answers so far that assume the ten heads do not need to be tossed consecutively.
A: Basic approach. Since the steps are fairly uniform, you can solve this with a recurrence, looking at the result after each round of flips.  We ignore all rounds where both players flip tails, so we're left with probability one-third each of Player $1$ flipping heads, Player $2$ flipping heads, and both players flipping heads.  Thus,
$$
p(0, 0) = 1
$$
$$
p(i, -1) = p(-1, j) = 0 \qquad \forall i, j
$$
$$
p(i, j) = \frac{p(i-1, j)+p(i, j-1)+p(i-1, j-1)}{3} \qquad \forall i, j \geq 0 \text{ (except $i = j = 0$)}
$$
The probability of Player $1$ winning is then
$$
P(\text{Player $1$ wins}) = \sum_{j=0}^{10} p(10, j)
$$
This seems like it's easier just to code up a computation than to solve the partial sums analytically.  I obtain the same result as @gar.
A: You can model this problem by taking $X_1,X_2,\dots $ and $Y_1,Y_2,\dots$ be independent binary variables with probability $\frac{1}{2}$. Let $t_1$ and $t_2$ be the smallest values such that $X_t,X_{t-1},\dots X_{t-9}$ and $Y_t,T_{t-1},\dots, Y_{t-9}$ are all ones.
Let $A$ be the event $t_1\geq t_2$ and let $p(n)$ be the probability that $t_1=n$ ( this is the same as the probability that $t_2=n$).
We have that $P(A)=\sum\limits_{n=1}^\infty\sum\limits_{m=n}^\infty p(n)p(m)=\dfrac{(\sum\limits_{n=1}^\infty p(n))^2+\sum\limits_{n=1}^\infty p(n)^2}{2}=\frac{1}{2}+\sum\limits_{n=1}^\infty \frac{P(n)^2}{2}$.
How do we calculate $p(n)$?
We have $p(10)=2^{-10},P(11)=2^{-11}$  and for $n>11$ we have $p(n)=2^{-11}(1-Q(n-12))$ .
This allows us to approximate $P(A)$ by calculating suffiecently large values of $p(n)$, one can notice that $\sum\limits_{n=N+1}^\infty P(n)^2\leq \sum\limits_{n=N+1}^\infty P(n)$.  We can control this last sum quite nicely, notice that the probability that at least one streak appears in the first $N$ throws is at least $1-(1-2^{-10})^{\lfloor N/10 \rfloor}$. So we can give good precision to our approximations.
An approximation with approximately $100,000$ terms yields $0.500061$.
Which I think makes sense, the expected number of throws is $2(2^9-1)=1022$, so $p(n)$ doesn't really concentrate densely around a given set of values. $2\%$ would seem really high to me as the probability that $t_1=t_2$.
here is the code used for the approximation:
#include <bits/stdc++.h>
using namespace std;

const int MAX=10000010;
double P[MAX];
double Q[MAX];

int main(){
    for(int n=10;n<MAX;n++){
        if(n==10) P[n]=pow(0.5,11);
        if(n==11) P[n]=pow(0.5,12);
        if(n>11) P[n]=pow(0.5,12)*(1-Q[n-12]);
        Q[n]=Q[n-1]+P[n];
    }
    double res=0;
    for(int i=0;i<MAX;i++){
        res=res+P[i]*P[i];
    }
    printf("%f\n",0.5+res/2);
}

