Consider a real valued function $h$ on random variables, and the following sample-average function $h_S(X_1, X_2, ..., X_n) = \frac{1}{n}\sum_{i=1}^n h(X_i).$ Assume $X_1, X_2, ..., X_n$ are not independently distributed i.e. are dependent.
In the most general setting for $h,$ is it correct to claim that the second equality below holds? $-$ $$E_{X_1, X_2,..., X_n}[h_S(X_1, X_2, ..., X_n)] = \frac{1}{n}\sum_{i=1}^n E_{X_1, X_2, ..., X_n}[h(X_i)] = \frac{1}{n}\sum_{i=1}^n E_{X_i}[h(X_i)]$$
My approach is as follows ($f$ is the joint pdf of $X_1, X_2, ..., X_n$) $-$
$$\begin{align*}E_{X_1, X_2, ..., X_n}[h(X_1)] &= \int_{X_1, X_2, ..., X_n} h(X_1) \,\, f(X_1, X_2, ..., X_n) \,\, dX_1 dX_2 ... dX_n \\ &= \int_{X_1} h(X_1) \left(\int_{X_2, ..., X_n} f(X_1, X_2, ..., X_n) \,\, dX_2 dX_3 ... dX_n \right) dX_1\\&= \int_{X_1}h(X_1) f(X_1) \,\, dX_1 = E_{X_1}h(X_1). \end{align*}$$
My questions:
- Is the above reasoning correct? (I am unsure of the integral splitting -- is it always possible?)
- Is there a cleaner (more elegant) way to see this?
Thanks!
As pointed out in the comments, the subscripts in the expectations don't make much sense and can be ommited. Even simpler: you have the random variables $Y_i=h(X_i)$.
And for any set of random variables (independent or not) is true that $ E[a (Y_1+Y_2)] = a (E[Y_1] + E[Y_2])$ (expectation is a linear operator).
Then, indeed
$$E\left[ \frac{1}{n} \sum_i Y_i\right] = \frac{1}{n} \sum_i E[Y_i]$$
The only condition you need is that $Y_i=h(X_i)$ have finite mean.