**Question 1: **The length of a shower in a hypothetical state during rainy season form an exponential random variable with parameter λ =

$\frac{1}{2}$.

(a) What is the probability that a shower will last for more than 2 minutes.

(b) Find the probability that a shower will last between 2 and 3 minutes.

** Solution: **

The pdf for the exponential random variable is f(x) = $\frac{1}{2}$ $e^{\frac{-x}{2}}$

Probability the shower will last for more than 2 minutes P (x > 2)

= $\int_{2}^{\infty }\frac{1}{2}e^{\frac{-2}{2}}$$dx$

= $\frac{1}{e}$ ≈ 0.3679.

Probability the shower will last between 2 and 3 minutes P(2 < X < 3)

= $\int_{2}^{3}\frac{1}{2}e^{\frac{-x}{2}}dx$

= $\frac{1}{e}$ - $\frac{1}{e^{\frac{3}{2}}}$

≈ 0.14475.

Using the cdf function F(x) = 1 - $e^{-\lambda x}$ for an exponential random variable, it can be proved

P(x > a) = $e^{-\lambda x}$

**Note: **for the above example P(X > 2) = $e^{-(\frac{2}{2})}$ = e^{-1} = $\frac{1}{e}$ ≈ 0.3679.

P(2 < X < 3) = F(3) - F(2) = (1 - $e^{-(\frac{3}{2})}$) - (1 - $e^{-(\frac{2}{2})}$)

= e^{-1} - e^{-1.5} = `1/e` - $\frac{1}{e^{\frac{3}{2}}}$ ≈ 0.14475.

**Question 2: **Suppose the wait time X for filling gas in a gas filling station is an
exponential random variable with average wait time = 2 minutes. What is
the probability a customer has to wait over 4 minutes before he got
attended? Suppose he has already waited for 2 minutes, what is the probability that he has to wait 4 more minutes before getting attended?

** Solution: **

Here the mean wait time = E( x) = $\frac{1}{\lambda }$ = 2. Hence λ = $\frac{1}{2}$.

P(x > a) = $e^{-\lambda x}$

P( X > 4) = $e^{-(\frac{1}{2})4}$ = e^{-2} ≈ 0.1353.

An important property of exponential distribution is if the random
variable represents a waiting time, the probability of waiting for a
certain length of time is not altered if you have already waited for
some time.

Thus the probability of a customer needs to wait for more than 4 minutes when he has already waited for 4 minutes

= P( X > 4) = 0.1353.