Google Makes Me Lazy

John Derbyshire serves up a math problem in his August Diary:

Math Corner. A reader sent this in:

You can flip coins until the number of heads and tails are equal. The payoff is the number of flips. So, half of all games end after two flips and pay two dollars …

I'm not sure how you make a betting game out of this, but I'm certainly willing to tackle the question: What proportion of games, on average, end after exactly T coin tosses? Pretty obviously T has to be an even number. The chance that a game will end after two tosses is of course, as my reader says, 0.5. A couple of minutes' doodling should convince you that for four tosses the answer is 0.125. That is, one-eighth of games on average will end on the fourth toss. And then …?
Now once upon a time I might have been tempted to try to work this out for myself. Maybe I would have figured it out. Maybe not. However, with Google around, I often find myself just looking up the answer to such problems.

You just have to know the right question to ask! Googling "random walk return time" gives as the first item a pdf article with the answer near the bottom of page 2:
Prob(game ends on 2k flips)=C(2k,k)(1/4)^(k)/(2k-1)
where C(n,k) is the well-known function "n choose k."

The mathematical answer to the guy who wrote Mr. Derbyshire is that the expected payoff is infinite. This is stated at the end of section 1.1. In theory you should be willing to bet all your money on this game (*). It seems counter-intuitive; that's probably the point of the question.

I give myself credit for Googling skills, but subtract for general laziness. I wonder to what extent school kids today get their homework done via Google.

(*) On second thought, this isn't necessarily so. You'd have to take into account your risk aversion.