# Marginal prior distribution with restricted parameters

I'm analysing one paper on bayesian inference for network reliability and got stuck at trying to validate some (quite simple at first sight) formulas. Suppose the probabilities of failure has truncated beta distribution as a prior:
$$\pi _{1}\left ( p_{i}|\gamma ,\alpha \right )=\frac{\alpha \left ( 1-p_{i} \right )^{\alpha -1}}{\left ( 1-\gamma \right )^{\alpha }}, i=\overline{1,n}, \gamma <p_{i}<1$$ where $\gamma$ is a lower threshold on $p_{i}$ and $\alpha$ is just a fixed parameter (i.e. has no prior density). The second stage prior is for parameter $\gamma$ and is a beta distribution with parameters $\alpha +1$ and $1$. That is,
$$\pi _{2}\left ( \gamma |\alpha \right )=(\alpha +1)(1-\gamma)^{\alpha},\, 0<\gamma <1, \, 0<\alpha<1$$

I want to find prior of $p_{i}$ conditional on $\alpha$ alone, i.e. $\pi\left( p_{i}|\alpha\right)$. I apply the decomposition $$\pi \left ( p_{i}, \gamma|\alpha \right )=\pi_{1}\left ( p_{i}|\gamma,\alpha \right )\cdot \pi_{2}\left ( \gamma|\alpha \right )$$ And marginalization over $\gamma$ should give what I'm looking for: $$\pi\left( p_{i}|\alpha\right)=\int_{0}^{1}\alpha\left ( \alpha +1 \right )\left ( 1-p_{i} \right )^{\alpha -1}d\gamma=\alpha\left ( \alpha +1 \right )\left ( 1-p_{i} \right )^{\alpha -1}$$ But this does not integrate to one and the paper gives another answer (which does integrate to one): $$\pi\left( p_{i}|\alpha\right)= \alpha\left ( \alpha +1 \right )p_{i}\left ( 1-p_{i} \right )^{\alpha -1}$$ And I can't figure out what I'm missing. Maybe someone could give me a clue what I'm missing?

-
According to the conditions in the first equation, shouldn't the upper limit in your integral be $p_i$? – whuber Apr 2 '12 at 20:14
Yes, you are absolutely right. I completely overlooked it. Thank you for spotting. – Tomas Apr 2 '12 at 20:30