It's a problem that plagues nearly all companies that sell goods: the dual questions of how many items to produce, and how much to charge for them. In a world where customer demand is unpredictable and buying behavior can be tweaked in strange ways - even in response to slight pricing changes - how do you find that sweet spot where quantity and price are aligned just right to produce maximum profits?

A new Stanford study provides a mathematical model, applicable to a number of situations, for easily finding the optimal price and quantity. The model's strength is that it can take real-world consumer behavior into account to a greater degree than before. The study shows that the kind of simplistic assumptions about demand uncertainty used in earlier models can lead to substantially lower profits.

The new approach takes it in stride when consumers respond in jumpy ways to differences in price. At $10, customers buying a picture frame may tend to act in one way, while at $10.50 suddenly a large group of them might be lost. Then you might not get another reaction until it gets up to $12," explains coauthor Evan Porteus, the Sanwa Bank, Limited, Professor at the Graduate School of Business.

The model "allows you to check out all the 'profit hills' related to each particular price-quantity combination — low price/high quantity, high price/low quantity, and everything in between — and figure out which hill is the highest," he says. "The approach is not elegant, but it guarantees that the highest hill can be found."

The new mechanism, developed by Porteus and Gal Raz, PhD '03, assistant professor at the Australian Graduate School of Management, is based on the "price-setting newsvendor problem." At its simplest level, this describes the situation facing the person who has to figure out how many newspapers to stock on her wagon, knowing that she'll have to eat the cost of any unsold papers at the end of the day.

A savvy newsvendor would first estimate how many papers she could sell that day, not how many she would sell, because the latter depends on how many she puts in her wagon. She understands the difference between demand, which is how many she could sell if she had enough, and (actual unit) sales, which equals demand if she does have enough but is limited to the number that she stocked, if she doesn't. Her estimate is not a number but a probability distribution, which, for each possible number of papers she might stock, gives the probability that she will sell them all. She relies on her statistical training to estimate this distribution.

In its simplest form, it consists of two numbers, the mean and the standard deviation, and she assumes that the distribution is bell shaped. (The mean is the center of the bell, namely, the expected amount. The standard deviation measures how spread out the bell is and indicates how much uncertainty there is.) In reality, were the newsvendor to take into account econometric factors in the current economy, changing demographics, predicted weather, day of the year, and so forth, such a distribution might not be close to bell shaped. If she stocks too much, she is out the cost of unsold papers. If she stocks too little, she misses the opportunity to sell more. The smart vendor, then, will stock the amount that balances these costs with the probabilities. For example, if the cost of a paper goes up, she will stock less.

Sounds complicated enough, but, alas, quantity is not the only issue at hand — pricing is also important. How would customers respond if she sold a paper at $1 versus $1.50 or $2? Getting a headache?

Let's look at that distribution curve again, which plots the probability that any given amount of papers will be sold out in a day. The most important elements of a distribution are the mean and the standard deviation. Traditional theory assumes that if you plotted the mean on the vertical axis and price on the horizontal axis, the result would be downward sloping, and would get steeper as the price got larger. That is, each possible increase in the price by a penny would lose a larger number of customers. It also assumes that a similar plot of the standard deviation would be a straight line. That is, each price increase of a penny would decrease the variability by the same amount.

In reality, however, the mean and variability in customer's buying behavior looks different at different price points, and they move in slopes and curves, not in linear harmony with the rise and fall of the price. In the example mentioned earlier, where customers respond differently to a picture frame priced at, say, $10, $10.50, and $12, the plot of the mean would be nearly flat around $10, then steep around $10.50, followed by flat again. The new model allows one to see where the optimal price/quantity point falls.

The researchers' model points to potentially new avenues by which manufacturers and retailers may gain competitive advantage. "In most organizations, pricing is usually done by marketing, and quantity is usually decided on by operations," Porteus says. "There are cases where those two functions have not been coordinated very well. Marketing might put something on sale, but manufacturing is not informed and doesn't make enough product, which leads to a shortage." Such shortages spell missed revenue opportunities. Their perspective offers a vehicle for better collaboration between the operations, purchasing, and sales functions within organizations.

It may be a while, however, before the rubber of their theory meets the road of real-world businesses. "Unlike finance, where theory and practice are closely linked, operations is a field that has chronically suffered from a disconnect between academic breakthroughs and their application," Porteus says. "There's no company eating up research results like this to provide software tools that will recommend starting points for pricing and quantity."

But now that the information is there, the technology will hopefully follow. For any computer whiz, then, opportunity may be in the offing.

Meanwhile, their work is hardly languishing on the hard drive. The new model has provided an opening for future research, particularly in the area of supply chain contracts. They are now applying such analysis to questions such as how suppliers should price in complex situations where mechanisms such as revenue sharing and buybacks are in place. "Our model allows for much more realistic assessments than before," Porteus says.