MHB Find Probability: P(Z $\leq$ 9/5)

  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Probability
AI Thread Summary
The discussion revolves around calculating the probability P(Z ≤ 9/5) for the sum of two independent uniform random variables X and Y on the interval [0,1]. The density function for Z, which is defined as Z = X + Y, is derived and expressed piecewise as f_Z(z) = z for 0 ≤ z < 1 and f_Z(z) = 2 - z for 1 ≤ z ≤ 2. The probability is computed by integrating the density function over the relevant intervals, resulting in P(Z ≤ 9/5) = 49/50. Participants clarify the need to split the integral into cases based on the values of z to account for the behavior of the uniform distributions. The final calculation confirms the result, reinforcing the understanding of the integration process for piecewise functions.
mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

I saw the following exercise and I wanted to solve it,but I got stuck.. (Worried)

Let $X,Y$ be independent random variables,that follow uniform distribution on $[0,1]$, and let the random variable $Z=X+Y$.

The density of $Z$ is:
$$f_{X+Y}(z)=\int_0^z f_X(x)f_Y(z-x)dx$$

How could we calculate the probability $P(Z \leq \frac{9}{5})$? (Wondering)
 
Physics news on Phys.org
mathmari said:
Hey! :o

I saw the following exercise and I wanted to solve it,but I got stuck.. (Worried)

Let $X,Y$ be independent random variables,that follow uniform distribution on $[0,1]$, and let the random variable $Z=X+Y$.

The density of $Z$ is:
$$f_{X+Y}(z)=\int_0^z f_X(x)f_Y(z-x)dx$$

How could we calculate the probability $P(Z \leq \frac{9}{5})$? (Wondering)

Hi! ;)

Let's evaluate your integral:
\begin{aligned}

f_{Z}(z) = f_{X+Y}(z) &= \int_0^z f_X(x)f_Y(z-x)\,dx \\

&= \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\

&= \begin{cases}
\int_0^z 1 \cdot 1\,dx &\text{if } 0 \le z < 1 \\
\int_{z-1}^1 1 \cdot 1\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\

&= \begin{cases}
z &\text{if } 0 \le z < 1 \\
2-z &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\

\end{aligned}

Now:
$$P(Z \le \frac 95) = \int_0^{9/5} f_Z(z)\,dz$$
(Thinking)
 
mathmari said:
Hey! :o

I saw the following exercise and I wanted to solve it,but I got stuck.. (Worried)

Let $X,Y$ be independent random variables,that follow uniform distribution on $[0,1]$, and let the random variable $Z=X+Y$.

The density of $Z$ is:
$$f_{X+Y}(z)=\int_0^z f_X(x)f_Y(z-x)dx$$

How could we calculate the probability $P(Z \leq \frac{9}{5})$? (Wondering)

It is easy to arrive at...

$\displaystyle f_{Z} (x) = \begin{cases} x & \text{if}\ 0 \le x < 1\\ 2 - x & \text{if}\ 1 \le x \le 2\\ 0 & \text{otherwise}\ \end{cases}\ (1)$

... so that is...

$\displaystyle P \{Z < \frac{9}{5} \} = \int_{0}^{1} x\ d x + \int_{1}^{\frac{9}{5}} (2 - x)\ dx = \frac{1}{2} + \frac{24}{50} = \frac{49}{50}\ (2)$

Kind regards

$\chi$ $\sigma$
 
I like Serena said:
Hi! ;)

Let's evaluate your integral:
\begin{aligned}

f_{Z}(z) = f_{X+Y}(z) &= \int_0^z f_X(x)f_Y(z-x)\,dx \\

&= \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\

&= \begin{cases}
\int_0^z 1 \cdot 1\,dx &\text{if } 0 \le z < 1 \\
\int_{z-1}^1 1 \cdot 1\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\

&= \begin{cases}
z &\text{if } 0 \le z < 1 \\
2-z &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\

\end{aligned}

Now:
$$P(Z \le \frac 95) = \int_0^{9/5} f_Z(z)\,dz$$
(Thinking)

Could you explain why the equality $$\int_0^z f_X(x)f_Y(z-x)\,dx = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} $$ stands?? Why do we have to take these cases?? (Wondering)

And also, do we replace at the integral $f_X(x)$ with $1$ using the formula $$f(x)=\left\{\begin{matrix}
\frac{1}{b-a} & , a \leq x\leq b\\
0 &, x<a \text{ or } x>b
\end{matrix}\right.$$ ?? (Wondering)
 
mathmari said:
Could you explain why the equality $$\int_0^z f_X(x)f_Y(z-x)\,dx = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} $$ stands?? Why do we have to take these cases?? (Wondering)

And also, do we replace at the integral $f_X(x)$ with $1$ using the formula $$f(x)=\left\{\begin{matrix}
\frac{1}{b-a} & , a \leq x\leq b\\
0 &, x<a \text{ or } x>b
\end{matrix}\right.$$ ?? (Wondering)

Your second question is the answer to the first one. (Wasntme)

Since $f_X$ and $f_Y$ are piece wise functions, we need to distinguish the cases where they are $0$ and non-zero.
That's why the integral needs to be split up into separate cases.
And that's why the bounds can be adjusted to only specify the bounds where $f_X$ respectively $f_Y$ are non-zero. The part where they are zero vanishes. (Mmm)
 
I like Serena said:
Your second question is the answer to the first one. (Wasntme)

Since $f_X$ and $f_Y$ are piece wise functions, we need to distinguish the cases where they are $0$ and non-zero.
That's why the integral needs to be split up into separate cases.
And that's why the bounds can be adjusted to only specify the bounds where $f_X$ respectively $f_Y$ are non-zero. The part where they are zero vanishes. (Mmm)

Ahaa..

At the formula $$f(x)=\left\{\begin{matrix}
\frac{1}{b-a} & , a \leq x\leq b\\
0 &, x<a \text{ or } x>b
\end{matrix}\right.$$ we take cases as for $x$, and the variable of $f$ is $x$.

But at the formula
$$\int_0^z f_X(x)f_Y(z-x)\,dx = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} $$ why do we take cases as for $z$ although the variable of $f_X$ is $x$?? (Wondering)
 
mathmari said:
Ahaa..

At the formula $$f(x)=\left\{\begin{matrix}
\frac{1}{b-a} & , a \leq x\leq b\\
0 &, x<a \text{ or } x>b
\end{matrix}\right.$$ we take cases as for $x$, and the variable of $f$ is $x$.

But at the formula
$$\int_0^z f_X(x)f_Y(z-x)\,dx = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} $$ why do we take cases as for $z$ although the variable of $f_X$ is $x$?? (Wondering)

The range of $x$ in the integral is $[0,z]$.

If $0 \le z < 1$, then that implies that $0 \le x < 1$. Therefore $f_X(x) = 1$.

If $1 \le z \le 2$, then that implies that $0 \le x \le 2$.
However, we only have $f_X(x) = 1$ if $0 \le x \le 1$.
Therefore we need to limit the upper boundary to $1$ instead of $z$.
Then $f_X(x) = 1$ on the complete range of the integral.
(Wasntme)
 
I like Serena said:
The range of $x$ in the integral is $[0,z]$.

If $0 \le z < 1$, then that implies that $0 \le x < 1$. Therefore $f_X(x) = 1$.

If $1 \le z \le 2$, then that implies that $0 \le x \le 2$.
However, we only have $f_X(x) = 1$ if $0 \le x \le 1$.
Therefore we need to limit the upper boundary to $1$ instead of $z$.
Then $f_X(x) = 1$ on the complete range of the integral.
(Wasntme)

Knowing that $$f_X(x) = \begin{cases}
1&\text{if } 0 \le x \le 1 \\
0 & \text{otherwise}
\end{cases}$$
we have the following:

$$f_Z(z)=\int_0^z f_X(x)f_Y(z-x)\,dx = \begin{cases}
\int_0^z f_X(x) \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^z f_X(x) \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\ = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 f_X(x) \cdot f_Y(z-x)\,dx +\int_1^z f_X(x) \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\ = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx +\int_1^z 0 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\ = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases}$$

Then knowing that $$f_Y(x) = \begin{cases}
1&\text{if } 0 \le x \le 1 \\
0 & \text{otherwise}
\end{cases}$$ and
$0 \le x \le 1 \Rightarrow -1 \le x \le 0 \Rightarrow z-1 \le z-x \le z$

we have the following:

$$f_Z(z)=\int_0^z f_X(x)f_Y(z-x)\,dx = \begin{cases}
\int_0^z 1 \cdot f_Y(z-x)\,dx &\text{if } 0 \le z < 1 \\
\int_0^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\ = \begin{cases}
\int_0^z 1 \cdot 1\,dx &\text{if } 0 \le z < 1 \\
\int_0^{z-1} 1 \cdot f_Y(z-x)\,dx + \int_{z-1}^1 1 \cdot f_Y(z-x)\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\ = \begin{cases}
\int_0^z 1\,dx &\text{if } 0 \le z < 1 \\
\int_0^{z-1} 1 \cdot 0\,dx + \int_{z-1}^1 1 \cdot 1\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \\ = \begin{cases}
\int_0^z 1\,dx &\text{if } 0 \le z < 1 \\
\int_{z-1}^1 1\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases} \Rightarrow \\ f_Z(z)= \begin{cases}
z &\text{if } 0 \le z < 1 \\
2-z\,dx &\text{if } 1 \le z \le 2 \\
0 & \text{otherwise}
\end{cases}$$

Therefore, $$P \left ( Z \leq \frac{9}{5} \right ) =\int_0^{\frac{9}{5}} f_Z(z)dz=\int_0^1 z dz+\int_1^{\frac{9}{5}} (2-z)dz= \left [ \frac{z^2}{2} \right ]_0^1+ \left [ 2z-\frac{z^2}{2} \right ]_1^{\frac{9}{5}}= \\ \frac{1}{2}+2\frac{9}{5}-\frac{1}{2} \left ( \frac{9}{5} \right )^2-2+\frac{1}{2}=\frac{18}{5}-\frac{81}{50}-1=\frac{180-81-50}{50}=\frac{49}{50}$$

Is this correct?? (Wondering)
 
Yep! (Nod)

(Except for $0≤x≤1⇒−1≤x≤0$. :eek:)[/color]
 
  • #10
I like Serena said:
Yep! (Nod)

Great! (flower) Thank you very much! (Yes)

I like Serena said:
(Except for $0≤x≤1⇒−1≤x≤0$. :eek:)[/color]

I forgot a minus sign.. (Lipssealed)
 
Back
Top