0
$\begingroup$

If $X$ follows a gamma distribution with parameters $\alpha$ and $\beta$ then:

$ p(x|\alpha,\beta) = \frac{\beta^{\alpha}x^{\alpha-1}e^{-\beta x}}{\Gamma(\alpha)}$ with $\Gamma(\alpha) = (\alpha - 1)!$

Then, $mean(x) = \frac{\alpha}{\beta}$

But, if for $x$ we have this probability density function instead:

$ p(x|\alpha,\beta) = K \times \beta^{\alpha}x^{\alpha-1}e^{-\beta x} $ with no $\Gamma(\alpha)$ and $K$ a constant value

What would be the $mean$ value of $x$ in this case ?

Best regards

Aymeric

$\endgroup$

3 Answers 3

1
$\begingroup$

Simply your density (that is a posterior density) is not exactly a density. The correct one is

$$p(\mathbf{x}|a,b)\propto b^a x^{a-1}e^{-xb}$$

The constant must be calculated in order to let $p(\mathbf{x}|a,b)$ be a nice density.

This constant $K$ can be calculated using Bayes Theorem (integrating the denominator of Bayes Theorem ) or simply recognizing in your posterior the kernel of a Gamma distribution, thus

$$K=\frac{1}{\Gamma(a)}$$

and your expectation is exactly what you showed, $\frac{a}{b}$

$\endgroup$
2
  • $\begingroup$ Thank you, so we don't use K in the calculus of the mean ? even if I change K to be of ANY value ? $\endgroup$
    – ailauli69
    Nov 23, 2020 at 8:38
  • $\begingroup$ @ailauli69 ; as you stated in the title: your posterior is a "unnormalized" distribution...say it is NOT yet a density but only a function that is "similar" to a density...First normalize it than calculate the mean...take a look at the following example: $y=K\cdot e^{-\frac{(1-x)^2}{8}}$. What kind of distibution is this? Which is its expectation? Which is its variance? $\endgroup$
    – tommik
    Nov 23, 2020 at 8:55
0
$\begingroup$

Note that $$\int_{0}^{\infty} \frac{\beta^{\alpha}e^{-\beta x}}{\Gamma(\alpha)} x^{\alpha-1} dx=1$$ If you use $\int_{0}^{\infty} x^{m} e^{-kx}dx=k^{-m-1} \Gamma(m+1).$ Next the expatation value of $x$ is $$E(x)=\int_{0}^{\infty} \frac{\beta^{\alpha}e^{-\beta x}}{\Gamma(\alpha)} x^{\alpha} dx=\frac{\beta^{\alpha}}{\Gamma(\alpha)}\beta^{-\alpha-1} \Gamma(\alpha+1)=\frac{\alpha}{\beta}.$$

$\endgroup$
0
$\begingroup$

You have a misconception about probability densities. If $f_X(x)$ is a density for some real-valued random variable $X$, then we require $$\int_{x = -\infty}^\infty f_X(x) \, dx = 1.$$ Equivalently, if we wish to avoid using indicator functions, we can write the above as an integral over the support $\Omega$ of $X$: $$\int_{x \in \Omega} f_X(x) \, dx = 1.$$ In the case of a gamma distribution, the support is $X \in [0, \infty)$.

As such, you are not free to choose any value of $K$ in the function $K \beta^\alpha x^{\alpha-1} e^{-\beta x}$. You are constrained because when integrated on $[0,\infty)$, the result must be $1$, otherwise it is not a density. This forces $K = 1/\Gamma(\alpha)$.

In fact, if we remove all of the factors that are independent of $x$, i.e. we consider the kernel of the gamma density $$x^{\alpha-1} e^{-\beta x},$$ the unique constant $K$ that makes this kernel a density function is precisely $$K = \frac{\beta^\alpha}{\Gamma(\alpha)}.$$

$\endgroup$
1
  • $\begingroup$ So, as long as I have the Kernel of a gamma density in my pdf (proba density function) eventhough it's multiplied by a constant, I can compute the mean(x) as alpha/beta ? $\endgroup$
    – ailauli69
    Nov 23, 2020 at 10:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .