2
$\begingroup$

This is actually a quiz that will be needed in a real life food stall! I need to decide how much stock to supply for my pumpkin soup stall. I sell each soup for $5$ dollars a cup, and let's say my ingredients cost is $1$ dollar. Therefore an outcome of under-forecasting is $4$ dollars per unit, while an outcome of over-forecasting is 1 dollar per unit.

My forecast isn't so simple, however. I'm guessing that the most probable number of sales is $150$ units, but I'm very unsure, so there's a normal distribution behind this prediction with a standard deviation of $30$ units. This is harder than I expected.

Intuitively I would prepare ingredients for $180$ units, at which point I'd guess that the likely opportunity costs that would come with understocking would roughly meet the likely costs of overstocking. But given this is such a common dilemma, I thought that someone must be able to find a precise solution, and would then hopefully be able to explain it in layman's terms.

4 Answers 4

1

If you get supplies for $n$ bowls and there are $m$ customers, your profit is $p=\begin {cases} 4n \text{ if } n \le m \\ 5m-n \text{ if } n \gt m \end {cases}$

The expectation of the profit is then $\sum pP(m)$ where $P(m)$ is the probability distribution of the number of customers. Unfortunately, the normal distribution is not normal-real life distributions usually have much longer tails. In this case, you probably have greater than one chance in 3 million of being too sick that day and not selling anything.

That aside, your intuition that you should err on the side of having too much is correct. If you take the expected profit of preparing $n+1$ bowls and subtract the expected profit of preparing $n$ bowls, the difference is $p(n+1)-p(n)=4\sum_{m \gt n}P(m)-\sum_{m\le n}P(m)$. If you know (or have a guess at) $P(m)$ you can goal seek this in Excel or use your favorite 1D rootfinder to solve this.

6

As it turns out, the solution to this problem is known. Say that your profit on each cup of soup you sell is $\pi$ -- in your case, 4 dollars -- and your loss if you make a cup of soup but don't sell it is $\lambda$ -- in you case, 1 dollar. Let $Y$ be the distribution of demand.

Then in order to maximize your expected profit, you should make $y$ cups, where $y$ is the least integer such that $P(Y \le y) \ge \pi/(\lambda + \pi)$. You can obtain this by analyzing the equation Ross Millikan gives in his comment. In particular if $\pi > \lambda$, as in your case, you want to stock more than the median demand, since unsold stock is relatively cheap. In your case $\pi/(\lambda + \pi) = 4/(1+4) = 0.8$, so you want to stock an amount that will meet demand 80 percent of the time.

Proving that this is the right formula is a bit tedious. But here's an explanation that may help. Let's ask the question: is it better to stock to meet the demand 80 percent of the time, or to stock $x$ more and therefore have enough to meet the demand 81 percent? Well, (100-81)% of the time the demand is above what you stock in the second case, and so you sell $x$ more cups for an extra profit of $4x$. But 80% of the time this just results in your overstock being slightly bigger, and so you lose $x$. So on average, slightly increasing your stock costs you $4x(.19)-x(.80) = -0.04x$. The same is true if you compare stocking at the 80th percentile to stocking at the 79th percentile.

I don't know if this goes under some standard name -- I recently learned this from a problem in Probability by Jim Pitman (specifically, this is problem 3.2.15(b)).

So in your case you want the 80th percentile of the distribution; for a normal distribution this will be about $0.85$ standard deviations above the mean, or about $175$ with the numbers you gave. Of course there is no reason to expect the distribution to be normal, or for the standard deviation to be 30. But a useful rule of thumb here could be that you want to stock in such a way that you sell out one time out of every five, and you can find that point by experimenting.

6

If you know the underlying probability distribution exactly, then you can solve for the supply quantity exactly.

For instance, in your problem, let $D$ be the demand per day, and $D$ has some distribution say $f_D$ with mean $\mu$ and variance $\sigma^2$. You want to find supply quantity say $Q$ such that the expected profit is maximized. Let the cost of ingredients be $a$ and the cost at which you sell be $b$.

Your profit is $\begin{align} (b-a) Q \text{ if } D>Q \\ (b-a)D - a(Q-D) \text{ if } D

Hence, the expected profit is $P(Q) = \int_{y\leq Q} (b-a)Q f_D(y)dy + \int_{y>Q} (by-aQ)f_D(y) dy $

P'(Q) = (b-a) \int_{y \leq Q} f_D(y) dy + (b-a)Qf_D(Q) - bQf_D(Q) - a \int_{y>Q}f_D(y) dy + aQf_D(Q)

P'(Q) = (b-a) \int_{y \leq Q} f_D(y) dy - a\int_{y>Q}f_D(y) dy

Setting P'(Q) = 0 gives us $Q$ such that $(b-a) \int_{y \leq Q} f_D(y) dy = a \int_{y>Q}f_D(y) dy$

Hence, $Q$ corresponds to the $100 \times (1-\frac{a}{b})$ percentile of the distribution function.

In your problem, $a=1$, $b=5$ and you are assuming a normal distribution with mean $\mu=150$ and $\sigma = 30$

The $80^{th}$ percentile for a standard normal distribution corresponds to $z = 0.84162$.

This implies $\frac{Q-\mu}{D} = 0.84162 \Rightarrow Q = \mu + 0.84162 \sigma \approx 175$

However, most often in practical situation like these the difficult part is to find out underlying probability distribution function. A good way would be to monitor the number of customers over a month or so and then see what distribution fits it best or if there is any trend i.e. a weekly trend. It is possible that during weekends, your mean might be higher. So you can have a separate distribution for weekends and a separate one for weekdays.

EDIT: The idea is same as Ross and Michael have already posted. This just works out the idea in detail and proves why you need the $80^{th}$ percentile for you problem.

2

This appears to be an instance of the Newsvendor Model. If the probability distribution of your demand is known, a (more-or-less) closed-form solution exists in terms of your costs and profit.