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.

  • 5
    $\begingroup$ 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...) $\endgroup$ – Stephan Kolassa Jan 12 '16 at 23:31
  • $\begingroup$ Thank you for your comment. Yeah, the graph disproves the statement itself! $\endgroup$ – Blain Waan Jan 14 '16 at 9:47
  • 1
    $\begingroup$ 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. $\endgroup$ – whuber Jan 14 '16 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. enter image description here

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

Definitely not.

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


$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).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.