The house my wife and I live in was recently sold, and so we have started looking for another apartment. Our current lease expires in a year and a half, and so we decided that, given how challenging the rental market is in NYC, that we should start looking right away. We also decided, somewhat arbitrarily, that we would attempt to find an apartment in the next six months, if only because we knew we would get sick of looking pretty quickly.

During the first 5 weeks of our apartment hunt, we found five apartments that we thought were worth looking at. Over six months, I extrapolated that we would get to see about 26 apartments that would satisfy our requirements. What we discovered, with each apartment, is that we basically got to see the apartment and then pretty much decide immediately if we wanted to apply to rent the apartment or not.

It turns out that there is a nifty mathematical algorithm that one can use to optimize one's chances at picking the best apartment possible. We expect to have 26 apartments to look at, each of which we inspect and then either accept or reject immediately, and we want to optimize our chances of picking the best apartment possible, from the 26 that meet our minimum criteria. This exactly matches a solved problem in mathematics; **the Secretary Problem**.

In the Secretary Problem, where one has to decide on the best applicant between n randomly ordered applications, an optimal solution is to reject the first n/**e** applicants, and then accept the next applicant that is better than any applicant you have seen before. The proof of **this particular solution is here**. I couldn't reproduce this proof if asked, and there are details in it which are fuzzy for me, but I am pretty sure I understand why it works. Informally, the first n/e applicants act as a sampling space, and this gives you information on how good applicants will be, and that n/e happens to be where you achieve an optimal amount of information on applicant strength, allowing you to make the best determination you can of which next applicant to choose, without raising the probability too high that you've already rejected the best applicant.

For our specific apartment hunting problem, with 26 total apartments to view, 26/e (**e** ≈ 2.71828) ≈ 9.6 ≈ 10 apartments. So, my wife and I looked at 10 different apartments, and while we did this, I informally ranked the apartments based on the criteria my wife and I agreed were important to think about (space, apartment lay-out, cost, location, quality of neighbourhood school, commute time). The 11th apartment either she or I looked was superior in many ways on all of these criteria than any of the others we had looked at, so I whole-heartedly threw in my support for it, knowing that this specific apartment is most likely to be the best apartment we will see.

We've submitted an (overly lengthy) application for the apartment. Wish us luck.

Newsletter:

David is a Formative Assessment Specialist for Mathematics at **New Visions for Public Schools** in NYC. He has been teaching since 2002, and has worked in Brooklyn, London, Bangkok, and Vancouver before moving back to the United States. He has his **Masters degree in Educational Technology from UBC**, and is the **co-author of a mathematics textbook**. He has been published in **ISTE's Leading and Learning**, **Educational Technology Solutions**, **The Software Developers Journal**, **The Bangkok Post** and **Edutopia**. He blogs with the **Cooperative Catalyst**, and is the **Assessment group facilitator for Edutopia**. He has also helped organize the first **Edcamp in Canada**, and **TEDxKIDS@BC**.

- Creating a WiiMote interactive white board at my school for under $50.
- 20 reasons not to use a one to one laptop program in your school (and some solutions)
- For whom are Interactive White boards Interactive?
- Forget the future: Here's the textbook I want now
- What is Edcamp?
- Mathematics education blogs
- There are no aha moments
- Why educators should blog: A helpful flowchart
- Eight Videos to Help Teachers Get Started Using Twitter
- 15 things kids can do instead of homework
- Paper use in schools
- Online Geogebra training
- What is The Effect of Technology Training for Teachers on Student Achievement?
- Using Google forms for a "Choose your own adventure" style story
- The difference between instrumental and relational understanding
- Ways to use technology in math class
- Reflection of our course discussion about the use of technology in the classroom
- I don't know how to use a fax machine
- A Restitution Guide to Classroom Management
- Why teach math?
- Free tools for math education
- 25 Myths About Homework
- The Role of Immediacy of Feedback in Student Learning
- A Fundamental Flaw in Math Education
- Migrating away from Google Reader

**Subscribe** to my blog

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer

## Comments

## Poor selection of cutoff

Your choice of the 1/e cutoff gives you the highest probability of selecting the best apartment, but also a significant probability of getting stuck with the last apartment which will be of effectively random quality.

You should have used a sqrt(n) cutoff to maximize your expected apartment quality: https://en.wikipedia.org/wiki/Secretary_problem#Cardinal_payoff_variant

## Interestingly enough, in this

Interestingly enough, in this case, I would have ended up with an apartment that would not be as good as the one I have, since we saw two apartments in the last five that I would have ranked overall #2 and #3 respectively. You are right though, I would much rather choose a better apartment than a worse one, and would not like to get stuck with a horrible one because we ran out of time.

On the other hand, my choice of 26 apartments is probably somewhat arbitrary since we actually have a year and a half to find our apartment and are merely limiting our search time for practical reasons. Maybe n in this case is really more like 80, in which case my choice of stopping value is better, if still not optimal according to this other variant.

## Interesting! But why the 11th?

Very interesting stuff! But can you explain something to me? Essentially, the 10 apartments represented a sample size large enough to get a range of best and worst apartments that will be possible. So taking the next available apartment that is above that range is ideal, and the chances of going above that are minimal. I get that, assuming I didn't misinterpret it. But what I don't understand is why the 11th happened to be that one that was superior. Why wouldn't have been simply the next apartment better than all the 10, which could have been any of the next 16 apartments? I guess I don't understand how the 11th won out, unless it just happened to be better than the previous 10...

## You're right, I could have

You're right, I could have chosen any of the remaining 16 apartments, but as it turned out, the 1st of those 16 apartments ended up being superior to any we had seen before, and so, following the original variant of the algorithm, I stopped looking. Note at this point, I still had to convince my wife we had made the right choice, but given we had seen 10 apartments already, this wasn't that hard to do.

## Typo

Hi David. There seems to be a typo here. The S.P. has you reject the first n/e applications, and then accept the next one to be superior to

allthe previous applications, notany.## Doesn't "any of the other

Doesn't "any of the other previous candidates" = all?

## Any/All

I thought about it and the confusion comes in the ambiguity of the word "any."

Youmean: "there isn'tanypreviously-reviewed candidate who is better."Iread: "the candidate is better thananyone of the already-reviewed candidates." (So this new candidate could be second-worst of them all.)## Add new comment