So our scheme for getting a last ride in on Disaster Transport without knowing in advance it was our last ride was to flip a coin after each ride, and then re-ride if the coin came up tails. (Maybe it was heads. It doesn’t matter, since we’re supposing the coin is equally likely to come up heads as tails.) The obvious question is, how many times could we expect to ride? Or put another way, how many times in a row could I expect a flipped coin to come up tails, before the first time that it came up heads? The probability tool used here is called the geometric distribution.
Underlying this study is the idea that each coin flip, each distribution, is a Bernoulli trial: it’s an experiment, something to be done, which can either successfully meet a condition or can fail to meet a condition, and there’s no ambiguity about which is which. In this case a coin can successfully come up tails, or fail to come up tails. The probability of success is, generally, denoted as p, if we’d rather work with symbols rather than numbers. The advantage of working with symbols is if we solve the problem once then we’ve solved it for all time, as soon as we figure how to translate a particular problem into the symbols.
The probability of failure is equal to 1 – p, since the outcome has to be either success or failure and not both. But if we have to write this a lot, the tedium prompts us to write q instead. The choice of p for a probability has an obvious explanation (although I note I haven’t actually checked whether that’s so). The choice of q … I can’t really say, except that p and q pair up so nicely they were probably inevitably partnered. (In Hamiltonian mechanics, a great way of treating some physics problems, there’s this a coupled relationship between the positions and momentums of particles, and the variables representing them are the similarly paired q and p, although for reasons that seem just to be annoying to the outsider p is used for momentum rather than position.)
I need to make one more assumption about the coin flips: that they’re independent, that coming up tails this one time doesn’t make it more or less likely that it’ll come up tails next time. If this doesn’t seem reasonable enough to you the complaints office is open after lunch on Thursdays.
The probability of a particular series of outcomes in a string of independent experiments is the product of the probability of each of these outcomes. That is, the probability of success on the first and failure on the second trial is the p probability of success the first time times q on the second, or . The probability of success on the first and the second trials, followed by failure on the third, is equal to — the chance of success times the chance of success times the chance of failure. The probability of success on the first, second, and third attempts, followed by failure, is .
The chance of having some number N successes in a row followed by the first failure is then , 1 multiplied by p some N times over, times q.
This is good for working out the probability of any streak, of some number of successes in a row followed by a failure or, if you prefer of some number of failures in a row followed by a success. That symmetry is really easy to see if we’re doing coin flips: failing to get heads is the same thing as successfully getting something other than heads. Whether you want to call success “getting heads” or “getting something other than heads” depends, I suppose, on whether you’re optimistic or pessimistic about coins coming up heads.
So, let’s put forth the situation: my Dearly Beloved and I go on Disaster Transport not knowing whether this is our final ride on the roller coaster. We flip a coin; if it comes up tails, we ride again. The chance that we’re done, we got heads the first time, is . The chance that it comes up tails once and then heads, for one more ride, is . The chance it comes up tails twice and then heads, two more rides, is . You see the pattern. I see it, anyway; the chance of N tails followed by a heads is .
This tells us something probably not that surprising: after the start of the flip-a-coin policy, we had a 50 percent chance of no more rides, a 25 percent chance of one more ride, a 12.5 percent chance of two more rides, a 6.25 percent chance of three more rides, and so on. It’s most likely that we’d get no more further rides. The chance was at least 95 percent that we’d get at most four more rides.
There’s a natural follow-up question, of course.
2 thoughts on “How Many Last Rides?”