When does $E\left[\frac{X \cdot Y}{\sum X_i}\right] = \frac{E[X] \cdot E[Y]}{E \left[\sum X_i\right]} $? Suppose $X$ and $Y$ are two vectors of random variables. Under what constraints on their joint distribution is
$$\operatorname{E}\left[\frac{X \cdot Y}{\sum X_i}\right] = \frac{\operatorname{E}[X] \cdot \operatorname{E}[Y]}{\operatorname{E}\left[\sum X_i\right]} $$
true? It is sufficient to have $X_i$ independent of $Y_i$ for all $i$?
 A: Edit: below I am considering $Y_i$ independent of $X$, which is already stronger than the condition you suggest.
Note first that for your terms to make sense, you need to assume for instance $\sum X_i\neq 0$ almost surely.
Now, your condition is not sufficient. Under it, we only get
$$E\left[\frac{X\cdot Y}{\sum X_i}\right] = E\left[\frac{X}{\sum X_i} \right]\cdot E[Y].$$
However, in general,
$$E\left[\frac{X}{\sum X_i} \right] \neq \frac{E[X]}{E[\sum X_i]}.$$
As a counterexample, consider $X=(X_1,X_2)$ with $X_1\sim$ Bernoulli$(1/2)$ and $X_2 = 1 + X_1 B$ with $B\sim$ Bernoulli$(1/2)$, independent of $X_1$.
On the other hand, you equality holds if we also assume that $X=(X_1,…,X_n)$ is exchangeable, namely its distribution is the same as that of $X_{\sigma}:=(X_{\sigma(1)},…,X_{\sigma(n)})$ for any permutation $\sigma$ on $\{1,…,n\}$. Exchangeability is stronger than $X_1,…,X_n$ being identically distributed but weaker than $X_1,…,X_n$ being i.i.d.
To see that exchangeability suffices, note that then, the distribution of $X_j/(\sum_i X_i)$ does not vary with $j\in\{1,…,n\}$. As a result, for any $j=1,…,n$,
$$E\left[\frac{X_1}{\sum X_i} \right]=…=E\left[\frac{X_n}{\sum X_i} \right]=\frac{1}{n} E\left[\frac{\sum X_i}{\sum X_i} \right]=\frac{1}{n}=\frac{E(X_j)}{\sum_i E(X_i)}.$$
