# Thread: Probability with two random variables

1. ## Probability with two random variables

Consider two independent random variables: $\displaystyle r,s$, where
$\displaystyle r\sim f(r)$ and $\displaystyle s \sim U[0,x]$.
($\displaystyle U[0,x]$ means uniform within support $\displaystyle 0$ and $\displaystyle x$.)

What is the following probability:

$\displaystyle \Pr (r-ts>p)$, where $\displaystyle t$ and $\displaystyle p$ are constants.

Any suggestions, tips or ideas?

2. Hello,
Originally Posted by Justin Lo
Consider two independent random variables: $\displaystyle r,s$, where
$\displaystyle r\sim f(r)$ and $\displaystyle s \sim U[0,x]$.
($\displaystyle U[0,x]$ means uniform within support $\displaystyle 0$ and $\displaystyle x$.)

What is the following probability:

$\displaystyle \Pr (r-ts>p)$, where $\displaystyle t$ and $\displaystyle p$ are constants.

Any suggestions, tips or ideas?
Since they're independent, their joint probability density function is $\displaystyle f(r)\cdot \frac 1x$

Now, $\displaystyle \mathbb{P}(r-ts>p)=\mathbb{E}\left(\mathbf{1}_{r-ts>p}\right)$ (1 is the indicator function)

By the law of the unconscious statistician, which states that for any measurable function f, $\displaystyle \mathbb{E}(f(X_1,\dots,X_n))=\int_{\mathbb{R}^n} f(x_1,\dots,x_n) g(x_1,\dots,x_n) ~dx_1\dots dx_n$

where g is the joint probability function of $\displaystyle (X_1,\dots,X_n)$

So here, we have :

$\displaystyle \mathbb{P}(r-ts>p)=\int_0^x\int_{\mathbb{R}} \frac{f(r)}{x} \cdot \mathbf{1}_{r-ts>p} ~dr ~ds$

now, $\displaystyle \mathbf{1}_{r-ts>p}$ has to be interpreted as a region.
Since we first integrate with respect to r, consider it with respect to r :
$\displaystyle r>p-ts$

So finallly :

$\displaystyle \mathbb{P}(r-ts>p)=\int_0^x\int_{p-ts}^\infty \frac{f(r)}{x} ~dr ~ds$

Note : the inner integral doesn't necessarily goes to infinity, it depends on the support of the rv r, which will be expressed in the function f.