Here is the problem definition:

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

$\displaystyle s \sim Multinomial(\theta_1)$

$\displaystyle m \sim Multinomial(\theta_2)$

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

$\displaystyle \theta_1 \sim Dirichlet(\beta_1)$

$\displaystyle \theta_2 \sim Dirichlet(\beta_2)$

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

$\displaystyle

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 \\

$

Can anybody please help me solving this integration?

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

$\displaystyle

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.