Saturday, August 25, 2018

"What are the odds?" You Have the Same Taxi Driver Twice

Let's say you're traveling to a major city, and decide to use taxis the entire time you're there (declining both public transit and Uber/Lyft). At minimum, there are thousands of taxi drivers in all major cities in the US, as well as around the world. So what are the odds that you encounter the same taxi driver twice during your trip?

For our first example, let's use New York City. Let's assume that you're spending a full week (7 days) in the city, and you take 4 taxi trips per day, or 28 trips in total. There are 13,587 medallions in existence, which results in a very unlikely scenario you'll have the same driver twice (assuming that the chances of seeing any given driver is equal, which isn't reflective of reality since drivers aren't evenly distributed throughout a city, but we'll roll with this assumption for ease of calculation).

This actually is analogous to the birthday paradox. In a room of 23 people, there's a 50/50 chance of two people having the same birthday. That's because there are 253 different possible combinations of birthdays within those 23 people, and the chance of 2 people NOT sharing a birthday is 364/365. But multiply that out 253 times and you get (364/365)^253, or 49.95%. The chances that at least one of those pairs match is 1 - 49.95%, or 50.05%.

We can use a similar formula to determine the likelihood that you end up with the same taxi driver again:



n is the number of trips (think of them as pairs of trips) and in this case the probability of NOT finding a match would be (# of drivers - 1) / # of drivers. In the New York example, that's 13586/13587. Over 28 rides, you get: 1 - (13586/13587)^((28(28-1))/2) = 2.74%

How many rides would you need to take to get the chances to 50/50? The square root of n is approximately the number of rides you would need to take to get even odds of a match, although it undershoots it a little bit. For NY, you would need 138 rides to get to there, or 35 days at 4 rides/day.


CityCountry# Taxi Drivers# DaysTrips/DayTotal TripsProb Same Driver# of Trips to Expect Repeat
San FranciscoUSA1,825742818.71%51
HoustonUSA2,245742815.50%56
Los AngelesUSA2,300742815.16%57
Washington DCUSA6,30074285.82%94
ChicagoUSA6,65074285.53%97
New York CityUSA13,58774282.74%138

As with my previous post about a doctor on an airplane, the chances entirely depend upon the number of drivers in the city. The less drivers, the more likely you see one twice.

What about around the world? This thought problem goes to the absolute extreme in Mexico City, which has one of the largest taxi fleets in the world with 140,000 taxis!


CityCountry# Taxi Drivers# DaysTrips/DayTotal TripsProb Same Driver# of Trips to Expect Repeat
TorontoCanada4,84974287.50%83
TokyoJapan35,00074281.07%222
BogotaColombia53,00074280.71%273
BeijingChina68,50074280.55%310
LondonEngland138,95774280.27%442
Mexico CityMexico140,00074280.27%443

No comments:

Post a Comment