[Math] Transformation of a Uniform Random Variable

probability

enter image description here

In part (a) I get the CDF to be just $y$ meaning Y is a Uniform(0,1) random variable, but I don't understand why. I thought the point was that $\frac{e^X}{1+e^X}$ would be a Uniform(0,1) random variable by the Probability Integral Transform theorem that $F_{X}(X)$~Uniform(0,1). I feel as though I missing something here, would appreciate some clarification of what's going on.

For (b), my thinking would be that if we had a random variable U~Uniform(0,1) then by the PIT theorem there is a Y~Logistic such that $F^{-1}(U)=Y$ so $Y=log(\frac{U}{1-U})$ which would yield $U=\frac{e^X}{1+e^X}$ as I would expect. So why would it work with a $1$ in the numerator instead of an $e^x$?

Best Answer

You're on the right track - let's go back to our proof of the Probability Integral Transform to get back to the basics.

Look at your function - $Y = 1/1+e^X$ is easily invertible to $X=ln(\frac{1-Y}{Y})$.

See what happens when you try to find the $cdf$ of Y:

$F_Y(y)=P(Y<y)=P(\frac{1}{1+e^x}<y)=P(ln(\frac{1-y}{y})<x)$

$\therefore F_Y(y)=F_X(ln(\frac{1-y}{y}))=\frac{e^{ln(\frac{1-y}{y})}}{1+e^{ln(\frac{1-y}{y})}}=\frac{1-y}{y}\cdot \frac{y}{y+1-y}=1-y$

If that doesn't look like a uniform $cdf$ $U(0,1)$ to you, think again. Ordinarily, a uniform $cdf$ would increase uniformly from $0$ to $1$. Never fear - what's crucial to a uniform distribution is that the probability density must be the same for every value of the RV in an interval. A quick glance tells us that this holds.

If you want to be rigorous, take $Z=1-Y$. You'll see that :

$F_Z(z)=P(Z<z)=P(1-Y<z)=P(1-Z<y)=F_Y(1-Z)=1-(1-z)=z$

Another simply observed fact is that the probability density functions are equal in magnitude $|f_Z(z=k)|=|f_Y(y=k)| =1$ $\forall \space k\in(0,1)$.

For part $b$: It should by now be pretty obvious that if you have the uniform random variable $U$, all you need to do to obtain a logistic distribution $L$ is to transform it by the function $L=ln(\frac{U}{1-U})$ - as you correctly identified.

Note that had you used the random variable $Y$ we earlier found (which had cdf $(1-y)$), you would have to process it using the function $L=ln(\frac{1-Y}{Y})$. Therein lies the slight flaw in your argument.

In essence, $Y$ follows a uniform distribution, but falls into conventional form only when you're measuring it's difference with a larger number (here, $1$).

Related Question