I have been stuck on the following question
If $X$ has a cumulative distribution $F(x)$, then show $Y = F(X)$ has a uniform distribution with $U(0,1)$.
I attempted to solve this problem by first finding the cumulative distribution function $F(Y) = P(Y \le y)$ and we sub in $Y$ to get $$F(Y) = P(F(X) \le y)=\int f(F(X)dx = F(F(y)) - F(F(a)) = \frac{y+2ab-a}{(b-a)^2}$$ I'm not sure how this result helps me at all so any feedback is much appreciated.
$$F(y) = P(F(X) \leq y)=P(X\leq F^{-1}(y))=F(F^{-1}(y))=y$$
Notice that $y\in[0,1]$ as $F(X)\in[0,1].$