42

Antworten zum Universum

September 10th, 2009 at 9:59 am

Which Line To Choose At Supermarket Checkouts

A Pareto Optimal Choice

Wait, wait, wait!! Before you go “again, Chewxy blogging about his groceries pattern”, this is not about MY groceries. But yes, you’d guess right, I’m going to talk about some economics in this one.

The reason for this blog is because I read Dan Meyer’s blog article about optimizing queues in, well, a supermarket. Of course Dan’s blog is more interesting, because he went out and collected empirical data on queues.

Well, me being me, and having insomnia (and desperately needing to do something about my I’m-so-lazy funk), I hacked up a simulator to find out how to choose the best line.

I made 3 types of shoppers: the Random Walk shopper, the Smart shopper and the Even Smarter shopper. This is how they choose their lines:

  • The Random Walk shopper randomly chooses a checkout line. He doesn’t care about how many people are there or how many items are there in the line
  • The Smart shopper chooses the shortest line. He doesn’t care about how many items each person has in the line
  • The Even Smarter shopper looks at each line. He randomly picks 3 or less shoppers in each line and gauges their number of items, then chooses the line with what he thinks has the least number of queuers with the least number of items. I think this heuristic is realistic (woo that rhymes), because humans cannot possibly have perfect knowledge.

I assume that all goods take the same time to scan, which takes 1 second. Which is what Dan himself assumed. Of course, he also assumed perfect information, which I didn’t. And because I don’t assume perfect knowledge, this exercise to find the best queue to be in is done by means of iterative simulation, as opposed to just finding the minima of each session.

So, I start off by generating randomly a population of 5 lanes, each with different numbers of people lining up, and each person lining up has different numbers of goods. I ran this 1000 times, and this was the results:

  • Random Walk Shopper mean:158.05s; median: 120
  • Smart Shopper mean: 165.327s; median: 125
  • Even Smarter Shopper average: 158.93s; median: 125

These are the distribution graphs

Even Smarter

Randomwalker

Smartwalker

Since the distributions of time spent is far from normal (which is surprising, because even the random walk one isn’t as normally distributed as I thought it’d be1), chi-squared tests of significance is thrown out of the window2. But needless to say, the means and medians of the three walkers are very close. If they were normally distributed, I’d say that the results between the Even Smarter shopper and the Random Walker shopper are not different from one another on a 90% significance level3.

Which brings me to the “Pareto” part of the title.  If you can do no better than to randomly walk into a queue, why bother choosing a queue? I think, it was Tim Harford in his book, the Undercover Economist, that also mentioned this. He likened a random walk down wall street (geddit, geddit?) as looking for the shortest queue. Sure, you can look, and you can have some degree of success, but choosing stocks in the stock market is the same as walking about looking for the shortest queue.

I ran the script a couple of times, and found that (assuming that it’s normally distributed), the Random Walk shopper is pareto optimal – i.e. this method of choosing lines will make you no worse off.  And I think you’ll find these results to be true in real life too, especially when it comes to ordering food at a fast food place. In fact I blogged about this yonks ago - about when I went to Hungry Jack’s in the middle of the night.

In a place like a fast food eatery, there are no signals for you, unlike in a supermarket. Of course, as the comments in Dan’s blog goes, there are other variables that come into play, like how chatty a person is (I usually keep my head down and mumble to myself when I find a cheery checkout girl, because I’m a mood dampener like that).

So what’s the best line to be at? The answer: be random. It won’t make a difference. And when in doubt, hedge your bets by diversifying.

Edit: some stuff about pareto optimality. I clearly wasn’t thinking when I wrote this

  1. Nicholas Nassim Taleb would be eating his heart out on this one []
  2. you can only do chi-squared tests when the distribution looks kinda normally distributed []
  3. its simple actually, because we take every second to be significantly different, how significantly different then lies in the numbers after the decimal []

Cool? DiggDel.icio.usTechnoratiFeedsterFurl
RSS feed for comments on this post
 |  TrackBack URI for this post

 

RSS feed for comments on this post | TrackBack URI