# Thread: a Multinomial-Dirichlet integration with two parameters

1. ## a Multinomial-Dirichlet integration with two parameters

Here is the problem definition:

s and m are independent variables, and both have a multinomial distribution with given parameters $\theta_1$ and $\theta_2$ respectively:

$s \sim Multinomial(\theta_1)$
$m \sim Multinomial(\theta_2)$

Dirichlet priors are defined for $\theta_1$ and $\theta_2$ with parameters $\beta_1$ and $\beta_2$ respectively:

$\theta_1 \sim Dirichlet(\beta_1)$
$\theta_2 \sim Dirichlet(\beta_2)$

I need to solve this integral over $\theta_1$ and $\theta_2$ values to integrate them out:

$
p = \int{\int{p(s|\theta_1)p(\theta_1|\beta_1) p(m|\theta_2)p(\theta_2|\beta_2) d_{\theta_1}d_{\theta_2}}} \nonumber \\
$

Dirichlet distribution is conjugate for Multinomial and easy to find the result for one parameter:

$
p = \int{p(s|\theta_1)p(\theta_1|\beta_1) d_{\theta_1}} \nonumber \\
$

However, with two parameters I could not solve the integration. If anybody has got even a small idea, I would be very grateful. It is really crucial for my research. And if you have an idea, if it is possible to separate the integral in two parts, and calculate two integrals separately, can you please let me know, so I can solve two integrals separately.
Thank you very much in advance.

2. fill in the exact distributions and I may be able to help you.

3. Thank you for the help offer.
I wanted to inform that I learned that double integral can be separated in two parts in a way that each integral will have the parameters which are being integrated. Then no need is left for doing a multiple integration here.
Many thanks anyway.