# Expected value involving a conditional multinomial distribution

$X|z$ has a multinomial distribution $MN(m, \mathbf{q}(z))$ where $z$ is either 0 or 1 with probability $1/2$. I need to find: $E_X[\max\{\Pr(z=1|X), \Pr(z=0|X\}]$. Is there an analytical form to this?

My attempt so far, but it's not really promising:

By Bayes' rule: $\Pr(z=1|X)=\frac{\Pr(X|z=1)}{\Pr(X|z=1)+\Pr(X|z=0)}$

$\Pr(X=X_0|z=1)=\exp(lgamma(m+1)+X^'_0 \log(q(z))-lgamma(X_0+1)))$ where $lgamma$ is log of the gamma function.

It can be simplified to: $\Pr(z=1|X)=\frac{1}{1+\exp(X'Q)}$ where $Q=\log(q(0))-\log(q(1))$.

I thought of doing a simulation from here but even then it's tricky. How do I simulate X when I only know the distribution of $X|z$? Also, ideally there should be an analytical solution to this?

-