# Given a target CDF and a random variable, find the transformation

Problem: Let $$X$$ be the uniform random variable on $$[-1, 1]$$. We know its PDF is just $$f_X(x) = \frac{1}{2}$$ for $$x \in [-1,1]$$ and $$0$$ everywhere else, and its CDF is $$F_X(x) = \frac{x+1}{2}$$ on $$[-1,1]$$, $$0$$ on $$(-\infty, -1)$$ and $$1$$ on $$(1, \infty)$$. Now define another random variable $$Y$$, where $$f_Y(y) = 2 e^{-2y} u(y)$$, i.e., it's an exponential RV. Question: find $$g: \mathbb{R} \to \mathbb{R}$$ such that $$Y = g(X)$$ (i.e. find $$g$$ such that $$f_{g(X)}(g(x))$$ is as stated above).

In the solution to this problem, basically $$F_X(x) = F_{G(X)}(g(x))$$ is solved for $$x \in [-1, 1]$$ to obtain $$g$$, i.e., solve: $$\frac{x+1}{2} = 2e^{-2g(x)}$$

What I am confused about is why we only restrict our attention to $$x \in [-1,1]$$. Since $$F_X$$ and $$f_X$$ technically speaking operate on all of $$\mathbb{R}$$, shouldn't we also consider other $$x$$'s? Yes I know $$f_X$$ only has support on $$[-1,1]$$ and that the nature of the exponential variable seems to be restricting the $$x$$ we can focus on. But I would like an explanation that rigorously explains this specific problem, and how to solve a problem like the one I have in general. Any help is appreciated!

• writing out the densities in their proper form, ie including indicator functions that are 1 of x is on the support, should lead to the same answer and will account for all cases of x – Xiaomi Oct 11 '18 at 3:38
• The statement doesn't make much sense. If $X$ and $Y$ are defined on different probability spaces you cannot find $g$ such that $Y=g(X)$. The correct wording is the following: show that there is a measurable function $g: \mathbb R \to \mathbb R$ such that $g(X)$ has the same distribution as $Y$. – Kavi Rama Murthy Oct 11 '18 at 5:51
• What is $u(y)$? – Kavi Rama Murthy Oct 11 '18 at 5:53
• $g(X)$ depends only on values of $g$ in $[-1,1]$ because $X$ has range $[-1,1]$. It makes no difference as to how you define $g$ outside this interval. – Kavi Rama Murthy Oct 11 '18 at 5:54