Transformation to produce a uniform(0,1) random variable

1.3k Views Asked by At

If the random variable $X$ has pdf

$$ f(x) = \frac{x-1}{2}, 1<x<3 $$

find a monotone function $g(x)$ such that the random variable $Y=g(X)$ has a uniform(0,1) distribution.

I know $Y = g(X) \iff P(Y<y) = P(X < g(x))$. So (supposing without loss of generality that g is increasing) we have $F_Y(y) = F_X(g^{-1}(X))$. $F_Y(y) = y$, and $F_X(g^{-1}(x)) = \int_1^{g^{-1}(x)} f_X(t)dt$.

But then I take the integral and get $y=$ an expression with $(g^{-1}(x))^2$ in it and I don't know what to do.

I'm not sure if I'm messing up the integral or something more fundamental's going wrong. Is this a path to the solution? If so, how to finish? Is there a better path?

2

There are 2 best solutions below

0
On BEST ANSWER

Hint: If $X$ has the CDF $F(x)$, then $F(X)\sim \text{Uniform}(0,1)$. Also, $F$ is increasing.

This is used in simulation to generate a random variable from a standard uniform random variable (rand).

Proof: Obviously $0<F(X)<1$ and $P(F(X)\le t)=P(X\le F^{-1}(t))=F(F^{-1}(t))=t$, for $0<t<1$

In your case:

$$F(x)=\int_1^x f(x)dx=\frac{(x-1)^2}{4}$$

And the good thing with this method that it works for a general distribution.

1
On

You don't need to evaluate integrals for this: you've already got them.

The probability that a point falls within the smallest (for example) $40\%$ of the length of the interval $(1,3)$ is just $40\%$, i.e. $0.4$. That's what "uniform" means. Just transform that to the smallest $40\%$ of the interval $(0,1)$. So the graph is just a straight line that maps $1$ to $0$ and $3$ to $1$: $$ Y = \frac 1 2 (X-1). $$ Plug in $3$ for $X$ and you see that you get $1$ for $Y$.

$$ \Pr(Y < y) = \Pr\left( \frac 1 2 (X-1) < y \right) = \Pr( X < 2y+1) = \frac{(2y+1) - 1} 2 = y. $$ So $Y$ is uniformly distributed on $(0,1)$.