# Expected value with dependent samples

It is well known that the expected value of a function can be approximated with i.i.d. samples:

$$E_X[f(X)] = \frac{1}{n}\sum_{i=1}^n f(x_i),\quad x_i\sim_{i.i.d.} X$$

What methods exist to approximate the expected value of the function when only "dependent" samples are available? What does it actually mean to have i.i.d. samples in this context?

On a related question, how would one go about checking that a sample $$\{x_1,x_2,\ldots,x_n\}$$ is drawn i.i.d. from some random variable $$X$$?

• MCMC and SMC algorithms rely on dependent samples and still approximate the expectation with converging and sometimes unbiased estimators. – Xi'an Jan 19 at 7:47

1) As long as you assume that the $$x_i$$ all come from the same distribution, the sample mean of the $$f(x_i)$$ (as given in your posting) is at least unbiased. I don't think that without information about the specific dependence structure you can do better than that, although dependence may make this estimator much less precise.