2
$\begingroup$

The following is a worked example found in past papers of my university, but haven't been able to figure out to solve it (I have the answer, but do not understand how to get there). Any help in enlightening me would be much appreciated.

A store sells on average four computers a day. Once every fourteen days the store's stock is replenished with 60 computers. The store is closed one day per week. One day you come into the store and there are no computers available. What is the expected waiting time measured in opening days until there are new computers in stock? (Assume that the probability of waiting more than four days is zero.)

First we find the probability that the waiting time is 1, 2, 3 or 4 days. To this end we define $T$ as number of days that we wait and $X\sim \text{Pois}(4)$ as number of sold computers until day $12-T$, i.e. if we wait one day $X=11$. The probability that we have sold $60$ computers before day 11 is given by $\Pr(X>60|\lambda t=44)=0.00875$. The corresponding probabilities for $T=2$ is 0.001201, for $T=3$ it is 9.125e-05, and for $T=4$ it is 3.307e-06.

The solution given goes on to provide the probalities of $\Pr(T|T>0)$, before it gives the answer by $E(T)=1\cdot 0.8719+2\cdot 0.1196+3\cdot 0.0091+4\cdot 0.0003=1.1387$. I however do not seem to understand why and how it comes to these numbers. Any help in this regard would be much appreciated.

Many thanks in advance.

$\endgroup$

1 Answer 1

1
$\begingroup$

I think there may be an error in the worked example, but the numbers are fairly clear:

You have a process where the shop starts with a stock of $60$, and over $12$ opening days sells at an average rate of $4$ a day, so over $d$ days sells an average of $4d$. So this leads to your Poisson calculation: it will be out of stock after $d$ days with probability $P_d=\Pr(X \ge 60|\lambda = 4d) = \displaystyle \sum_{j=60}^{\infty} e^{-4d}\frac{(4d)^{j}}{j!}=1-\sum_{j=0}^{59} e^{-4d}\frac{(4d)^{j}}{j!}.$ This gives $P_{11}$, $P_{10}$, $P_{9}$, $P_{8}$ as about $0.01253479$, $0.001879629$, $0.0001578351$, $0.000006406888$. The worked example in fact uses $X \gt 60$ rather than $X \ge 60$, which changes the numbers slightly to $0.008750118$, $0.001200979$, $0.00009125053$, $0.000003306611$.

So you have $P_{11}, P_{10}, P_{9}, P_{8}$ as stated for the probability of being sold out with $1,2,3,4$ opening days to go. You could have gone in for any of these with equal prior probability. But conditioned on them being sold out, the posterior probability of for example being sold out with three days to go is $\frac{\frac14 P_9}{\frac14 P_{11}+ \frac14 P_{10}+ \frac14 P_{9}+ \frac14 P_{8}}$ and similarly for the others.

The expected number of days you would need to wait conditioned on them being sold out is the sum of the number of days to wait multiplied by the conditional probabilities of having to wait those number of days.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.