1
$\begingroup$

This is one integration problem I encountered during the calculation of Bayes factor between two models given data $D$

One of the model, $M_0$ assumes the data accords to multinomial distribution, with the parameter $(\theta_1, \theta_2, \dots, \theta_k)$ and $\sum_{i=1}^k\theta_i= 1$.

Also we assume Dirichlet distribution for the prior, $\mathrm{Dir}(\alpha_1, \alpha_2, \dots,\alpha_k)$.

Now we want to calculate the marginal posterior $\mathrm{P}(D|M_0)$, which is proportional to

$\int_0^1(\prod_{i=1}^k \theta_i^{n_i + \alpha_i - 1}) \mathrm{d}(\theta_1\theta_2\dots \theta_k)$

I am stuck here, how to calculate this integral, which is subject to $\sum_{i=1}^k\theta_i= 1$?

$\endgroup$

1 Answer 1

1
$\begingroup$

I like to think of it this way: Every time you have a probability distribution, you also have the solution to an integral, since a probability distribution integrates to one by definition.

Since the Dirichlet prior is conjugate to the multinomial likelihood, the posterior distribution is also a Dirichlet. Thus, a simple way to find a solution to your integral is to match it up against the definition of the Dirichlet distribution, $$p(\boldsymbol{x}|\boldsymbol{\alpha}) = \frac{1}{\mathrm{B}(\boldsymbol{\alpha})}\prod_{i=1}^Kx_i^{\alpha_i-1},$$ where $\mathrm{B}(\cdot)$ is the multinomial beta function. Because the Dirichlet integrates to one (on the simplex), you can see that the solution to your integral is $\mathrm{B}(\boldsymbol{\alpha}+\boldsymbol{n})$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.