# 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 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.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.752494215965271, "perplexity": 539.1040872883182}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2016-18/segments/1461860124045.24/warc/CC-MAIN-20160428161524-00134-ip-10-239-7-51.ec2.internal.warc.gz"}