Expected value of expression involving multinomial random variables and Heaviside step function of said variables Question 1
I have the following expression:
$H/S$,
where $H=\begin{cases}0,& \text{ if } rm\leq dj \\ 1, & \text{ if } rm>dj \end{cases}$ and $S=n-j$, and both $m$ and $j$ are drawn from the same multinomial distribution with number of trials $n$. The support of the multinomial distribution includes three discrete random variables: $m$, $d=S-m$, and $j$, which occur respectively with probabilities $x$, $y$, and $z=1-x-y$. I want to take the expected value of this expression. I know that $E[tu]\neq E[t]E[u]$ in general.
So my first question is, how do I compute the expected value of $H/S$, i.e., $E[H/S]$?
Question 2
In a related question, what is the expected value of $H$? Is it 
$E[H]=\begin{cases}0,& \text{ if } rE[m]\leq dE[j] \\ 1, & \text{ if } rE[m]>dE[j] \end{cases}$?
Thank you, CV.
(Also, that is the most $\LaTeX$ I've written in a single document so far. Go me!)
 A: If the random variable $H = H(X,Y,Z)$ is a function of three integer-valued random variables $X, Y$, and $Z$ that take on values in $[0, n]$
and whose joint probability mass function is 
$$p_{X,Y,Z}(n_1,n_2,n_3) = P\{X = n_1, Y = n_2, Z = n_3\}, ~0 \leq n_1,n_2,n_3 \leq n,$$
then 
$$E[H] = \sum_{n_1=0}^n\,\sum_{n_2=0}^n\,\sum_{n_3=0}^nH(n_1,n_2,n_3)p_{X,Y,Z}(n_1,n_2,n_3).$$
It is not necessary that $H$ be expressible as a "nice" formula 
such as $X+Y+Z$ in order to use the above formula.
Here, 
$$p_{X,Y,Z}(n_1,n_2,n_3) = 
\begin{cases}\dfrac{n!}{n_1!n_2!n_3!}x^{n_1}y^{n_2}(1-x-y)^{n_3},
& \text{if}~ n_1 + n_2 + n_3 = n,\\
\quad\\
0, & \text{otherwise},\end{cases}$$
is a $(n+1)\times(n+1)\times(n+1)$ array with lots of zeroes in it,
as is $H(n_1,n_2,n_3)$ which is an array of zeroes and ones.  Thus,
$E[H]$ is actually the probability of an event.
Similarly, $H(n_1,n_2,n_3)/S(n_1,n_2,n_3)$ is an array with lots of zeroes
in it but the nonzero entries are $1/S(n_1,n_2,n_3)$ and
$$E\left [\frac{H}{S}\right]
= \sum_{n_1=0}^n\,\sum_{n_2=0}^n\,\sum_{n_3=0}^n
\frac{H(n_1,n_2,n_3)}{S(n_1,n_2,n_3)}p_{X,Y,Z}(n_1,n_2,n_3).$$
