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?