TITLE: Coin flipping probability game ; 7 flips vs 8 flips
QUESTION [61 upvotes]: Your friend flips a coin 7 times and you flip a coin 8 times; the person who got the most tails wins. If you get an equal amount, your friend wins.
There is a 50% chance of you winning the game and a 50% chance of your friend winning.
How can I prove this? The way I see it, you get one more flip than your friend so you have a 50% chance of winning if there is a 50% chance of getting a tails.
I even wrote a little script to confirm this suspicion:
from random import choice

coin = ['H', 'T']

def flipCoin(count, side):
    num = 0
    for i in range(0, count):
        if choice(coin) == side:
            num += 1
    return num


games = 0
wins = 0
plays = 88888

for i in range(0, plays):
    you = flipCoin(8, 'T')
    friend = flipCoin(7, 'T')
    games += 1
    if you > friend:
        wins += 1

print('Games: ' + str(games) + ' Wins: ' + str(wins))
probability = wins/games * 100.0
print('Probability: ' + str(probability) + ' from ' + str(plays) + ' games.')

and as expected,
Games: 88888 Wins: 44603
Probability: 50.17887678876789 from 88888 games.

But how can I prove this?

REPLY [2 votes]: This is not a new answer but a mention of some generalizations and a defense of heropup's computational answer against the criticism it has received in the comments.  I realize I'm bucking the tide by pointing out reasons to prefer the computational answer to the intuitive one.  
The intuitive explanation relies on a numerical coincidence and does not generalize in a number of natural directions.  To flesh out the intuitive approach, let $W$ be the event that I win, and let $T$ be the event that you and I are tied after seven flips.  Then
$$\Pr[W]=\Pr[T]\cdot\frac{1}{2}+(1-\Pr[T])\cdot\frac{1}{2}=\frac{1}{2}.$$
The numerical coincidence is the equality of the two factors of $\frac{1}{2}.$  The $\frac{1}{2}$ in the first term is the tails probability on the $8^\text{th}$ flip, while the $\frac{1}{2}$ in the second term is the conditional probability that I win the first seven flips given that they aren't tied, which, by symmetry, equals the conditional probability that you win the first seven flips.  There is no logical connection between these two factors of $\frac{1}{2},$ but it is their accidental equality that makes the intuitive trick work.  Specifically, the equality of the two factors results in the cancelation of $\Pr[T],$ which is unpleasant to compute.
The accidental nature of this trick is a problem: what if we were using coins with tails probability $p\ne\frac{1}{2}?$  In that case we have
$$
\Pr[W]=\Pr[T]\cdot p+(1-\Pr[T])\cdot\frac{1}{2},
$$
and there is no cancelation of $\Pr[T].$  Or what if we use fair coins, but I have a two flip advantage?  Let $A_{\ge1}$ be the event that I am ahead by one or more tails after seven flips, let $A_0$ be the event that we are tied after seven flips, and let $A_{-1}$ be the event that you are ahead by exactly one tail after seven flips.  Then
$$
\Pr[W]=\Pr[A_{\ge1}]+\Pr[A_0]\cdot\frac{3}{4}+\Pr[A_{-1}]\cdot\frac{1}{4},
$$
which admits to no major simplification.  Admittedly, the original formulation does generalize nicely from $7$ and $8$ flips to $n$ and $n+1$ flips: the answer is always $\frac{1}{2}$ for any $n\ge0.$  The answer in the version where I have a two flip advantage, however, does depend on $n.$  It varies from $\frac{3}{4}$ when $n=0$ to $\frac{1}{2}$ as $n\to\infty.$  (An advantage of two, or any fixed number, of flips is negligible when $n$ is large.)