Tiponomics: Analytics for Waiters

July 19th, 2010

A recent lunchtime conversation with a friend reminded me that data-mining/analytics/optimization opportunities are lurking everywhere.

It all started innocently enough. I miscalculated the tip at lunch and was about to leave a 10% tip (rather than the 20% that I was planning to) when my friend pointed out the error. He said that he had been sensitized to tip amounts by his college-age son who had done part-time/summer jobs as a restaurant waiter for several years. He went on to share fascinating examples of how his son made real-time decisions to maximize his tips.

I don’t know if waiters everywhere think this way, but my friend’s son (let’s call him Chuck) seems to have a great knack for “tiponomics”.

“These four old ladies walked in. They didn’t order any drinks. From past experience, I knew they wouldn’t be in a hurry to leave. They will occupy one of my four tables for several hours, have a small total check, and I will be lucky to get a 15% tip. I am not going to spend my time waiting on them hand and foot.”

“These two guys in suits walked in. They started off with some expensive drinks. It was clear that they were on an expense account. Also, I knew they would’t be sitting around for ever. If I really waited on them and responded quickly to every request, I knew I’d get a fat tip. So that’s where I will spend my time.”

Pretty savvy, eh?

Let’s look at this through an analytics lens.

The key decision for Chuck to make is to decide how to allocate his time and attention across tables. The objective he is trying to maximize is the total tip amount over the duration of his shift. This is determined by the number of parties that come in to dine and the tip amount from each party. The latter, in turn, is the product of the check amount and the tip %.

The number of parties that come in to dine is obviously not in Chuck’s control. But if he can “turn over” his tables more, he can serve more guests and increase his tips per shift. It is not clear to me how he can increase his table turnover short of forcing guests to leave early (which, of course, will have dire consequences for Chuck sooner or later).

The check amount is driven by the number of people in that group, whether they order drinks or not, and what else they order. While the size of the group is clearly not in Chuck’s control, he can clearly affect the order by up-selling (e.g., the gratinati isn’t bad but I’d recommend the pasta stefano) and cross-selling (e.g., wine XYZ goes really well with this entree, a raita goes very well with this biriyani). In any event, since the up and cross-selling doesn’t add much time to taking the group’s order,  there’s no time allocation decision to make – Chuck may as well do it.

The tip % is more interesting. Clearly, the more attentive and responsive Chuck is, the higher the tip %. But for the same dining experience, certain guest types may tend to tip more, others less. By data-mining historical data (“remembering past experience”), Chuck can take one look at the group and classify them as 10%/15%/25% tippers.

So can we put all this together (“Chuck’s Tips” :-) ) to help a new waiter hit the ground running?

  1. When you take the guests’ orders, suggest up-sells and cross-sells. In the beginning, get ideas for what to suggest from more experienced waiters. As your “database” grows (see below), use your own experience to produce effective suggestions.
  2. Once the order is complete, estimate what the check amount will be.
  3. From what you have seen and heard so far, classify the guest group as 10%/15%/25% tippers. Again, in the beginning, get ideas for how to classify from more experienced waiters. As your “database” grows, use your own experience.
  4. Multiply (2) and (3) to come up with “an expected tip amount” from each group.
  5. Order all your current guest groups from high to low and focus your attention on the top few groups on the list.
  6. When a new group walks in, calculate their expected tip amount (as in 1-4), insert them into the sorted list and focus your attention accordingly.

IMPORTANT: After every session, add to your “database”

  • which up-sell and cross-sell suggestions worked and which didn’t, in the context of the customer type
  • the outcomes for each dining group (both the check amount and the tip %) as well as any interesting explanatory variables that may be linked to these outcomes (e.g., businessmen in suits, Indian-American vegetarian teetotaler family :-) , five old ladies) so that your guesses become better with time.

Bon Appetit!

  • Share/Bookmark

Farewell to Martin Gardner

May 24th, 2010

I was dismayed to read this morning that one of my favorite writers of non-fiction, Martin Gardner, died over the weekend.

As a high-schooler growing up in Chennai, India, I would often go to the library that was part of the United States Consulate complex. That library, along with its British counterpart up the street, were magical places for a print-crazy teenager like me. While my friends claimed that I went there just to avoid Chennai’s sweltering heat and sit in air-conditioned effort, the nerdy truth was that I loved reading the books and magazines that regularly arrived from abroad.

That’s where I stumbled on to my first Gardner: Aha! Insight.  I had been interested in math and puzzles for a long time before I picked up that book but Gardner’s succinct, lucid writing style captivated me immediately and I started to read every Gardner I could get my hands on. In due course, I became fond of his non-mathematical writing as well and was introduced to popular American poems such as “Casey at the Bat” and “Evolution” (if you haven’t read the latter, spare 5 minutes from your busy life and read it).

Gardner’s books filled me with wonder and satisfaction. The satisfaction that one gets from solving a puzzle or from learning something neat.  I was transported to another realm. One in which the world was orderly and rational. Elegance popped up in unexpected places. Goosebumps appeared at regular intervals.

Can you ask for more from a non-fiction writer?

Farewell, Mr. Gardner. Thank you and RIP.

  • Share/Bookmark

The Ascent of Ranking Algorithms

April 19th, 2010

Algorithmic ranking is on the rise. Everywhere I turn, something or the other is being ranked analytically.

Ranking web pages based on relevance, pioneered by Google’s PageRank, maybe the best-known example of algorithmic ranking.

Also ubiquitous are ranking algorithms inside recommender systems. Given an individual’s behavior (browsing history, rating history, purchase history and so on), the idea is to rank the huge universe of things (e.g., books, movies, music) out there based on likely appeal to the individual and show the top-rankers. If you are an Amazon or Netflix customer, you have doubtless been at the receiving end of these ranked recommendations for books and movies that you may find of interest.  Plenty of complex and occasionally elegant math goes into quantifying and predicting “likely appeal” (Netflix Prize winning approach).

Despite its age, recommendation ranking is far from mature and different flavors of recommender systems are popping up every day. Just last week, BusinesWeek had a story on The Filter, a new recommendation ranking system that is allegedly leaving the other approaches in the dust (aside: One of the founders of The Filter is Peter Gabriel, legendary musician and member of Genesis, one of my favorite rock bands).

So far, I have listed “old” examples of ranking: web pages, books, movies, and music.  But  recently, I came across something new: SpotRank.

Skyhook Wireless, the company that provides location information to Apple devices (when you fire up Google Maps on your iPhone, your exact location is pinpointed using a combination of GPS information and Skyhook’s wifi database – details) announced SpotRank a few months ago.

By tracking the number of “location hits” their servers receive from Apple devices, Skyhook can determine which spots are popular and when they are popular. They capture this in the form of a popularity score and, as the name suggests, SpotRank ranks locations by their popularity score.

Next time you are in a strange part of town, have time to kill and are looking for popular spots, maybe SpotRank can help you (at least if you like hanging out with Apple fans).

Now that places are being ranked, what’s next? Ranking people?

It is already being done. Heard of UserRank?

UserRank was created by Nextjump, a NYC-based company that runs employee discount and reward programs for 90,000 corporations, organizations and affinity groups. Next Jump connects 28,000 retailers and manufacturers to the over 100 million consumers who work in the companies in its network, typically getting the merchants to offer deep discounts.

NextJump calculates a UserRank for every one of the 100m consumers in its database.

The more a user shops on our network, the higher their UserRank™ will be. Users with high UserRank™ are more likely to spend and are typically your best customers.

NextJump creates value by allowing retailers/merchants to use UserRank in offer targeting. For instance, an offer can be targeted only to consumers with a minimum UserRank.

I wonder what my UserRank is?

My final example is from the field of drug discovery. In a recent article, MIT News describes fascinating work done by researchers at MIT and Harvard on applying ranking algorithms to this area.

The drug development process typically starts with identifying a molecule that’s associated with a disease. Depending on the disease, this “target” molecule either needs to be suppressed or promoted. A drug that’s successful in treating the disease is a chemical (which, of course, is just another molecule) that suppresses or promotes the target molecule without causing bad side-effects.

How is such a drug found? Over the years, researchers have amassed a large catalog of chemicals that can help suppress or promote target molecules. From this library, drug developers find the most promising ones to use as drug candidates for further testing and clinical trials. Unfortunately,

majority of drug candidates fail — they prove to be either toxic or ineffective — in clinical trials, sometimes after hundreds of millions of dollars have been spent on them. (For every new drug that gets approved by the U.S. Food and Drug Administration, pharmaceutical companies have spent about $1 billion on research and development.) So selecting a good group of candidates at the outset is critical.

This sounds like a ranking problem: given a target molecule, rank  the chemicals in the database according to their likely effectiveness in being a viable drug for the chosen target.

The drug companies weren’t slow to recognize this, of course. They have been using machine-learning algorithms since the 90s with some success. However, the MIT-Harvard researchers showed that a

rudimentary ranking algorithm can predict drugs’ success more reliably than the algorithms currently in use.

What was the key idea?

At a general level, the new algorithm and its predecessors work in the same way. First, they’re fed data about successful and unsuccessful drug candidates. Then they try out a large variety of mathematical functions, each of which produces a numerical score for each drug candidate. Finally, they select the function whose scores most accurately predict the candidates’ actual success and failure.

The difference lies in how the algorithms measure accuracy of prediction. When older algorithms evaluate functions, they look at each score separately and ask whether it reflects the drug candidate’s success or failure. The MIT researchers’ algorithm, however, looks at scores in pairs, and asks whether the function got their order right.

(italics mine)

Rather than scoring each drug candidate in isolation and then ranking them all, the key idea was to build pairwise ranking into the construction of the matching algorithm itself.

As the data deluge gets larger and larger, finding information most relevant to one’s needs (be they mundane needs like in shopping or profound needs like in drug discovery) gets harder and harder. Perhaps this is why we are seeing ranking algorithms everywhere.

Have you seen any interesting examples of algorithmic ranking at work? Please share in the comments.

(HT to Karan Singh and Florent De Gantes for making me aware of the MIT News article and NextJump, respectively)

  • Share/Bookmark

Selling Your Home? Exploit the Price Precision Effect!

April 6th, 2010

I was leafing through a recent issue of the journal Marketing Science over the weekend and came across an article titled “The Price Precision Effect“. According to the article abstract, the authors found that, in the US residential housing market,

precise prices are judged to be smaller than round prices of similar magnitudes. For example, participants in this experiment incorrectly judged $395,425 to be smaller than $395,000.

I was intrigued! I have seen academic work on the effect of price endings, magic prices etc. in retail stores (example – behind Harvard Business Review paywall, PDF of the HBR article on Oregon State website) but I had not come across research on the psychology of price perception on big-ticket items like homes.

I delved into the details of the study that led to the finding cited above but came away disappointed.

In the study, the authors used university students in a laboratory setting, rather than actual home buyers or sellers. Further, prices were shown to the participants in such a way that each precise price-list price pair wasn’t shown to the same individual. As a result, the comparison between a precise price and its round price sibling was done indirectly across all the individuals. In short, the study setting was a bit too far from the real-world for me to take the finding seriously.

I scanned the other studies described in the article (there are five in total) and found the following in Study 5:

we collected data from actual real estate transactions and tested whether the precision or roundness of list prices influence the magnitude of the sale prices.

Actual real estate transactions. That sounded promising. What did they find?

buyers pay higher sale prices when list prices are more precise.

This is interesting and potentially useful. Just by making the list price look precise, the buyer’s willingness-to-pay goes up. How high?

consider two houses in Long Island with the same zip code and with the same number of rooms and other features; one has a list price of $485,000 and the other has a more precise list price of $484,880. Our results suggest that the house with the more precise list price will sell for about $1,200–$1,450 more.

Not huge but since the effort involved in making a price look precise is close to zero, the ROE (Return on Effort) is very high.

How exactly did the authors quantify this effect?

To assess the effect of price precision on buyer behavior, we regressed the sale price on each of our three measures of price precision.

The authors measure price precision in several different ways (e.g., number of ending zeros in the price, a 0-1 dummy variable that indicates if the price had 3 ending zeros or not) and the results are consistent across these runs.

Comfortingly, the authors controlled for a number of other variables in the regression.

We also controlled for other factors that may be correlated with both the precision of the list price and the amount of the sale price. These other factors can be broadly grouped into four categories: property-specific, agent-specific, time-specific, and market-specific.

For example, the property-specific variables included

… square footage, number of bedrooms, number of bathrooms, age of the house, as well as dummies for house style, type of heating system, etc.

The other categories were similarly represented.

Overall, I am inclined to believe this finding. While it is not an experimental study, it does use actual real-estate transactional data, carefully controls for confounding variables, and identifies an effect that doesn’t seem outlandishly large.

Best of all, it is easy to put into practice: the next time you put your home on the market, make sure the list price doesn’t have three ending zeros!

  • Share/Bookmark

Smarter Cruise Control With Analytics

March 25th, 2010

As readers of this blog know, I am always on the lookout for examples of Monday Morning Analytics in action. I stumbled on an unusual and neat example recently.

I was in Chicago last week to give a talk on analytics at Navteq, possibly the world’s largest provider of mapping data and related services. I heard that Navteq map data is used 100m times a day; for example, if you use a Garmin GPS device or a mapping application on a Nokia phone, you are using Navteq data.

I had several interesting conversations about how location data can be profitably used in a variety of contexts, especially in retailing. I heard some great examples of creative and clever location-based services that are likely to appear in the next couple of years, particularly on mobile phones (the marriage of location data with mobile phones has already produced interesting progeny like Foursquare and Gowalla). But what caught my attention was an example that had nothing to do with mobile phones. It involves the cruise-control system in trucks!

All trucks have cruise control. When a truck driver is on an interstate highway and turns on cruise control, the system maintains the desired speed, accelerating and braking as needed.

But this sort of simple cruise control mechanism is not particularly fuel-efficient. It will consume a lot of gas to accelerate up a small hill (since it is trying to be at the desired speed) and then waste all that kinetic energy by braking while coming down the hill on the other side (since it doesn’t want to exceed the desired speed).

So far so good. Then, somebody, somewhere asked this question:

“Most trucks have GPS with the underlying map database on-board. From the map data, we know what’s ahead on the road. We know the ups-and-downs of the terrain and curves in the road. Why can’t we use this knowledge of what lies ahead to make the cruise control smarter?”

Brilliant!

They acted on this insight and created a smarter cruise-control system with “analytics inside”. This system uses the detailed map data to accelerate and brake in such a way that fuel consumption is minimized. When a hill is approaching, the system will not accelerate as much as before since it knows it will be going downhill soon and will have plenty of kinetic energy to hit the desired speed. When a curve is approaching, the system will take its foot off the gas pedal and slow down rather than wait for the driver to hit the brakes (this, of course, is a great safety feature as well).

I don’t have data on the number of miles traveled annually by freight trucks but I am sure it is not a small number. Making those trucks a tad more fuel-efficient is certain to have a big positive impact on both operating costs and the environment.

In my opinion, this is a neat example of Monday Morning Analytics. The system uses data to make a better decision (as opposed to simply identifying an “insight”). In fact, it goes one step further since it executes the better decision automatically without consulting the human decision-maker.

All the key ingredients of a modern decision-support system are present:

  • data: the truck’s precise location (thanks to the GPS) and the detailed map data. Note that simple map data isn’t enough. The data needs to include features such as terrain, road curves etc. Navteq has developed very cool technology to collect all this information and more.
  • prediction: the detailed map data is used to “predict” what lies ahead. Strictly speaking, they are not predicting as much as looking up the relevant data but the notion of using map data from the immediate horizon of the truck to project fuel-consumption and how it changes with different accelerate/brake decisions feels like predictive modeling.
  • optimization: the system finds the set of accelerate/brake/coast decisions that minimize fuel consumption while honoring the driver’s desired speed constraint. Textbook definition of optimization.

Nicely done!

  • Share/Bookmark