You own an ice-cream shop. Every day when you open the shop, there is an $\text{Exp}(\frac{1}{10})$ random waiting time, in minutes, before the first customer arrives.
- When the waiting time for the first customer exceeds 20 minutes, it is a bad day. Approximate the probability that you will have between 50 and 60 bad days in a year (365 days).
- When the waiting time for the first customer is shorter than 3 seconds (i.e., 0.05 minutes), it is a great day. Approximate the probability that you will have exactly 3 great days in a year (365 days).
My Attempt
- The probability of waiting over 20 minutes is $$\mathbb{P}(X\geq20)=\int^\infty_{20}0.1e^{-0.1x}dx=[e^{-0.1x}]^\infty_{20}=e^{-2}\approx0.135$$ Then since $np(1-p)=365(0.135)(1-0.135)=42.7>10$, we can use the normal distribution to apprimate the probability. The expectation for an exponential distribution is $\frac{1}{\lambda}=\frac{1}{1/10}=10$. Thus $$\mathbb{P}(50\leq x\leq60)=\mathbb{P}(a\leq\frac{x-\mathbb{E}[x]}{\sqrt{\text{Var}(x)}}\leq b)$$ $$=\mathbb{P}(\frac{50-10}{\sqrt{\text{Var}(x)}}\leq\frac{x-\mathbb{E}[X]}{\sqrt{\text{Var}(x)}}\leq\frac{60-10}{\sqrt{\text{Var}(x)}})\approx \Phi(\frac{50}{\sqrt{\text{Var}(x)}})-\Phi(\frac{40}{\sqrt{\text{Var}(x)}})$$ The part that I am having trouble with is how to find the variance for the exponential distribution. Can I get some pointers?
Edit I think I know how to find the variance now. I got Var[X]=E[$X^2$]-E[X]=200-10=190. So $$\Phi(\frac{50}{\sqrt{190}})-\Phi(\frac{40}{\sqrt{190}})\approx0.00176$$
My concern now is that this probability is way too small. I don't think that it is reasonable. Can I get pointers on where I went wrong? Thank you
- For this one, since 3 seconds is so small, we can consider this event rare, so we can use poisson approximation. First we find the probability of great day $$\mathbb{P}(X\leq0.05)=1-[e^{-0.1}x]^\infty_{0.05}\approx0.00498$$ We know that the expectation is equal to the parameter, $\lambda$, of the poisson distribution. Then we can find use the formula $$e^{-\lambda}\frac{\lambda^k}{k!}$$
Is this the right approach?
Once you know that the probability of having a bad day is $e^{-2} \approx 0.135335$, then the rest of the question is no longer about an exponential distribution, but rather, a binomial distribution (and its approximation by a normal distribution). In particular, the random number $X$ of bad days in a year is a binomial distribution with $n = 365$ and $p = e^{-2}$, assuming the probability that any given day is bad is independent of the outcome of any other day, and that the probability of a bad day is the same for any day of the year.
As such, we want the probability $$\Pr[50 \le X \le 60] = \sum_{x=50}^{60} \binom{365}{x} (e^{-2})^x (1 - e^{-2})^{365 - x}. \tag{1}$$ But this is difficult to calculate without a computer. So we use the normal approximation to the binomial, by fitting a normal distribution whose mean $\mu$ equals the binomial mean $np$, and whose variance $\sigma^2$ equals the binomial variance $np(1-p)$. Thus, we let $$Y \sim \operatorname{Normal}(\mu = 49.3974, \sigma^2 = 42.7122).$$ Then the desired probability is approximately $$\Pr[50 \le Y \le 60] \approx \Pr\left[ \frac{50 - 49.3974}{\sqrt{42.7122}} \le \frac{Y - \mu}{\sigma} \le \frac{60 - 49.3974}{\sqrt{42.7122}}\right] = \Pr[0.0922081 \le Z \le 1.62232] \approx 0.947633 - 0.536734 = 0.410899.$$
However, the exact probability, using Equation $(1)$ above, is $0.43861306037477480884\ldots$. Why the discrepancy? The reason is that we needed to use continuity correction in the normal approximation, to account for half of the probability mass that we are missing. The corrected approximation is:
$$\Pr[50 \le X \le 60] \approx \Pr[49.5 \le Y \le 60.5] \approx \Pr[0.0157023 \le Z \le 1.69883] \approx 0.44906,$$ which has about half the error of the uncorrected approximation.
For the second part of the question, the same type of calculation applies, except now the exact binomial probability is tractable because the number of good days is exactly $3$. The probability of a good day is $$\Pr[T \le 0.05] = 1 - e^{-(0.1)(0.05)} \approx 0.00498752,$$ hence $$\Pr[X = 3] = \binom{365}{3} (0.00498752)^3 (1 - 0.00498752)^{365-3} \approx 0.163204.$$ Or you could use a Poisson approximation since the event is reasonably rare. In such a case, the rate parameter is $\lambda = np = 365(0.00498752) \approx 1.82045$, which represents the average number of good days we can expect in a year. Then $$\Pr[X = 3] \approx e^{-\lambda} \frac{\lambda^3}{3!} \approx 0.162844.$$ I think the exact calculation is preferable, and just as accessible for a handheld calculator.