# Thread: Probability with two random variables

1. ## Probability with two random variables

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

What is the following probability:

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

Any suggestions, tips or ideas?

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

What is the following probability:

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

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

Now, $\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, $\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 $(X_1,\dots,X_n)$

So here, we have :

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

now, $\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 :
$r>p-ts$

So finallly :

$\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.