Let $X$ be uniformly distributed in the unit interval $(0, 1)$. find density of $Y$ which is uniformly distributed on interval $(0,X)$.

probabilityprobability distributionsprobability theoryrandom variablesuniform distribution

let $X$ be uniformly distributed in the unit interval $(0, 1)$. find density of $Y$ which is uniformly distributed on interval $(0,X)$.

MY WORKING

Since $Y$ is uniformly distributed over $(0,X)$, the pdf of $Y$ is: $f_Y(y)=\frac{1}{x-0}=\frac{1}{x}.$

I know the result doesn't make any sense. The pdf should be in terms of $y$ not $x$, also I have applied the correct procedure for finding the pdf of uniformly distributed random variable which is: $f_X(x)=\frac{1}{b-a}$. where $X$ is uniformly distributed over $(a,b)$. So I dont understand Where am I making mistake?

Any guidance will be appreciated. Thanks

Best Answer

You have to condition on $X$ and then take the expectation.

$P(Y \leq y)=EP(Y\leq y|X)$ and $P(Y\leq y|X)=\frac y X $if $y \leq X$ and $1$ if $y >X$. So $P(Y \leq y)=\int_y^{1}\frac y x dx+y =y-y\ln y$ for $0<y<1$. Differentiating this we get $f_Y(y)=-\ln y, 0<y<1$.