I'm working on the following problem and could use some help getting started.
Let $ X \sim \text{Unif}(a,b)$. Find the linear function $g(x)$ such that $g(x) \sim \text{Unif}(0,1)$.
Up until this problem, I was given some function $Y=g(X)$ and asked to find the probability density function $f_Y (y)$ given a specified distribution. The previous problem I solved was the following:
Let $ X \sim \text{Unif}(0,1)$. Find $f_Y (y)$ if $ Y=X^n$ for $n \in \Bbb N$.
I understand how to find the PDF here, given the function $Y=g(x)$. My result for the PDF here is:
$$ f_Y (y) = \cases{\frac{1}{nY^{\frac{1}{n} - 1}} \, \, \, \text{for} \, \, 0<Y<1 \\ \, \, \, \, \, \, \, 0 \, \, \, \, \, \, \, \, \, \text{otherwise}} $$
But, I do not understand how to find $g(x)$ given the information in the first problem.
Thank you~
Guide:
Let $Y=cX+d$ where $c \ne 0$.
consider $2$ cases, case $1$: $c>0$.
Then if $X \in (a,b)$, then $Y \in (ca+d, cb+d)$.
Let $y \in (ca+d, cb+d),$ [Remark: if you aware that linear transformation of uniform distribution is still a uniform distribution, just think of how to map $ca+d$ to $0$ and $cb+d$ to $1$, if not do the following.]
\begin{align}Pr( Y \le y) &= Pr(cX+d \le y)\\ &=Pr(X \le \frac{y-d}c)\\ &=\left( \frac{y-d}c-a\right)\frac{1}{b-a}\\ &= \frac{y}{c(b-a)} - \frac{a}{b-a}-\frac{d}{c(b-a)} \end{align}
We require $c(b-a)=1$ and $ac+d=0$, hence you can solve for $c$ and $d$.
Remember to take care of the case where $c<0$.