Say I'm doing Bayesian inference on a Dirichlet-Multinomial model:

$$ x \in [1,2,3]; \\ x \sim Multinomial(p_1, p_2, p_3); \\ p_1, p_2, p_3 \sim Dirichlet(\alpha_1, \alpha_2, \alpha_3); \\ \alpha_n = \alpha_{prior} + \sum (x=n) $$

I'm interested in whether $p_1 > p_2$. I can sample from the posterior for this parameter directly (in R):

alphas = c(10, 12, 5)
samp.from.dirichlet = MCMCpack::rdirichlet(100000, alphas)
delta.dirichlet = samp.from.dirichlet[,2] - samp.from.dirichlet[,1]
# Prob. that p2 > p1
mean(delta.dirichlet > 0) # > 0.66683

enter image description here

Is there a closed-form way to calculate this probability?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.