# Approximating expectation [closed]

if we are given a finite number N of points drawn from a probability distribution, expectation can be approximated as a finite sum over these points: E[f]=(1/N)(summation of f(x) over these N points).

comparing this to the actual calculation of E[f]=summation of p(x)f(x), won't the difference between the actual value and approximate value be a lot in cases where p(x) varies a lot?

-

## closed as not a real question by Nate Eldredge, George Lowther, Qiaochu Yuan, Yemon Choi, Andrés E. CaicedoJan 20 '11 at 6:39

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Yes it might. The standard deviation of the sample mean will be large if the underlying distribution has too large standard deviation (if that's what you mean by "varies a lot"). But this is far from a research level question, so not really suitable here. Maybe math.stackexchange would be a better fit? – George Lowther Jan 20 '11 at 0:24
Or stats.stackexchange.com. You are interested in something like the variance of the sample mean. – Nate Eldredge Jan 20 '11 at 3:57

$P(|s_n-\mu|>\epsilon)<\frac{\sigma^2}{n\epsilon^2}$
Where $\mu$ and $\sigma$ are true mean and standard deviation and $s_n$ is the sample mean from $n$ points.