Distribution of a max of transforms of an exponential random variable

density functionprobabilityprobability distributionsrandom variables

The random variable $X$ has an exponential distribution function given by density:
$$
f_X(x) =
\begin{cases}
e^{-x}, & x\ge 0,\\
0, & x<0.
\end{cases}
$$

Find the distribution and density function of the random variable $Y=\max\left\{X^2,2-X\right\}$.

I honestly just don't know how to start here.

  1. Why should we be able to calculate this if we don't know what exactly X is?
  2. What is X^2 and 2-X ? I don't understand that
  3. And even knowing all of this, how should we be able to find the distribution and density function of Y?

Thanks

Best Answer

A graphic approach

Note: as already note in a comment, $f(x)=e^{-x}\mathbb{1}_{[0;+\infty)}(x)$

First of all note that $X\sim Exp(1)$ and so

  • $\mathbb{P}[X \leq x]=F_X(x)=1-e^{-x}$

  • $\mathbb{P}[X > x]=S_X(x)=e^{-x}$

Let's have a look at the graph

enter image description here

Now it is clear which is the transformation function and which is Y domain:

$y \in [1;+\infty)$

To derive $ CDF_Y$ let's use the definition

$F_Y(y)=\mathbb{P}[Y \leq y]=\mathbb{P}[2-y \leq X \leq \sqrt{y}]=S_X(2-y)-S_X(\sqrt{y})=e^{y-2}-e^{-\sqrt{y}}$

This, obviously when $y \in[1;2)$

For the other interval, same but more simply story

$F_Y(y)=\mathbb{P}[Y \leq y]=\mathbb{P}[X^2\leq y]=\mathbb{P}[X\leq \sqrt{y}]=F_X(\sqrt{y})=1-e^{-\sqrt{y}}$

Summarizing...

$F_Y(y)=[e^{y-2}-e^{-\sqrt{y}}]\mathbb{1}_{[1;2)}(y)+[1-e^{-\sqrt{y}}]\mathbb{1}_{[2;+\infty)}(y)$

derive and you get your density

Further Basic explanation answering to the latest comment of the OP

Your density is a known Law: a Negative Exponential with $\theta=1$. It is easy to verify that because the Exp neg density is the following

$f(x,\theta)=\theta e^{-\theta x}$

$x \geq 0$ and zero elsewhere. So we immediately know which are the CDF and the survival function (anyway they can be easily calculated with the integral)

  • YOUR CDF

$F_X(x)=\mathbb{P}[X \leq x]=1-e^{-x}$

  • YOUR SURVIVAL FUNCTION

$S_X(x)=\mathbb{P}[X > x]=1-F_X(x)=e^{-x}$

Now for the sake of simplicity let's suppose we are looking at the following transformation:

$Y=X^2$

So, by definition, we have

$F_Y(y)=\mathbb{P}[Y \leq y]=\mathbb{P}[X^2\leq y]=\mathbb{P}[X \leq \sqrt{y}]=$

(by definition)

$=F_X(\sqrt{y})=1-e^{\sqrt{y}}$

If you have understood this procedure, you can apply it to your exercise that is a little bit more complex by the fact that the transformation function is

$Y=Max[2-X;X^2]$

but with the help of the grafh I showed you should be able to understand the solution. If not, I suggest you to challenge with easier exercise to become familiar with the procedure. Also the Fundamental Tranformation Theorem could help but the procedure I showed you is very useful to understand the issue you are facing.

2nd Edit:

$\mathbb{P}[2-y < X < \sqrt{y}]=F_X(1)-F_X(2-y)+F_X(\sqrt{y})-F_X(1)=$

$=F_X(\sqrt{y})-F_X(2-y)=1-S_X(\sqrt{y})-[1-S_X(2-y)]=$

$=S_X(2-y)-S_X(\sqrt{y})$