# Uniform-Pareto conjugate model¶

## Posterior predictive distribution¶

If $$X|\theta \sim \mathcal{U}(0, \theta)$$ with $$\theta \sim \mathcal{PA}(\alpha, \beta)$$, then the posterior predictive probability density function, the expected value and variance of $$X$$ are

$\begin{split}f(x; \alpha, \beta) = \begin{cases} \frac{\alpha}{(\alpha + 1) \beta}, & 0 < x < \beta,\\ \frac{\alpha \beta^{\alpha}}{(\alpha + 1)x^{\alpha + 1}}, & x \ge \beta \end{cases}\end{split}$
$\mathrm{E}[X] = \frac{\alpha \beta}{2(\alpha - 1)}, \quad \mathrm{Var}[X] = \frac{\alpha (\alpha^2 - 2\alpha + 4)\beta^2}{12(\alpha - 1)^2 (\alpha - 2)},$

where $$\mathrm{E}[X]$$ is defined for $$\alpha > 1$$ and $$\mathrm{Var}[X]$$ is defined for $$\alpha > 2$$.

## Proofs¶

Posterior predictive probability density function

$f(x; \alpha, \beta) = \int_x^{\infty} \frac{1}{\theta} \frac{\alpha \beta^{\alpha}}{\theta^{\alpha + 1}} \mathop{d\theta}.$

if $$x \in (0, \beta)$$ then

$f(x; \alpha, \beta) = \int_0^{\beta} \frac{1}{\theta} \frac{\alpha \beta^{\alpha}}{\theta^{\alpha + 1}} \mathop{d\theta} = \frac{\alpha}{(\alpha + 1) \beta},$

otherwise, if $$x \ge \beta$$,

$f(x; \alpha, \beta) = \int_x^{\infty} \frac{1}{\theta} \frac{\alpha \beta^{\alpha}}{\theta^{\alpha + 1}} \mathop{d\theta} = \frac{\alpha \beta^{\alpha}}{(\alpha + 1)x^{\alpha + 1}}.$

Posterior predictive expected value

$\mathrm{E}[X] = \mathrm{E}[\mathrm{E}[X | \theta]] = \mathrm{E}\left[\frac{\theta}{2}\right] = \frac{\alpha \beta}{2(\alpha - 1)}.$

Posterior predictive variance

$\begin{split}\mathrm{Var}[X] &= \mathrm{E}[\mathrm{Var}[X | \theta]] + \mathrm{Var}[\mathrm{E}[X | \theta]]\\ &= \mathrm{E}\left[\frac{\theta^2}{12}\right] + \mathrm{V}\left[\frac{\theta}{2}\right] = \frac{1}{12}\mathrm{E}[\theta^2] + \frac{1}{4}\mathrm{V}[\theta]\\ &= \frac{\alpha \beta^2}{12(\alpha - 2)} + \frac{\alpha \beta^2}{4(\alpha - 1)^2(\alpha - 2)} = \frac{\alpha (\alpha^2 - 2\alpha + 4)\beta^2}{12(\alpha - 1)^2 (\alpha - 2)},\end{split}$

the same result if obtained using

$\begin{split}\mathrm{Var}[X] &= \mathrm{E}[X^2] - \mathrm{E}[X]^2 = \mathrm{E}\left[\frac{\theta^2}{3}\right] - \left(\frac{\alpha \beta}{2(\alpha - 1)}\right)^2\\ &= \frac{\alpha \beta^2}{3(\alpha - 2)} - \frac{\alpha^2 \beta^2}{4(\alpha - 1)^2} = \frac{\alpha (\alpha^2 - 2\alpha + 4)\beta^2}{12(\alpha - 1)^2 (\alpha - 2)}.\end{split}$