[Math] Using double integrals correctly

integrationmultivariable-calculusstatistics

I seem to be doing some of the steps wrong, when counting with double integrals. Would someone point out exactly which steps, and what exactly I'm doing wrong?

Example exercise:

The management at a fast food outlet is interested in the joint behavior of the random variables $Y_1$, defined as the total amount of time between a customer's arrival at the store and departure from the service window, and $Y_2$, the time a customer waits in line before reaching the service window. Because $Y_1$ includes the time a customer waits in line, we must have $Y_2 \le Y_1 $. The relative frequency distribution can be modeled by the probability density function:

$$f(y_1, y_2)= \begin{cases}
e^{-y_1}, & 0\le y_1 \le y_2 \le \infty \\
0, & \text{elsewhere}
\end{cases}
$$

With time measured in minutes, find $P(Y_1 \lt2, Y_2 \gt 1 $

I figure this should be solved with a double integral, something like this:

$$\int_1^2 \int_{1}^{Y_1} e^{-y_1}dy$$

My reasoning for setting these limits:

$Y_2$ cannot be less than one, according to the text. Also, $Y_1$ cannot be more than Y_1, since $Y_1$ represents the total time. $Y_1$ cannot be greater than 2, this is also stated. Since $Y_2$ must be greather than 1, this must also be true for $Y_1$.

I start by doing the primitive function of $e^{-y_1}$, with respect to $y_2$:

$$=y_2 e^{-y_1}$$

The partial integral of $y_2$ thus would be:

$$y_1 e^{-y_1}-1 e^{-y_1}=e-e^{-y_1}$$

The primitive function of this, with respect to $y_1$ should be:

$$y_1 e +e^{-y_1}$$

Thus the partial integral with respect to $y_1$ should be

$$2e +e^{-2}-(1\cdot e +e^{-1})=e +e^{-2}-+e^{-1}$$
$$=2.4857\ldots$$

This obviously can't be right, probabilities cannot be greater than 1. Yet I can't figure out where I went wrong. Would someone point out my mistake(s)?

Exercise from "Mathmatical Statistics with Applications,$7^{th}$edition"

Best Answer

You have $\displaystyle\int_1^2\int_1^{y_1}e^{-y_1}dy_2dy_1=\int_1^2\left[y_2e^{-y_1}\right]_1^{y_1}dy_1=\int_1^2(y_1e^{-y_1}-e^{-y_1})dy=\int_1^2(y_1-1)e^{-y_1}dy_1$.

Using integration by parts, with $u=y_1-1, dv=e^{-y_1}, du=dy_1, v=-e^{-y_1}$, gives

$\displaystyle\left[-(y_1-1)e^{-y_1}-\int-e^{-y_1}dy_1\right]_1^2=\left[-y_1e^{-y_1}+e^{-y_1}-e^{-y_1}\right]_1^2=\left[-y_1e^{-y_1}\right]_1^2=e^{-1}-2e^{-2}$

Related Question