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.

174 Views Asked by At

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.

  1. 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).
  2. 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

  1. 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

  1. 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?

2

There are 2 best solutions below

1
On BEST ANSWER

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.

0
On

The first is wrong.

After calculating $P(X>20)=e^{-2}$ your annual distribution is a binomial $Y\sim B(365;e^{-2})$ with mean $\mu=365\cdot e^{-2}$ and variance $\sigma^2=365\cdot e^{-2}\cdot(1-e^{-2})$

Yes, you can approximate is as a gaussian but the correct formula is

$$P(50\leq Y\leq 60)=\Phi\left(\frac{60.5-\mu}{\sigma}\right)-\Phi\left(\frac{49.5-\mu}{\sigma}\right)=\Phi(1.699)-\Phi(0.016)\approx 0.449$$

The second can be exactly calculated with the binomial

$$P(Y=3)=\binom{365}{3}\left[1-e^{-1/200}\right]^3\cdot\left[e^{-1/200}\right]^{362}\approx 0.1632$$

If you want to approximate this result with the poisson you can. Observe that the probability to have a great day is $e^{-1/200}$ which means that you expect to have

$$365\times e^{-1/200}\approx 1.82$$

great days per year.

Thus the probability to have exactly 3 great days in a year is

$$P(Y=3)=\frac{e^{-1.82}\cdot 1.82^3}{3!}\approx 0.1628$$

which is very close to the exact result obtained with the binomial