# Calculate Probability: Diff $Y-X \leq 1$

• MHB
• evinda
In summary, we have two independent random variables, $X$ and $Y$, with uniform distributions on the intervals $[0,2]$ and $[2,4]$, respectively. To find the probability that the difference $Y-X$ is less than or equal to $1$, we use the joint probability distribution $f_{X,Y}(x,y)$ and the density functions $p_1(x)$ and $p_2(y)$. This can be calculated by finding the integral of $f_{X,Y}(x,y)$ over the area where $y-x \leq 1$. The corresponding graph shows the regions where the joint probability density and the difference $Y-X$ are non-zero, with the red area
evinda
Gold Member
MHB
Hello! (Wave)

Suppose that $X$ has the uniform distribution on the interval $[0,2]$ and $Y$ has the uniform distribution on the interval $[2,4]$. If $X,Y$ are independent, I want to find the probability that the difference $Y-X$ is $\leq 1$.

I have thought the following.The density function of $X$ is

$$p_1(x)=\left\{\begin{matrix} \frac{1}{2} &, 0 \leq x \leq 2 \\ 0 & , \text{ otherwise} \end{matrix}\right.$$

while the density function of $Y$ is

$$p_2(x)=\left\{\begin{matrix} \frac{1}{2} &, 2 \leq x \leq 4 \\ 0 & , \text{ otherwise} \end{matrix}\right.$$How can we find the probability that the difference $Y-X$ is $\leq 1$ ? Do we use the above density functions? (Thinking)

Hey evinda! (Smile)

Yep, we use those density functions.

$X$ and $Y$ have a so called joint probability distribution $f_{X,Y}(x,y)$.
If means that:
$$P(Y-X\le 1) = \iint_{y-x\le 1} f_{X,Y}(x,y)\,dx\,dy$$
And since they are independent, we have:
$$f_{X,Y}(x,y) = f_X(x)f_Y(y) = p_1(x)p_2(y)$$
(Thinking)

Just for fun, here's the corresponding graph.

The blue area corresponds to the part where the joint probability density is non-zero.
And the red area corresponds to the part where $Y-X \le 1$. (Thinking)

Nice, thank you! (Smirk)

## What is probability?

Probability is a measure of the likelihood of an event occurring. It is represented by a number between 0 and 1, where 0 indicates impossibility and 1 indicates certainty.

## How is probability calculated?

The probability of an event is calculated by dividing the number of favorable outcomes by the total number of possible outcomes. This can be represented as a fraction, decimal, or percentage.

## What does the symbol "$\leq$" mean?

The symbol "$\leq$" means "less than or equal to." In terms of probability, it is used to represent the event of the difference between two random variables being less than or equal to a specific value.

## How can I interpret the probability of Diff $Y-X \leq 1$?

The probability of Diff $Y-X \leq 1$ represents the likelihood of the difference between two random variables being equal to or less than 1. This can be interpreted as the probability of the two variables being very similar or close in value.

• Set Theory, Logic, Probability, Statistics
Replies
0
Views
559
• Set Theory, Logic, Probability, Statistics
Replies
1
Views
800
• Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
4
Views
890
• Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
1
Views
762
• Set Theory, Logic, Probability, Statistics
Replies
12
Views
3K
• Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
0
Views
1K
• Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K