Probability: Continuous Random Variables and Transforming from One PDF to another PDF

probabilityprobability distributionsrandom variables

Problem:

Let $X$ be a random variable with the probability density function given by

$$f(x) = \begin{cases}
e^{-x} & \text{if } x\geq 0\\
0 & \text{elsewhere.}
\end{cases}$$

Let

$$Y = \left\{\begin{matrix}
X & \text{if } X\leq 1\\
1/X & \text{if } X>1.
\end{matrix}\right.$$

Find the probability density function of $Y$.

My Attempted Solution:

So, to begin, we know that $f(x)$ is continuous so we can integrate to get $F_{x}(t)$. We only need to integrate from $0$ to $t$ because that is when $f(x)$ is non-zero. So:

$$F_{X}(t) = \int_{-\infty}^t f_{X}(x)\,dx = \left\{\begin{matrix}
\int_0^t e^{-x} \,dx & \text{if } t\geq 0\\
0 & \text{otherwise.}
\end{matrix}\right. = \left\{\begin{matrix}
1 – \frac{1}{e^t} & \text{if } t\geq 0\\
0 & \text{otherwise.}
\end{matrix}\right.$$

Now, we know by definition that $F_y(t) = P(Y \leq t)$. However, given the piecewise definition of $Y$, we know $Y = X$ when $X \leq 1$ and $Y = \frac{1}{X}$ when $X > 1$. So, we get the following distribution function for $Y$:

$$F_Y(t)=P(Y\leq t) = \left\{\begin{matrix}
P(X\leq t) & \text{if } X\leq 1\\
P(\frac{1}{X}\leq t) & \text{if } X> 1.
\end{matrix}\right.$$

Typically, I see CDFs bounded in terms of $t$ so I unsure where to go from here. What is the process for converting the bounds to $t$? If I get that part, then I will be able to derive the PDF of $Y$.

Best Answer

Given the definition of $Y$, we can tell that $Y$ is either $\leq 1$ when $X$ is $\leq 1$, or $Y$ is $1/X$ when $X > 1$. Regardless of the case, we see have $Y < 1$. So, we now know that the range of $Y$ is $(-\infty,1]$. Looking closer, we can see $-\infty < Y < 0$ is only when $X < 0$ based on the definition of $Y$. So, we know that $f(x)$ in that case would be $0$ given the definition of $X$.

Now, suppose $0\le y\le 1.$ Then \begin{align} f_Y(y) & = \frac d {dy} F_Y(y) = \frac d{dy} \Pr(Y\le y) \\[8pt] & = \frac d {dy} \Pr(X\le y \text{ or } 1/X\le y). \end{align} The two events between which you see "or" are mutually exclusive, so this is \begin{align} & \frac d {dy} \big( \Pr(X\le y) + \Pr(1/X\le y) \big) \\[8pt] = {} & \frac d {dy} \big( (1-e^{-y}) + \Pr(X\ge 1/y) \big) \\[8pt] = {} & \frac d {dy} \big( (1-e^{-y}) + e^{-1/y} \big) \\[8pt] = {} & e^{-y} + e^{-1/y}\cdot \frac 1 {y^2}. \end{align} And if $y<0$ or $y>1$ then $f_Y(y)=0.$