Compound of uniform and gamma probability distributions I am trying to compute the distribution of a uniform distribution whose upper limit is drawn from a gamma distribution.
That is,
$X \sim \Gamma(\alpha,\beta)$
$Y \sim U(0,X)$
We know:
$$f_X(x)={\beta^\alpha \over \Gamma(\alpha)} x^{\alpha-1} e^{-\beta x}$$
and  
$$f_{Y\mid X}(y\mid x) = 
\begin{cases}
 {1\over X} & 0 \le y \le X, \\
 0 & \text{otherwise},
\end{cases}
$$
but I get lost at the integral
$$f_Y(y) = \int_{x=0}^\infty f_{Y\mid X}(y\mid x) f_X(x)\,dx$$
I'm embarrassed to ask because I think the answer must be simple.  But it's been too long since I've done this.  I get:
$$f_Y(y)=\int_{x=0}^{x=\Gamma^{-1}(y)} 1\, dx = \Gamma^{-1}(y)$$
but I don't think that's right.  Please help! I'm a neuroscientist and I'm trying to understand a distribution I've measured.

The answer by @heropup needs adjustments when $0 < \alpha < 1$, as $\alpha^*$ then falls outside the domain for the Gamma's distribution shape parameter. Thankfully the recursive properties of both the incomplete gamma function, and the gamma function itself, allow us to circumvent this limitation. Using $\bar{\text{F}}_X(x)$ to denote a survival function :
$$\begin{align}f_Y(y) &= \frac{\beta}{\alpha-1}\bar{\text{F}}_{X^*}(y)\\
&= \frac{\beta}{\alpha-1}\frac{\Gamma(\alpha-1,\beta y)}{\Gamma(\alpha-1)}\frac{(\alpha-1)}{(\alpha-1)}\\
&= \frac{\beta}{\alpha-1}\frac{(\alpha-1)\Gamma(\alpha-1,\beta y)}{\Gamma(\alpha)}\\
&= \frac{\beta}{\alpha-1}\frac{(\alpha-1)\Gamma(\alpha-1,\beta y)}{\Gamma(\alpha)}+\frac{\beta}{\alpha-1}\frac{(\beta y)^{\alpha-1}e^{-\beta y}}{\Gamma(\alpha)}-\frac{\beta}{\alpha-1}\frac{(\beta y)^{\alpha-1}e^{-\beta y}}{\Gamma(\alpha)}\\
&= \frac{\beta}{\alpha-1}\frac{(\alpha-1)\Gamma(\alpha-1,\beta y)+(\beta y)^{\alpha-1}e^{-\beta y}}{\Gamma(\alpha)}-\frac{\beta}{\alpha-1}\frac{(\beta y)^{\alpha-1}e^{-\beta y}}{\Gamma(\alpha)}\\
&= \frac{\beta}{\alpha-1}\frac{\Gamma(\alpha,\beta y)}{\Gamma(\alpha)}-\frac{\beta}{\alpha-1}\frac{(\beta y)^{\alpha-1}e^{-\beta y}}{\Gamma(\alpha)}\\
&= \frac{\beta}{\alpha-1}\bar{\text{F}}_{X}(y)-\frac{f_X(y)}{\alpha-1}\\
&= \frac{\beta\bar{\text{F}}_{X}(y)-f_X(y)}{\alpha-1}
\end{align}$$
Which is perfectly equivalent to @heropup's answer, and now extends to the full domain of $\alpha$.
