Here goes. The first time that you will toss more heads than tails, you will have made an odd number of tosses. Let's write this as with non-negative. If is the probability of tossing tail and that of head, you have tossed tails and heads, and the probability of that is
.The combinatorial factor in the beginning is the number of ways of tossing heads and tails with the number of heads exceeding the number of tails for the first time at toss . I got this from the Ballot Theorem in William Feller, An Introduction to Probability Theory and Its Applications. Note that
is only equal to 1 if . Otherwise there is a finite probability that the number of heads will never exceed the number of tails.
The expected number of tosses is now equal to
With and this becomes equal to 3. For the variance we need
which equals 33 with and . The variance is then .