If $X\sim\text{Exp}(1)$, find a function $g$ so that $Y=g(X)$ is uniformly distributed over $(1,3)$.
I first tried to map $X$ onto $U\sim \text{Unif}(0,1)$, so that $X = F^{-1}(U)$ and $U=F(X).$
So I set $u=1- e^{-x}$ and found that $x=-\ln(1-u)$ for the inverse CDF.
I then tried to shift and scale $\text{Unif}(0,1)$ to $\text{Unif}(1,3)$ by stating that $½(Y-1)=U$ and plugged that into $u$ in the inverse function $x=-\ln(1-u).$
My answer turned out to be $Y=3 - 2e^{-X}$ but the correct solution is $Y = 2e^{-X} + 1$.
Can anyone please explain what I did wrong?
$U\sim \text{Uniform}(1,3) \iff 4-U\sim \text{Uniform}(1,3)$
So both your answer and the answer in the book are correct.
What probably happened with the answer in the book is that instead of $F(X)=1-e^{-X}\sim \text{Uniform}(0,1)$, they took $1-F(X)=e^{-X}\sim\text{Uniform}(0,1)$ as well.