[Math] Mean and variance of truncated generalized Beta distribution

probabilityspecial functions

The generalized Beta probability density function is given by:

$$f(x) = \frac{(x-A)^{\alpha – 1} (B-x)^{\beta – 1}}{(B-A)^{\alpha + \beta – 1} \mathrm{B}(\alpha ,\beta)}$$

for $A<x<B$, and $f(x) = 0$ otherwise. Here $\alpha>0$ and $\beta>0$.

Let $g(x)$ be a truncated version of this distribution in the interval $[a,b]$, where $A\le a \le b \le B$. That is, $g(x)\propto f(x)$ if $a\le x\le b$, with a proportionality constant that normalizes $g(x)$, and $g(x)=0$ otherwise.

Write explicit formulas (without integrations or infinite sums; you can use special functions) for the first and second moments of $g(x)$:

$$\langle x \rangle_g = \int_{-\infty}^\infty x g(x)\mathrm{d}x$$

$$\langle x^2 \rangle_g = \int_{-\infty}^\infty x^2 g(x)\mathrm{d}x$$

Best Answer

I found explicit formulae using the generalized incomplete Beta function defined as follows (this is a standard special function available in numerical packages):

$$\mathrm{B}\left(z_{1},z_{2};\alpha,\beta\right)=\int_{z_{1}}^{z_{2}}x^{\alpha-1}\left(1-x\right)^{\beta-1}\mathrm{d}x$$

It follows that

$$g(x) = \frac{1}{Z}\left(x-A\right)^{\alpha-1}\left(B-x\right)^{\beta-1}$$

with the normalization constant

$$Z=\int_{a}^{b}\left(x-A\right)^{\alpha-1}\left(B-x\right)^{\beta-1}\mathrm{d}x =\left(B-A\right)^{\alpha+\beta-1}\mathrm{B}\left(a,b;\alpha,\beta\right)$$

Instead of computing $\left\langle x\right\rangle$ and $\langle x^2\rangle$ directly, we compute $\langle x-A\rangle$ and $\langle (x-A)^{2}\rangle$. We have:

$$\left\langle x-A\right\rangle =\frac{1}{Z}\int_{a}^{b}\left(x-A\right)^{\alpha}\left(B-x\right)^{\beta-1}\mathrm{d}x =\frac{1}{Z}\left(B-A\right)^{\alpha+\beta}\mathrm{B}\left(a,b;\alpha+1,\beta\right) =(B-A)\frac{\mathrm{B}\left(a,b;\alpha+1,\beta\right)}{\mathrm{B}\left(a,b;\alpha,\beta\right)}$$

and, similarly:

$$\langle \left(x-A\right)^{2}\rangle =\left(B-A\right)^{2}\frac{\mathrm{B}\left(a,b;\alpha+2,\beta\right)}{\mathrm{B}\left(a,b;\alpha,\beta\right)}$$

From these it is easy to get $\langle x \rangle$ and $\langle x^2 \rangle - \langle x \rangle^2$:

$$\langle x \rangle = \langle x - A \rangle + A$$

$$\langle x^2 \rangle - \langle x \rangle^2 = \langle (x-A)^2 \rangle - \langle x-A \rangle^2$$

Perhaps some simplifications are possible, but I do not know them. If someone can help on that it would be awesome.