Mathematically Optimal Ways to Escape A Car When It’s Raining And You Forgot The Umbrella

Image for post
Image for post

It happened again. You didn’t notice the gloomy skies as you pulled out of your driveway to go to Home Depot, and now you’re umbrella-less and sitting in their parking lot, watching the raindrops bead up and flow down your windshield. Worse yet, their New Grill November sale has summoned every dad within a 25 mile radius to the store, forcing you to park in the back of the lot. You didn’t even bring your rain jacket, because it’s new and you didn’t want to dirty it while carrying your new oak floorboards.

As you sit there feeling sorry for yourself, you notice that the sound of the rain has changed. From the time you pulled in to the moment you searched Amazon for oak flooring, the intensity of the rain has changed, and with it, the sound. That’s it! All you have to do is pick the right time to make a mad dash for the those automatic doors, and you’ll get minimally wet, despite making no preparations. You listen closely, and think back to a familiar math problem…

Secretary Problem

Let’s say you are the CEO of a large floorboard manufacturing plant, and the paperwork has really been piling up. You need a secretary, so you put out an ad in the classifieds: “SKILLED SECRETARY WANTED.” It’s a small town, so you don’t expect it to be too hard to choose one candidate from the applicants.

Image for post
Image for post

On the day of the interviews, to your surprise, the town has been able to come up with a huge line of secretaries, all with varying skill levels for working with large quantities of paperwork. You have enough experience to objectively rank each secretary against the others you’ve already interviewed, however, each of the potential secretaries is impatient and must be given a hire offer or rejection at the end of their interview. In addition, the dejected rejects will leave town as soon as they are rejected, so you can’t even call them back after the process. How can you hire the best secretary when you don’t know until the very end which secretary was the most skilled choice?

The Secretary Problem asks us to find the best way to choose a secretary from this line of potential hires in a way that maximizes the probability that we choose the most skilled candidate, also called an “optimal stopping rule.”

Back in the car, you realize that the secretary problem is applicable to your current situation. The “secretaries” are every second of rain, their “skill level” is the intensity, and you are the CEO, who every second must make a “hire” decision and run for the refuge of Home Depot or a “reject” decision and stay in the car. And, just like in the problem, there’s no way to return to a previous “secretary”; they’ve already left town! The two situations are the same!

You remember that the proven best way to pick a secretary was to reject the first n/e candidates, then hire the first person better than all of the first n/e candidates. This gives you a 1/e (~37%) chance of picking the optimal candidate, regardless of how many secretaries you’re interviewing. You check the weather forecast and see that the rain is expected to last another 2.7 hours. So, mathematically you should wait and listen to the first hour of rain, then make a run for it.

You sit patiently in your car, waiting, listening to the rain. After an hour, you prime yourself and put a hand on the door, ready to make a run the first instant you hear the rain weaken. After another 30 minutes, you suddenly hear a lull; it’s quieter than any moment you have heard before! You rip open the door and make a dash through the Home Depot parking lot. Your timing was good; you barely get wet at all! You must have gotten lucky and chosen the moment the rain was weakest. Best of all, you applied theoretical math to your real-world situation, proving the thousands of mathematicians around the world are doing useful work.

Unfortunately, during the hour and a half you spent waiting in your car listening to the rain, the dads have purchased all the oak floorboards for their new porches! And even though the rain has no more optimal moments of weakness, one of the dads is kind enough to walk you back to your car under their umbrella. You cave and decide to order the floorboards online, happy enough with your mathematical victory to not worry about your home improvement failure.

Written by

Hi! I’m Andy. I try to make things that haven’t been made before. Check out my personal projects at

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store