I want to compute the expected value of a multivariate function f(x)
wrt to dirichlet distribution. My problem is "penta-nomial" (i.e 5 variables) so calculating the explicit form of the expected value seems unreasonable. Is there a way to numerically integrate it? Is there some package (e.g in R) that can let me do that? I realize I can solve it using first principle but I want the computation to be really fast.
f(x) = \sum_{0,4}(q_i*log(n/q_i))