# Expectation of a sum of equally distributed random variables

I'm studying the following term:

$$W_{ij} = \frac{1}{n(n-1)E[f(X_1,X_2)]} \sum_{i\neq j}^n f(X_i,X_j)Y_j,$$

where $$(X_i, Y_i)$$ is a sequence of equally distributed random pairs and $$f$$ a measurable function.

Question: Does $$E(W_{ij})=\frac{E[f(X_1,X_2)Y_2]}{E[f(X_1,X_2)]}$$ hold?

Considerations:

To get this result, one has to show that $$E[f(X_i,X_j)Y_j] = E[f(X_1,X_2)Y_2], \forall i \neq j$$, which I believe is false in general.

Take for example $$Y = 1$$ and $$f(x, y) = xy$$. It's not correct to say that $$E(X_iX_j) = E(X_1X_2)$$ for $$i \neq j$$, only using the equality in distribution, right? If we add independecy, $$E(X_iX_j) = E(X_i)E(X_j) = E(X_1X_2)$$.

Being more specific

In my case, I have $$f(x,y)=[g(x)]^2h(x)h(y)-g(x)h(x)g(y)h(y)$$, with g,f measurable. For simplicity's sake, denote $$g(X_k):=g_k$$ and $$h(X_k)=h_k$$. If I assume $$(X_i,Y_i)_{i\in\mathbb{N}}$$ is also independent, then each $$X_i$$ is independent of $$X_j$$ and $$Y_j$$, for $$i\neq j$$.

That said, we have

\begin{align} E(f(X_i,X_j)Y_j)&=E(g_i^2h_ih_jY_j)-E(g_ih_ig_jh_jY_j)\\ &\overset{indep.}{=}E(g_i^2h_i)E(h_jY_j)-E(g_ih_i)E(g_jh_jY_j)\\ &\overset{i.d.}{=}E(g_1^2h_1)E(h_2Y_2)-E(g_1h_1)E(g_2h_2Y_2)\\ &=E(f(X_1,X_2)Y_2). \end{align}

But when $$(X_i,Y_i)_{i\in\mathbb{N}}$$ is dependent, the above equality does not hold in general.

Are my thoughts right?

• A naive question to check: By “equally distributed” do you mean “identically distributed” or “distributed according to a uniform distribution”? I’m guessing “identically distributed” but that seems to lead to triviality?
– PtH
Commented Feb 5, 2021 at 14:43
• I meant $F_{X_i,Y_i}=F_{X_j,Y_j}$ where $F$ is the probability distribution of the pair $(X,Y)$ Commented Feb 5, 2021 at 14:49

Suppose $$g(x) = x$$, $$h(x) = x$$ and that for some $$i \neq j$$ we have $$X_i = X_j = Y_j$$ (which is allowed under dependence). Then at line 1 the second term is $$E(Y_j^5)$$. But in general, $$E(Y_j^5) \neq E(Y_j^2)E(Y_j^3)$$, versus the step to line 2 which is valid under assumption of independence.
(Strictly, this example answer doesn’t prove that an assumption of independence is necessary for the original equation proposed for $$E(W_{ij})$$. But it does indicate that without such an assumption, the equality isn’t obvious.)