Help me understand Inverse CDF for Generating Random Numbers

393 Views Asked by At

Ok, so I'm extremly confused about the whole CDF inverse to find a Random Number Generator, please I need a very clear and slow explanation.

The question:

We have $\displaystyle F_{X}( x) =\frac{e^{x}}{1+e^{x}}$, and $\displaystyle G_{X}( x) =F^{-1}_{X}( x) =\log\frac{x}{1-x}$. Suppose we are given a Random Number Generator in $\displaystyle U[ 0,1]$, find a way to use $\displaystyle G_{X}( x)$ to Generate Random Numbers for the distribution represented by $\displaystyle F$, prove formally.

I do understand the idea, I know $\displaystyle G_{X}( x)$ is the inverse, so it takes as input probabilities, and it returns the $\displaystyle x$ that brings to that probability. So it makes sense that by inputting different values in $\displaystyle U[ 0,1]$ you will get the distribution represented by $\displaystyle F_{X}( x)$.

Now, what do I formally have to prove? I don't know!

I can't prove that $\displaystyle G_{X}( x) =F_{X}( x)$ cause that's obviously not true. So what should I prove? I don't get it. In many proof, I see something as $\displaystyle G( X)$. But what is at all the meaning of inputting some $\displaystyle X$ inside $\displaystyle G_{X}( x)$?

All I learned in class (therefore all I can work with). I know that $\displaystyle F_{X}( x) =P( X\leqslant x)$.

This brings me solely to know that if $\displaystyle G_{X}( u) =p$, then $\displaystyle P( X\leqslant u) =p$. I can't seem to know anything else about $\displaystyle G_{X}( x)$ that would help me further with the proof.

As you might tell I'm pretty confused about the whole thing. What I have to prove and how. Any help would be appreciated.

1

There are 1 best solutions below

0
On

$F_X(x) = \mathbb P(X \le x) $ is a strictly increasing bijective function $\mathbb R \to (0,1)$, so $G_X(u) = F^{-1}_X(u) $ is a strictly increasing bijective function $(0,1) \to \mathbb R$

You know that if $U$ is uniformly distributed on $[0,1]$ then $\mathbb P(U \le u)=u$ for $0 \lt u \lt 1$, so $\mathbb P(G_{X}( U) \le G_{X}( u)) = u$

$G_{X}( U)=F^{-1}_{X}( U)$ is a value in $\mathbb R$ and if we let $Y=G_{X}( U)$ and $y=G_{X}( u)$ so $u=F_X(y)$, then $\mathbb P(Y \le y) = F_X(y)$, meaning that $X$ and $Y=G_X(U)$ have the same cumulative distribution function, i.e. the same distribution