Thursday, March 10, 2005

Doing Lines

You’re at the grocery store, and you’ve just finished filling your cart with goodies. As you approach the check-out area, you see there’s a line at every counter. Which line do you join?

You might first decide to join the shortest line. If other customers tend to follow the same policy, the equilibrium outcome is equalization of customers per line. No line should differ from another by more than one customer. And note that this outcome will occur even if some customers choose randomly, so long as the number of customers who join the shortest line is sufficiently large. If random customers make some lines longer than others, the non-random customers will avoid the long lines and fill up the shorter lines until the lines are equalized.

But perhaps customers are more sophisticated. They might look into other customers’ carts to see how many items they’re buying, and then join the line with the smallest total number of items to be bought. The resulting equilibrium would involve equalization of items per line. And again, the predicted outcome occurs so long as a large enough number of customers pay attention to the number of items per line.

If customers are yet more sophisticated, they’ll realize that both number of customers and number of items matter. Every item requires one scan; every customer requires one payment phase. Given two lines with equal numbers of items, you’d prefer the line with a smaller number of customers (with more items each). Suppose that a payment phase takes m times as long as an item scan. Then in equilibrium, we should expect equalization across lines of the time function
T = i + mc
where i is the number of items and c the number of customers.

But there’s one more factor that matters: cashier speed. Let’s suppose customers know the speeds of the cashiers. Then if we let s stand for a given cashier’s speed, equilibrium implies equalization across lines of the time function
T = [i + mc]/s
This function assumes that, while cashiers may have different speeds, each cashier has the same ratio (m) of scanning speed to payment speed. Again, not all customers need to pay attention to this function for the equilibrium to occur, so long as enough customers do.

In all four cases, the interesting result is that you – the marginal customer – can probably do just fine without paying attention. Why? Because other customers’ behavior has already done the job of (nearly) equalizing the expected waiting time. If few or no other customers paid attention, then you could probably shorten your waiting time by looking around for the best line. But my experience is that, by the time I arrive at the front of a crowded grocery store, I might as well pick a line randomly.

Of course, most customers don’t typically know the relative speeds of cashiers, unless they happen to visit this grocery store a lot. I surmise that the number of such customers is not very large, and as a result, the actual equilibrium principle at work is probably closer to the second-to-last one (equalization of T = i + mc across lines), rather than the more complex one based on cashier speed. Still, as just another ignorant customer, your odds of shortening your waiting time are pretty low. Although some lines have shorter waiting time than others, you don’t know which ones. To improve your expected (ex ante) outcome, you’d have to know something the other customers didn’t – like the fact that cashier #3 has arthritis. And as soon as enough other customers knew it, too, the information would cease to be useful for shortening your waiting time.

An example. Suppose there are two cashiers, cashier #1 is 1.5 times faster than cashier #2, and all customers have the same number of items. Then to minimize the true waiting time, for every 10 customers, 6 should be in lane #1 and 4 in lane #2. But what if some customers don’t know about the fast cashier, so they choose the shorter line instead? These customers will keep choosing line #2 until the line lengths are equalized. However, customers “in the know” will then flock in greater numbers to line #1. If at least 6 out of 10 customers know about the fast cashier, we’ll end up with 6 customers in lane #1 and 4 in lane #2. And everyone’s waiting time will be about the same, whether they’re “in the know” or not.

But what if fewer than 6 in 10 customers know about the faster cashier? All those who do know will go to lane #1. The ignorant customers will then fill out the lines to the equalization point (5 and 5). As a result, any new customer who knows about the faster cashier can get a shorter waiting time by quickly sizing up the situation and choosing lane #1. Information only makes a difference if the number of people who have it is small.

If all of the above made sense to you, you’re well on your way to understanding the efficient capital markets hypothesis (read this for more).

9 comments:

Anonymous said...

There are two more factors that also need to be considered.

One is the cost of making the decision. This is a cost that is routinely - and, in my opinion, catastrophically - left out of economic theory. I am coming to conclude that the decision cost (i.e. the cognitive load) usually overwhelms the opportunity for rational optimization of decisions, especially when those decisions are trivial. You touch on this when you mention that you don't "have to" choose rationally because "other people" do it for you. Well, guess what - everyone else has a lot on their minds, too, and I don't think we can count on their rationality!

The gap between rational behavior and actual behavior starts to make a lot more sense when you consider that most economists hugely and chronically overestimate the ability of individual actors to handle the volume of rational decision making needed to get through everyday tasks. Thinking is an extremely expensive activity, far more than I've EVER seen acknowledged in a model of this type.

The second factor is the stochastic effect of random arrival times. In a modelling and simulation class I took some time ago, we spent a good while on queueing theory. It turns out that, in many cases, having individual lines is a disaster. (Why this is done in grocery stores, I have no idea.) Instead, the banking model, where there is a single queue and the first person in line goes to the next available teller, works much better at reducing the variance of waiting times.

-Tony

Glen Whitman said...

Tony -- I basically agree with everything you said. I don't see recognizing decision costs or "cognitive load" as a challenge to rational-choice modeling, but as a supplement to it -- another kind of search cost. That said, in this case the costs are relatively low for the first two kinds of line selection. You can very quickly scan the lines to see which ones are longest, and you probably do it without even thinking. Taking even just a few seconds more usually reveals a loose estimate of the number of items per line.

And yes, arrival times matter, but I decided to leave out that particular complication. I agree that the bank-line model makes the most sense, though it also requires a different structuring of space that may be difficult to accomplish with grocery carts.

Anonymous said...

You left out the age/garrulity factor! Given a choice between getting behind a long line of young bachelors, or a short line of lonely retirees, the smart choice (per Apu of the Simpsons) is to get in the longer line. The bachelors want to pay and leave. The oldsters want to talk...and talk and talk...:-)

Jason B.

David said...

We're also assuming that it takes a uniform amount of time to input items, which isn't true. A 24 pack of Diet Coke takes more time to scan than a candy bar (takes longer to find the bar code, more awkward to handle). Some fruits have to be weighed. Thus "i" should be equal to sum of i's multiplied by their respective times for the scan.

Of course, if I have 4 cases of Diet Coke (which often happens), they use the quantity key so it acts like a single item. So certain redundent items need to be subtracted from the sumation.

Anonymous said...

damn! all this time i've been doing a detailed assessment of the situation using all the factors you've mentioned plus the age & garrulity of checker and customer, plus a calculation about which of the people in line are with others (i.e., not separate customers but tagging along with a paying customer). once i've sized all that up, i have to look at the self-checkout line and do a similar analysis (substituting garrulity of customer with lameness of customer in scanning, bagging, paying, and whether the customer has items that must be typed in)...then i decide where to go. now come to find out i'm probably wasting my time if you don't factor in the slight increase in my self-esteem because i feel like i've made the right decision. bargain shoppers will also recognize this as the feeling you get when you buy something on sale but you know it's worth so much more.

//dgm

Ben said...

"Information only makes a difference if the number of people who have it is small."

I think this model has good lessons in speculating about the market. I believe that the important practical lesson here is that going in the 8 items or less line, seems to be an obvious way to speedup your checkout but it might not help that much because everyone knows about it and will tend to pile-up at that cashier. This is analogous to investing in a company that is obviously profitable. Knowing that a company is profitable (or not) isn't very advantageous if it is obvious and everyone can figure it out. Like I always say, you have to find a company that you know everything about, one that is in your field of expertise, a company in which it is hard for the general public to predict profitability because they lack the technical expertise and they don't understand the hurdles that it could face or the value of its technology. Use your own expertise to outsmart the public and determine if the price of the stocks are too high or too low. It is the best way to speculate.

Ben said...

"Information only makes a difference if the number of people who have it is small."

I think this model has good lessons in speculating about the market. I believe that the important practical lesson here is that going in the 8 items or less line, seems to be an obvious way to speedup your checkout but it might not help that much because everyone knows about it and will tend to pile-up at that cashier. This is analogous to investing in a company that is obviously profitable. Knowing that a company is profitable (or not) isn't very advantageous if it is obvious and everyone can figure it out. Like I always say, you have to find a company that you know everything about, one that is in your field of expertise, a company in which it is hard for the general public to predict profitability because they lack the technical expertise and they don't understand the hurdles that it could face or the value of its technology. Use your own expertise to outsmart the public and determine if the price of the stocks are too high or too low. It is the best way to speculate.

William said...
This comment has been removed by a blog administrator.
teedyay said...

I've tried making estimates based on most of these methods in the past, but found I always ended up waiting longer than I wanted to, which is really the important thing.

Now I just pick the line with the cutest checkout girl.