Normal Distribution and Cofffee For my homework I have this question:


*

*A coffee vending machine automatically pours different types of coffee into cups. The amount of coffee dispensed is modeled by a normal distribution with mean 120 ml and standard deviation of 8.3 ml.


*

*If cups with a capacity of 130 ml are used, what is the probability that a cup overflows? 

*If the machine is loaded with 500 of these cups, how many of these do you expect to overflow?

*The data also shows that the machine successfully dispenses a cup 99% of the times it is used. Mr. Li uses the machine twice a day and pays 2 yuan each time. How many days is he likely to use the machine before he can expect to lose more than 5 yuan due to error in dispensing of the cups.




I have been able to solve 1 (0.114) and 2 (57 cups), but, I have problems with the third part. I know that the answer is 125 from my  textbook, but I cannot find any logical reason relating to probabilty or statistics that could let me get to that answer. Even my teacher is stumped. The best I have so far is that we know that it is only possible for him to loose more than 5 yuan, if he gets at least 3 flawed cups out of the 500. The worst case scenario would be that he gets two on the first day, and one on the next, meaning that he lost 6 yuan. The best case scenario would be that this happens on the 248th and 250th day (the last two days). And then, finding the median of 2 and 248 gives us 125. But, I confess I really don't see how this is connected to probability. Any help?   
 A: The wording for the third part of the question is somewhat unclear.  One way to interpret it is to ask what is the expected number of days that Mr. Li will use the machine, if he uses it twice a day every day, until he observes the third dispensing failure (and therefore lose 6 yuan, which is the first instance he loses more than 5 yuan).  Under this interpretation, we assume that the success of each purchase is an independent and identically distributed Bernoulli trial with probability of success $p = 0.99$.  Then the random number of purchases $X$ until the observation of the third failure is a negative binomial random variable:  $$\Pr[X = k] = \binom{k-1}{r-1} (1-p)^r p^{k-r}, \quad k = r, r+1, r+2, \ldots,$$ where $r = 3$ is the number of failures we need to observe.  It is not hard to demonstrate that $$\operatorname{E}[X] = \frac{r}{1-p} = 300.$$  Thus the expected number of days until the third dispensing failure should be $150$.
The vagueness of the wording arises from the phrase "How many days is he likely to use the machine before he can expect to lose more than 5 yuan..." this is problematic because it seems to imply two expected values, not one:  an expected value of a time-to-event random variable, but also an expected value of a loss random variable.  This is unclear to me, so I interpreted the question in a way that chose the former:  the criterion for observing the event of interest is fixed, and we are interested in the expected value of the time to that event.
