Distribution of continuous uniform RV with upper limit being another continuous uniform RV

If $X \sim U(a, b)$ and $Y \sim U(a, X)$, then can I say that $Y \sim U(a, b)?$

I am talking about continuous uniform distributions with limits $[a, b]$. A proof (or disproof!) will be appreciated.

-
No, it isn't. In R: hist(runif(1e4,0,runif(1e4))) pretty clearly shows that $Y$ is certainly not uniformly distributed. (I'm posting this as a comment since you asked for a proof, which shouldn't be hard, but to be honest, given the skewed histogram, I don't think a proof is necessary...) – Stephan Kolassa Jan 12 at 23:31
Thank you for your comment. Yeah, the graph disproves the statement itself! – Blain Waan Jan 14 at 9:47
A change of location and scale makes $a=0,b=1$, in which case for any number $y\in[0,1]$, $\Pr(Y\le y)=y/X$ provided $X\ge y$ (and is $0$ otherwise). Use $\Pr(X\ge y)=1-y$ to work out that conditional probability. – whuber Jan 14 at 13:13

We can derive the distribution of $Y$ analytically. First, notice that it is $Y|X$ that follows the uniform distribution, i.e.

$$f\left(y|x \right) = U(a, X)$$

and so

\begin{align} f(y) = \int_{-\infty}^{\infty} f(y|x) f(x) dx & = \int_{y}^{b} \frac{1}{x-a} \frac{1}{b-a} dx \\ & = \frac{1}{b-a} \int_{y}^{b} \frac{1}{x-a} dx \\ &= \frac{1}{b-a} \left[ \log(b-a)-\log(y-a) \right] ,\quad a<y<b \end{align}

which is not a uniform distribution on account of $\log(y-a)$. Here is what the simulated density looks like for a $U(0,1)$ distribution, overlaid with what we just computed.

y <- runif(1000, 0, runif(1000,0,1))
hist(y, prob =T)
curve( -log(x), add = TRUE, lwd = 2)

-
Thank you @JohnK – Blain Waan Jan 14 at 9:48

Definitely not.

For simplicity, let us define $a = 0, b = 1$.

Then

$P(Y > 0.5) = P(Y > 0.5 | X > 0.5)P(X > 0.5)$

$< P(X< 0.5) = 0.5$

Because of the strict inequality, it is not possible that $Y \sim$ Unif(0,1).

-
Thank you @Cliff AB – Blain Waan Jan 14 at 9:48