Talk:Expected value/Archive 2

Infinite expectation
In many phrases of this article it is meant that existence of expectation does not automatically imply that it is finite. Well, one often say "this expectation is plus infinity" (or "minus infinity"). Nevertheless for some authors "existence of expectation" excludes infinite cases. Anyway, the article does not explain in detail, what is meant by infinite expectation, and is not consistent in this aspect. In particular, Section "Finite case": what about a random variable that is equal to plus infinity with probability 1/2 and to minus infinity with probability 1/2? Section "Countably infinite case": "If the series does not converge absolutely, we say that the expected value of X does not exist" — really? Section "Basic properties": "$$\operatorname{E}|X|$$ exists and is finite" — but if the infinite case is included into "exists", then the word "exists" here is superfluous. And so on. Boris Tsirelson (talk) 15:28, 8 October 2017 (UTC)


 * You hit a nail on the head. I haven't been using it consistently, and, yes, I am aware of this. Now that you have pointed this out, I will fix it. The convention I follow is this: if $$X$$ is measurable, then $$\operatorname{E}[X]$$ (by def.) exists unless $$\operatorname{E}[X_+]=\operatorname{E}[X_-]=+\infty$$. I think, this is the best approach. Otherwise, functions can be legally infinite but expectations can't be. When a function is infinite, no one says the function doesn't exist. Note that conditional expectations are functions, too. So, once we've legitimized infinity in one place, we may want to legitimize it everywhere.


 * On the verbal side, one can unambiguously say "e. v. exists (and possibly infinite)" instead of just "e. v. exists". And "e. v. is finite" is an obvious shortcut for $$\operatorname{E}[X_+]<\infty$$ and $$\operatorname{E}[X_-]<\infty$$.


 * I may not have much time left this weekend to handle this, but about a week from now I should. StrokeOfMidnight (talk) 16:34, 8 October 2017 (UTC)


 * Nice. I support the same convention "exists unless $$\operatorname{E}[X_+]=\operatorname{E}[X_-]=+\infty$$". I just want the article to be consistent. Measurability should not be mentioned more than once, since a non-measurable function is never called a random variable. And maybe it should be noted that some sources use another convention: "exists unless $$\operatorname{E}[X_+]=+\infty$$ or $$\operatorname{E}[X_-]=+\infty$$". Boris Tsirelson (talk) 17:39, 8 October 2017 (UTC)
 * By the way, see Talk:Student's t-distribution. Boris Tsirelson (talk) 14:16, 10 October 2017 (UTC)


 * The best thing to do, I think, is to say "finite", "infinite", and "neither finite nor infinite". If we really want to say "exists" or "doesn't exist", we should give an immediate clarification in parentheses, as in: "if X has a Cauchy  distribution, then E[X] does not exist (finite or infinite)"; or "if a moment is not finite, then neither are the higher ones". That way, we don't need a special conventions for the meaning of "exists", and even if we use this word inconsistently, we will be forgiven because we always explain ourselves immediately and unambiguously. StrokeOfMidnight (talk) 20:30, 11 October 2017 (UTC)

Okay, this is how I handle one of the problems you pointed out. First, the definition must be simple, so no fiddling with $$\operatorname{E}[X_+]$$ and $$\operatorname{E}[X_-]$$. On the other hand, it must be consistent with the main definition. The solution is to restrict the notion of "Countably infinite case" to the situations where the series converges absolutely. This simple definition does not extend to the cases when there is no absolute convergence even if the number of outcomes is countably infinite. StrokeOfMidnight (talk) 21:36, 13 October 2017 (UTC)

Regarding "exist"/"does not exist" terminology, the article should be consistent now. StrokeOfMidnight (talk) 23:03, 13 October 2017 (UTC)


 * Yes, now it is consistent, at the expense of excluding the infinity. The reader may think that the negation of "finite expectation" is "infinite expectation", which is an oversimplification. Boris Tsirelson (talk) 09:51, 14 October 2017 (UTC)


 * This last one can be fixed by explaining what "non-finite" means. E.g., "$$ \operatorname{E}[X] $$ is non-finite, i.e. $$ \max(\operatorname{E}[X_+],\operatorname{E}[X_-]) = \infty$$" which would have to be done every time. StrokeOfMidnight (talk) 11:36, 14 October 2017 (UTC)


 * Yes... but one may ask: so, what exactly is called a non-finite expectation? Clearly, not a real number; but is it $$+\infty,$$ or $$-\infty,$$ or $$\pm\infty,$$ or something else?
 * " $$\operatorname{E}[X]$$ is neither finite nor infinite, i.e. $$ \operatorname{E}[X_+] = \operatorname{E}[X_-]=\infty$$ "; so, $$ \operatorname{E}[X] = ?$$
 * Also, " If the probability distribution of $$X$$ admits a probability density function $$f(x)$$, then the expected value can be expressed through the following Lebesgue integral: $$   \operatorname{E}[X] = \int_{-\infty}^\infty x f(x)\, dx$$ "; does it mean that this Lebesgue integral exists necessarily? and what happens otherwise? Boris Tsirelson (talk) 17:49, 14 October 2017 (UTC)


 * On the first one, do you like "undefined" better? On the second one, I think it says it all: both sides are finite, infinite, or undefined simultaneously. StrokeOfMidnight (talk) 21:16, 14 October 2017 (UTC)


 * First: yes, "undefined" and "does not exist" are equally OK with me.
 * Second: maybe; but should the reader guess? Generally, "a=b" often means "both defined, and equal" or even "both finite, and equal". Would you like, for example, the equality $$\int_{-\infty}^{+\infty} x \,

dx = 0^0$$ ? Boris Tsirelson (talk) 17:44, 15 October 2017 (UTC)


 * On the first point, both "undefined" and "doesn't exist" are fine with me. Or, we could just say point blank $$\operatorname{E}[X]=\infty-\infty$$. That would answer your question "$$\operatorname{E}[X]=$$?" On the second one, I think that the editor who added this formula got it exactly right, but what wording do you suggest? Am I missing some hidden subtlety here? Anyhow, I'll deal with all this (and more) next weekend. StrokeOfMidnight (talk) 21:03, 15 October 2017 (UTC)


 * On the second: I bother about mathematical maturity of the reader, not the writer. Wording: "The two sides may be both finite, both $$+\infty,$$ both $$-\infty,$$ or both undefined." On the first: the set $ℝ ∪ {–∞, +∞}$ is the well-known extended real number line, but the set $ℝ ∪ {–∞, +∞, ∞-∞ }$ may be criticized as WP:OR. Boris Tsirelson (talk) 05:30, 16 October 2017 (UTC)


 * If that's the case, then we could DEFINE $$\operatorname{E}[X]=\int^{+\infty}_{-\infty}xf(x)\,dx$$ in the section called "absolutely continuous case". Then, in "General case", we would remark that the general definition is consistent with those given earlier for special cases. We may also want to prove the formula, to show that the sub-definition is indeed consistent.


 * There are two advantages in doing it this way: first, this keeps the definition simple; second, we've already used this approach in finite and countably infinite cases, so why not be methodologically consistent? StrokeOfMidnight (talk) 20:48, 16 October 2017 (UTC)


 * OK with me. Boris Tsirelson (talk) 06:46, 17 October 2017 (UTC)

Circular logic
I've accidentally introduced some circular logic into the proofs, so I'm going to make a few changes to fix that. StrokeOfMidnight (talk) 00:34, 22 October 2017 (UTC)

Absolutely continuous case
The recently added remarks are strange. I never saw such Lebesgue integral taken over $$[-\infty,+\infty],$$ but always over $$(-\infty,+\infty).$$ For a finite interval, yes, it is appropriate to say that the endpoints are a negligible set. But infinities are never (well, maybe seldom) included; and a function (as the density) is never (well, maybe seldom) defined on $$[-\infty,+\infty];$$ the sumbol $$f(+\infty)$$ usually means the limit, not the value, of the function at infinity. And by the way, a density need not have a limit at infinity. If it has, the limit is zero, of course. But a density may have narrow peaks accumulating at infinity. Boris Tsirelson (talk) 07:36, 21 October 2017 (UTC)


 * Regarding the third sentence you wrote: finite or infinite (in the geometric sense), Lebesgue integral doesn't care. From the Lebesgue integral's point of view, everything is finite in our case, as $$ \operatorname{P} ( \Omega ) = 1 $$.
 * Re the fourth sentence (first part): we don't choose whether infinities are included. It's up to the random variable to decide. I wish we could change the reality on a whim. :)
 * Re the fourth sentence (second part): you are right; density function may or may not be explicitly defined for any $$ a\in [-\infty, +\infty] $$, and it's of no consequence, as $$\operatorname{P}(X=a) = 0$$ (for absolutely continuous random variables), meaning that $$a$$ does not contribute to $$\operatorname{E}[X]$$.
 * Of course there are meaningful cases when the density function has no limit at infinity.
 * So, the definition in the article goes like this: first, we define $$\operatorname{E}[X]$$ using some notation $$\textstyle \int^{+\infty}_{+-\infty}$$ which no one knows what that notation means. Then we clarify that, in fact, the outcome of the integration doesn't change whether we integrate over $$ [-\infty,+\infty], $$ $$ (-\infty,+\infty], $$ $$ [-\infty,+\infty), $$ or $$ (-\infty,+\infty), $$ so we may as well integrate over $$ (-\infty,+\infty) $$. For those unfamiliar with Lebesgue integration, we quickly point out that they can often view it as a Riemann integral. By the way, the notation $$\textstyle \int^{+\infty}_{+-\infty}$$ is novice-friendly, which is what we try to achieve. The novice will instantly assume that the integral is over $$( -\infty, +\infty )$$ which is fine. StrokeOfMidnight (talk) 11:47, 21 October 2017 (UTC)


 * UPDATE. I just thought of something. For the absolutely continuous case, we could ASSUME that the random variable takes its values in $$( -\infty, +\infty ).$$ This will satisfy the practitioners and avoid playing too much with infinity. StrokeOfMidnight (talk) 12:24, 21 October 2017 (UTC)


 * Do we ever consider $$f(X),$$ the composition of the random variable and its density? Probably, not. The density is the Radon-Nikodym derivative of the distribution of X w.r.t. Lebesgue measure, right? I never saw Lebesque measure on $$[-\infty,+\infty],$$ but always on $$(-\infty,+\infty).$$ (No problem to define it, of course; but who needs it?) And if so, then the density need not be defined at infinity, even if X takes this value (on a negligible set). And if it does so with positive probability, then we have no idea of its "density", right? Boris Tsirelson (talk) 15:05, 21 October 2017 (UTC)
 * And anyway, the Radon-Nikodym derivative is not quite a function, but rather an equivalence class, right? Thus, it need not be defined on the negligible set (of the two infinities), even if they belong to our space... Boris Tsirelson (talk) 15:27, 21 October 2017 (UTC)


 * I added the assumption that $$X$$ only takes on finite values. StrokeOfMidnight (talk) 15:39, 21 October 2017 (UTC)


 * Yes, but it is not clear what is required: finiteness almost surely, or finiteness surely? It is unusual to say "surely" when it is possible to say "almost surely". Boris Tsirelson (talk) 05:47, 22 October 2017 (UTC)


 * About linearity: yes, now it is as general as possible, but... it is no more linearity! Linearity should be linearity of a mapping from one linear space to another. Here it is $$L_1(\Omega)\to\mathbb R.$$ Your more general property could be better called additivity.


 * And generally, you are at risk of "original research" accusation; you write what you like, in the form you like, while you should write what is written in textbooks. And again, proofs are generally unwelcome. Boris Tsirelson (talk) 05:47, 22 October 2017 (UTC)


 * Your point regarding the finiteness has been addressed.


 * Re linearity: $$L_1\to\R$$ is too restrictive. There are very important cases that must be accounted for when $$\operatorname{E}[X]=\infty.$$ I guess, we could have two versions of this. First, we could state the linearity for $$L_1,$$ then say "more generally" and give the more general version which, incidentally, comes from a textbook. (By the way, random variables are regular functions, so we aren't dealing with $$L_1$$ here, but I know what you mean).


 * On the original research theme, oh please. This subject (def. and basic properties of E) has been beaten to death, so you couldn't do original research here even if you wanted to. And, yes, about 95% of the stuff I write comes form textbooks. Challenge is: some textbooks define Lebesgue integrals differently, some have occasional gaps in proofs, etc.  So, writing about something methodically is not a slam-dunk exercise, no matter where the information comes from.


 * Regarding proofs, yes, some of them are unwelcome (like the proof of Fermat's Last Theorem), and some are not. There is no consensus in the discussion you linked to a week or two ago.  Plus, nobody knows who is going to read this particular article, and all the proof are hidden by default, so it's beyond me who would be bothered by them.


 * Bottomline, if someone else can cover this better, clearer, more consistently and methodically, DO IT. WP is collaborative and thrives on that. StrokeOfMidnight (talk) 12:25, 22 October 2017 (UTC)

You've made an edit that confuses me. So, you want to allow $$X$$ to be infinite (although it seemed like you were initially against it)? No problem. That's exactly what I did two days ago, and you disagreed. With the latest edit in mind, what is $$\textstyle \int^{+\infty}_{-\infty}$$? Since $$X$$ may be infinite, you are now integrating over $$[-\infty, +\infty]$$. I used to have a remark saying just that: it doesn't matter if you include the endpoints. I can, of course, put that remark back, but that would unnecessarily complicate the definition. I thought, we agreed that we should ASSUME that all our random variables are finite. And then you changed your mind.

Can you explain what exactly are you trying to do, so we don't make conflicting edits? StrokeOfMidnight (talk) 20:23, 22 October 2017 (UTC)


 * Yes, sure I can explain, with pleasure. But I am confused, too, since I believe I did already! Once again: we integrate over the distribution of the random variable. A negligible set does not influence the distribution at all. It is still concentrated on $$(-\infty,+\infty).$$ On this space we take its density (that is, Radon-Nikodym derivative w.r.t. Lebesgue measure). And then we use this density in order to calculate the expectation. No need to consider $$[-\infty,+\infty]$$ (this is needed only when the infinity is of positive probability). Absolute continuity means absolute continuity w.r.t. Lebesgue measure; Lebesgue measure is concentrated on $$(-\infty,+\infty);$$ thus absolute continuity requires "almost surely finite"; but it does not require "surely finite". Do not hesitate to ask more questions whenever needed. Boris Tsirelson (talk) 21:12, 22 October 2017 (UTC)


 * Sorry, not true. Absolute continuity does not require that X is finite (a.s.). The fact that X is finite (a.s.) follows from absolute continuity. In other words, once we've assumed that the cumulative distribution function F is absolutely continuous, then it follows that X is finite (a.s.).  Therefore, assuming up front that X is finite (a.s.) is at best redundant, and actually breaks the logic chain by confusing assumption with conclusion.  By the way, I used to have a remark explaining to that effect.


 * I understand that you're a very beginner. (And I don't say this in a bad way at all; in fact, you probably see when there are readability issues better than I do). But wouldn't you be better off getting a decent probability and/or real analysis book and reading it? StrokeOfMidnight (talk) 18:34, 23 October 2017 (UTC)


 * Not quite a very beginner; see Boris Tsirelson. (And if you suspect that he is not me, find a link to my user page here on "his" professional page.)  :-)   I understand that you are not inclined "to google" your collocutor... Boris Tsirelson (talk) 18:58, 23 October 2017 (UTC)
 * Back to the business. I am not a native English speaker; maybe this is why I do not see a difference between "A requires B", "A implies B", and "B follows from A". But till now my math texts were usually understood by others. Well, on an article feel free to correct my English as needed. But on a talk page, I think, we may be less exacting, and trying harder to understand each other. Boris Tsirelson (talk) 19:06, 23 October 2017 (UTC)


 * Thanks for explaining this. Sorry if I came across as being overly aggressive. That wasn't my intention.  This is supposed to be a constructive discussion.


 * Anyhow, what I'm going to do is re-add this remark and remove the current wording about X being finite (a.s.) from the first sentence. The result will look like this version, with "probability distribution" replaced with "cumulative distribution function". StrokeOfMidnight (talk) 19:51, 23 October 2017 (UTC)


 * Your words: This subject has been beaten to death, so you couldn't do original research here even if you wanted to. And, yes, about 95% of the stuff I write comes form textbooks. My question: How many of these textbooks mention (Lebesgue) integration over the extended real line $$[-\infty,+\infty]$$ (a) at all, (b) in relation to the formula $$\textstyle \operatorname{E}[X] = \int_{-\infty}^{+\infty} x f(x)\, dx?$$ Boris Tsirelson (talk) 20:46, 23 October 2017 (UTC)


 * Actually, these are unfair questions. To answer them, I would have to recall how each textbook I ever read sets up its notations. With that said, I do have an answer for you.  (Two actually).  First, some textbooks write $$\textstyle \int xf(x)\, dx$$ with no integration limits.  Second, every time a textbook writes $$\textstyle \int_\Omega X\,dP,$$ it means $$\textstyle \int_{[-\infty, +\infty]}x\,dF,$$ as these two are one and the same.


 * My question now is: for every Lebesgue integral, one must specify the exact set being integrated over, but $$\textstyle \int^{+\infty}_{-\infty}$$ doesn't do that. So, how, please tell, are you going to explain to an astute reader what the integration domain, in this particular case, is? StrokeOfMidnight (talk) 18:12, 24 October 2017 (UTC)


 * On your first paragraph: you did not let me write "requires" instead of "implies"; and now you write "it means" instead of "it is equal to"? The equality between these integrals is a special case of the measure change theorem, not at all a definition of the former integral. Terminology aside, I still think that your equality is of course true, but seldom (if at all) written in textbooks. I understand that you do not recall how each textbook you ever read sets up its notations. But, unless/until you find some examples of using the extended real line as the domain of integration in probability textbooks, I think this is quite unusual.


 * On your second paragraph: true, $$\textstyle \int^{+\infty}_{-\infty}$$ doesn't do that, unless one adds a clarification that this means (as usual) integration over the real line $$(-\infty,+\infty).$$. Is this bad for the astute reader? Boris Tsirelson (talk) 18:50, 24 October 2017 (UTC)


 * True, this approach does not serve "random variables" that fail to be finite almost surely. But I doubt they should be called "random variables" at all, and the more so, in the context of expectation. I do bother about infinite expectation, but only under finitesess almost surely. Boris Tsirelson (talk) 19:04, 24 October 2017 (UTC)


 * You may ask: if so, why "finite a.s.", why not just "finite surely"? Here is why. In the Lebesgue theory one often speaks about (measurable) functions, but one usually treats them up to equivalence (that is, equality almost everywhere); one just is lazy to speak about equivalence classes, but these are implicitly meant. Equivalent functions are exchangeable in most cases. Similarly, in probability theory, we define random variables as (measurable) functions, but usually we mean rather their equivalence classes, and avoid notions sensitive to a change on a set of probability zero. There is an exception: the theory of random processes often deals with uncountable families of random variables; there one must be very careful, since a family of equivalence classes is quite different from an equivalence class of families. But in this article we never deal with uncountable families of random variables, and have no reason to ever say "surely" instead of the habitual "almost surely". A (real-valued) random variable has a value, and its value is a real number, almost surely. No one bothers, what at all happens on a set of probability zero (since that set never contributes to probabilities, therefore, to distributions, expectations etc.) Boris Tsirelson (talk) 19:14, 24 October 2017 (UTC)


 * Much ado about nothing. I think, I understand what you are saying, more or less. I'm going to make a change, and let's see if we agree. StrokeOfMidnight (talk) 19:22, 24 October 2017 (UTC)


 * OK with me. Boris Tsirelson (talk) 19:43, 24 October 2017 (UTC)

Absolutely continuous case, again

 * "don't need absolute values here"? What if the improper integral converges non-absolutely? Boris Tsirelson (talk) 06:04, 26 August 2018 (UTC)


 * Hi. No, this can't happen. Keep in mind that $$f(x) \geq 0.$$ Also, $$xf(x)$$ is bounded on every $$[a,b]$$ and doesn't change the sign on $$(-\infty,0]$$ and $$[0,+\infty).$$  StrokeOfMidnight (talk) 11:19, 26 August 2018 (UTC)


 * Ah, yes, you are right. Improper integral makes no troubles here (in contrast to Cauchy principal value). Boris Tsirelson (talk) 19:27, 26 August 2018 (UTC)

"TeX" in section headings
"TeX" in section headings does not appear in the table of contents. Thus this article has the following entry in its table of contents:
 * Corollary: if then (a.s.)

(Of course it's not literally "TeX"; hence the scare quotes. Lots of people here actually called it "LaTeX", which is nonsense; whoever masters the system used here and thinks they've learned LaTeX is in for a shock if they try to use actual LaTeX.) Michael Hardy (talk) 20:09, 29 December 2018 (UTC)

The shorter "proof" in non-negative case
These two edits look very much like vandalism to me, so I am reverting them. If I misread something, here is my explanation:


 * the purported proof has an unexplained transition



\int\limits_\Omega X(\omega)\,d \operatorname{P}(\omega) =\int\limits_0^\infty \operatorname{P}(\{\omega: X(\omega)>t\})\,dt; $$


 * (minor) when used with Lebesgue integrals, the notation $$\textstyle\int_0^\infty,$$ as opposed to, say, $$\textstyle\int_{[0,\infty)},$$ is potentially misleading due to a visual similarity with an improper Riemann integral which is a different concept. Making this distinction is especially important here, on WP.

StrokeOfMidnight (talk) 12:26, 22 September 2018 (UTC)


 * Still, assume good faith. Boris Tsirelson (talk) 10:51, 23 September 2018 (UTC)

The "unexplained transition" above is a standard proposition, and of course it can be explained. In some contexts it _should_ be explained, and likely this is one of those, but that doesn't make it vandalism, but only a deficiency of competence. Michael Hardy (talk) 20:15, 29 December 2018 (UTC)

"Cleaning up" Basic Properties
be careful with the clean up because it's likely to break the logic in the proofs. I added these proofs because they show the underlying machinery. (You know, simple functions, approximations, etc.) For that reason, those who do read the proofs will get more out of this article. StrokeOfMidnight (talk) 20:53, 3 October 2019 (UTC)


 * General comment: Articles here aren't generally meant for people who want proofs though and the current state is far too against WP:NOTTEXTBOOK. This article needs a lot more prose and a lot fewer formulas so that it is more of an exposition on the topic than a collection of properties. I wouldn't be so concerned in preserving the proofs for now.Spinning off some of the properties into a separate article may be a useful endeavor though. — MarkH21 (talk) 00:42, 4 October 2019 (UTC)

Thanks for the comment -- I am trying to not break the logic in the proofs for the properties I am keeping. Of course, my choice for which properties are basic and which are not is subjective, but I will keep proceeding assuming that if others disagree they can edit it back. Also, I agree with MarkH21 that some of the machinery is probably better suited in other articles (simple functions etc might fit better in the article on Lebesgue integral). But that is a separate discussion, and do not want to get into it right now. My initial goal is to just clean up the content and fix the formatting Iyerkri (talk) 15:04, 4 October 2019 (UTC).

what is it with you math people and your inability to express yourselves ??
I have a PhD in molecular biology, and I do a much better job of explaining complex stuff. This article is - and am being fact based here - a disgrace. The opening paragraph should read something like Expected value is the average or most probable value that we can expect, for instance if we toss 2 fair dice, the expected value is ( think about 6 no); if we toss 100 fair pennies... You people need some fair, but harsh criticism; I'm not enough of a math person, but someone should step up, this article like most on math based subjects is not an ENCYCLOPEDIA article; it is for advance math students. I really mad at you people - you have had long time to work on this and have done a bad job I don't care if you have PhDs in math, or are tenured profs at big shot univeristys: you deserve all the opprobrium i, heaping on you instead of dismissing me, why don't you ask a historian or english major or poet or poli sci person what they think — Preceding unsigned comment added by 24.91.51.31 (talk) 20:22, 29 January 2012 (UTC)


 * Your assertion that expected value is the most probably value is false. Your implication that the expected value of the sum of two fair dice roles is equal to 6 is also false for either definition, and can checked by direct calculation. So, if we are to judge things based on the facts, as you suggest, no such changes should be made. — Preceding unsigned comment added by 193.170.138.132 (talk) 13:26, 18 March 2014 (UTC)


 * I do hope you understand your molecular biology better than your maths. Typical life scientist spouting nonsense.80.47.102.164 (talk) 09:23, 31 March 2013 (UTC)


 * No, no! In no way! A typical life scientist is much more clever and nice. This is either not a life scientist, or a quite atypical life scientist. Boris Tsirelson (talk) 12:19, 31 March 2013 (UTC)


 * I completely agree. I've worked as a consultant to casinos training their management teams to understand expected value and standard deviation as it applies to casino gaming so I would hope that I would at least be able to casually read and understand the introduction.  As it reads now I feel like an idiot.  The standard deviation article, on the other hand, is much easier to read as a layman in advanced mathematics.  As an example, please compare the "application" sections of this article and the standard deviation article.  Here's an excerpt from http://en.wikipedia.org/wiki/Wikipedia:What_Wikipedia_is_not :


 * Scientific journals and research papers. A Wikipedia article should not be presented on the assumption that the reader is well versed in the topic's field. Introductory language in the lead and initial sections of the article should be written in plain terms and concepts that can be understood by any literate reader of Wikipedia without any knowledge in the given field before advancing to more detailed explanations of the topic. While wikilinks should be provided for advanced terms and concepts in that field, articles should be written on the assumption that the reader will not or cannot follow these links, instead attempting to infer their meaning from the text.
 * Academic language. Texts should be written for everyday readers, not for academics. AddBlue (talk) 08:50, 17 February 2012 (UTC)

Absolutely agree. this is a disgracefully written page. — Preceding unsigned comment added by 90.209.72.109 (talk) 19:57, 14 May 2012 (UTC)


 * Math people expressed themselves on Wikipedia talk:WikiProject Mathematics, see the Frequently Asked Questions on the top of that page. Boris Tsirelson (talk) 05:35, 17 May 2012 (UTC)
 * I can hack through quantum mechanics but this “math” is beyond reason. Whoever wrote this should be ashamed and whoever keeps it like this (who know the subject well) is even worst.  This is the worst article I have seen on this site.  I have several science degrees and this is almost too far gone for even me. 66.54.125.35 (talk) 16:38, 25 June 2012 (UTC)

"...most probable value that we can expect..."—excuse me, but this is plainly false, as explained in the last sentence of the second paragraph in the article. So the opening paragraph shall definitely not read like this. Personally I find the article well-written and understandable. bungalo (talk) 20:29, 27 June 2012 (UTC)

I agree. It dives into the weeds too quickly. How about... "Expected Value is the value times the probability that it will be observed." — Preceding unsigned comment added by Willo0olliw (talk • contribs) 18:55, 4 April 2020 (UTC)

But what is it with you the protesters and your inability to help yourselves?
Indeed, some of you have a PhD in molecular biology, some have several science degrees, some can hack through quantum mechanics(!). For such a person it should be an execise of several hours (well, maximum, several days), to take an appropriate book (or two), to learn what the expected value is, to return here and make this page satisfactory! Instead, you complain during years. During this time some of you that had no appropriate education at the time of the initial complain should get such education. But no; no one of you returns. What could it mean? Either you are all hopelessly uneducated (contrary to your claims), or when getting educated you start to understand that the article is what it should be. Any other explanation of the phenomenon? Boris Tsirelson (talk) 11:32, 19 March 2014 (UTC)

Students of any subject often offer complaints without knowing how to address them. The latter task is one that professors should take up, not students. In any case, resolving this particular issue is just a matter of putting in some less opaque text, which I have attempted to do without claiming perfection is so doing. I might add that complaining about complaints does not do what geniuses do, which is; saying something simple. So, if you do not like my version, say something simpler instead.CarlWesolowski (talk) 16:56, 13 April 2020 (UTC)

Carl, if the goal behind this edit of yours is to provide a rough idea of what E is to complete novices, then I can predict that the outcome will be the exact opposite. Point by point:

1. Regarding the opening sentence: E is defined for random variables and random variables ONLY. Not for "discrete collections of values" or density functions. No one knows what 'x' and E(x) (as contrasted with E(X)) are.

2. In the second and third sentences, you try to informally introduce the PDF. What is the motivation for doing this here? Anyone who knows what PDF is automatically knows how to integrate (at least in the Riemann sense) and will have no problem grasping the general definition of E, thereby making the lede useless. Dragging PDFs into the lede makes things harder rather than easier to follow.

3. The way you (needlessly) introduce the density function is wrong. There are no "two types" of density functions. All PDF are conceptually the same. They are R.N. derivatives of the respective probability measures. The PDF definition is simple as is, and there is probably no benefit in simplifying it further. And no, PDF and probability distribution are two different concepts.

PS  I will propose my version of the lede shortly. StrokeOfMidnight (talk) 19:15, 13 April 2020 (UTC)

Feel free to say something more simple. I am curious though as to what you think a pdf is. After all, it is an acronym for probability density function; not all density functions have anything to do with probability, and some statisticians lump pmf into pdf, and some do not. As far as I know all pdf map to distributions, but not all distributions map to probability; it depends on what the distribution is a function of, i.e., the units of the $$y$$-axis variable. — Preceding unsigned comment added by CarlWesolowski (talk • contribs) 20:11, 13 April 2020 (UTC)

OK, you must have changed it back. Still is very far away from correct. Let's take it step-wise.

(1) First sentence, "In probability theory, the expected value $$\mathop{\hbox{E}}(X)$$ of a random variable $$X$$ is a key aspect of the random variable's probability distribution."

First error: Expected value is a not an important aspect of a Cauchy distribution, nor for particular Pareto distributions with $$\alpha<1$$, nor is it UMVUE for a uniform distribution for which the average of the two extreme values converges to a measure of location much more quickly, and so forth. One thing should be made clear at the outset, and that is that 'expected value' is jargon, and poorly chosen jargon at that. For example, if I first join a club of peers as a neophyte and want to know what salary to expect, expected value would be a disservice. It is for that reason that I wrote the expected value is 'statistical language.' (2) In the simplest case when $$X$$ assumes values in a set $$\{v_1,\ldots,v_n\},$$ $$\mathop{\hbox{E}}(X)$$ is the probability-weighted average of the values $$v_i$$. Each $$v_i$$ is multiplied by $$v_i$$'s probability of occurrence $$\Pr\,(X=v_i)$$. The resulting products are summed to produce $$\mathop{\hbox{E}}(X)$$.

Second Error: A simple 1-D random variate is most properly written as a list of occurrences; strictly a one-dimensional list like for die throws "1,3,2,5,3,6,1,1,2" and the expected value is just the mean value of that list. If you are grouping that into histogram categories before calculating expected value only then do you need to weight the occurrences, but I put it to you, your histogram is not a random variate. So the statement about weighting is incorrect for any weight other than 1.

How about this "The expected value is the mean value of occurrences of a random variable. It is a useful concept of expectation for random variables from certain statistical distributions like the normal distribution, but like the mean itself, is not optimal as a measure of location for random variables generated from some other distributions, like the Cauchy distribution." CarlWesolowski (talk) 22:26, 13 April 2020 (UTC)

(1) Characterizing expected value as a "concept" might actually be a good idea. Calling E(X) a CONCEPT should make it clear that "expected value" is, indeed, a jargon term.

(2) The statement about weighting average is correct. See any probability book. StrokeOfMidnight (talk) 23:13, 13 April 2020 (UTC)

Weighted averaging is not "the simplest case" as that sentence claims, straight average is the simplest case. And, of course one cannot average two averages without weighting, but so what, that is not the simplest case, and weighted averaging is minimally the case for two random variates not for one. The sentence is tongue-tied. Advise making it simpler, and at this point, it is so complicated the authors do not understand it. CarlWesolowski (talk) 23:38, 13 April 2020 (UTC)

Ok, I took your comments into consideration. StrokeOfMidnight (talk) 00:57, 14 April 2020 (UTC)

What does $$X \equiv c$$ is $$c$$ mean?
None of the articles for the $$\equiv$$ include the word "variance" or "probability" or "expected", so this mathematical expression needs an inline explanation. nhinchey (talk) 14:36, 17 April 2020 (UTC)

$$f(x)\equiv c$$ usually means that $$f$$ is a constant function. I used $$\equiv$$ to emphasize that $$X$$ is constant. Since using $$\equiv$$ is not essential, I've just changed it back to $$=$$. StrokeOfMidnight (talk) 14:53, 17 April 2020 (UTC)

The lede section lacks consistency
I disagree with this edit because it makes the lede section inconsistent. With this edit in place (see here), the section begins by saying "... the expected value of a random variable is the mean of a large number of independent realizations of that variable" and later: "the expected value of $$X$$ is defined as ..." The reader will wonder why the article first says that $$\operatorname{E}(X)$$ is something, and later that $$\operatorname{E}(X)$$ is something else. Is it one or the other?

The point is that definitions and intuitive interpretations are separate things and must not be mixed. In particular, $$\operatorname{E}(X)$$ is not the mean of a large number of ... This is only an intuitive interpretation. StrokeOfMidnight (talk) 22:52, 20 April 2020 (UTC)


 * My issue is that we've gotten to the end of the first sentence and have no idea about what Expected value is other than "a concept". We need to define what it is.--Louiedog (talk) 02:47, 26 April 2020 (UTC)

The lede section does define Expected value, at least in a few simple cases. I don't see how e.v. can be defined in the opening sentence in a way that's both concise and mathematically consistent (i.e. doesn't clash with the definition). With that said, having a quick summary in the opening sentence would be great. The question is how to do this. We could try something like: In probability theory, expected value of a random variable is a concept that utilizes the idea behind weighted average. Is this descriptive enough, though? StrokeOfMidnight (talk) 04:52, 26 April 2020 (UTC)


 * Calling it "a concept" is just a waste of words. How about "In probability theory, the expected value of a random variable is closely related to the weighted average and intuitively is the mean of a large number of independent realizations of that variable."--Louiedog (talk) 16:50, 26 April 2020 (UTC)

This is good! Not perfect, but definitely good enough. StrokeOfMidnight (talk) 17:17, 26 April 2020 (UTC)

Etymology section could be improved
It says 'Neither Pascal nor Huygens used the term "expectation" in its modern sense. ' right now, which is a bit....well, neither of them wrote in English. If someone could track down the actual terms that they did use that might be useful. Finding first uses in English might also be good (even if that use is in a translated work), and attributing it to the translation rather than the source text. — Preceding unsigned comment added by 2001:770:10:300:0:0:86E2:510C (talk) 17:24, 6 September 2020 (UTC)

Questions regarding the tail formula
Regarding the tail formula $$ \operatorname{E}[X] = \int\limits_0^\infty (1-F(x))\,dx - \int\limits^0_{-\infty} F(x)\,dx,$$ I have two questions:

1) The article says "the integrals taken in the sense of Lebesgue", but this is completely fine as a Riemann integral - every CDF is monotone, hence Riemann integrable. It seems that the mentioning of Lebesgue is a mistake by a writer who is under the assumpetion that Lebesgue integration is needed to define Expectation for a general RV.

2) If I am right in (1), then why shouldn't this appear in the "Definition/General case" section (along with the Lebesgue definition). This only uses Riemann integration and works for any random variable on any probability space, since the CDF always exists. Currently the definition uses the Lebesgue integral, which is much less known and probably scary to some readers.

Thanks! — Preceding unsigned comment added by 132.64.72.195 (talk) 14:49, 28 December 2021 (UTC)


 * Defining the CDF may require a Lebesgue integral (or something equivalent). A real-valued random variable is, by definition, a real-valued Borel-measurable function on a probability space.  It doesn't start as a CDF, and in fact it contains more information than the CDF (it says how events in the space map to numbers, something that the CDF has forgotten).  Computing the CDF is equivalent to Lebesgue integration.
 * That said, I do agree that it's not necessary to mention Lebesgue integration up front. I've edited the article so that it mentions integrals in the lead but not Lebesgue integrals specifically. Ozob (talk) 01:35, 29 December 2021 (UTC)

Lebesgue integration in intro
I have rewritten the intro a little bit; in my opinion it reads much better now. I see that the reference to Lebesgue integration was previously taken out, which I added back in. Lebesgue integration and its use for expected value is covered in many standard textbooks which each have tens of thousands of citations, so I feel very safe in saying that it is suitable to mention, appropriately contextualized as abstract mathematical theory, in the intro. It would be anti-encyclopedic not to. Happy to discuss any part of intro further. Gumshoe2 (talk) 22:27, 4 February 2022 (UTC)

A couple of points:
 * "The e.v. ... associates a number to any positive random variable". Not true unless you allow infinity as a "number".
 * At this point in the lede, it makes sense not to start even mentioning random variables yet but use lay terms like "experiments" instead. There is room for random variables later on. Plenty of it, in fact.
 * "The e.v. ... associates a number to any positive random variable; it may also be defined ...": "it" inadvertently refers to "random variable" rather than expected value.
 * "The expected value is a weighted average of all possible outputs of the random variable". The weighted average is defined for discrete random variables and discrete random variables only. (Those with a countable number of outcomes).
 * "The expected value ... informally may be considered as the arithmetic mean of the results of repeated (independent) sampling of the random variable". The requirement that the number of trials must be large is crucial. However, this was left out.
 * "In the abstract mathematical framework of measure theory ..." Why measure theory and not integration theory? And why not probability theory? Why have this sentence at all, since the entire article has to do with probability theory, which is an "abstract mathematical framework"?
 * I completely understand your point about mentioning Lebesgue integration in the lede. By the way, that's what this article used to do. Yes, L.i. is central. But bringing L.i. forward this early has no clear benefit and will only confuse some. Again, there is plenty of room for Lebesgue integration later in the article. StrokeOfMidnight (talk) 01:41, 5 February 2022 (UTC)
 * Some of your specific points here are very good, others we can discuss further after working out the following: I think you may have misunderstood the purpose of the intro section. It is meant as introductory and summary. So, for instance, it is inappropriate to give the (more or less) precise formula definition of expected value for discrete random variables, and then to just say that it is defined "as integral" for "abstract random variable"s. In my proposed edit I tried to give a balanced summary of expected value, correctly stated (some of your comments would make improvements here) but without any undue technical content (which belongs in the main body). Remember also that wikipedia is meant as an encyclopedia, not a textbook. So it is good to mention random variables from the start in the intro, since this is all but always the given context for expected value. Gumshoe2 (talk) 02:23, 5 February 2022 (UTC)


 * "it is inappropriate to give the (more or less) precise formula definition of expected value for discrete random variables" I didn't give such a formula. The formula I gave was for rvs with finite number of outcomes. This formula is a part of the summary you are talking about.
 * "... and then to just say that it is defined "as integral" for "abstract random variable"s." What would you expect of an intro section? Would you want to dive deeper into how exactly $$EX$$ is defined?
 * "it is good to mention random variables from the start in the intro, since this is all but always the given context for expected value" Mathematically, I agree. But not everyone on here is a mathematician. StrokeOfMidnight (talk) 03:58, 5 February 2022 (UTC)
 * I hope I am being clear. It seems you are responding as if we were discussing the beginning of the main text (and in fact, as far as I can see, we have great agreement on how the main text should be structured). But my concern is with the lead paragraph, not the beginning of the main text. As per my previous edit, I am proposing some version of The expected value is a weighted average of all possible outputs of the random variable, and informally may be considered as the arithmetic mean of the results of repeated (independent) sampling of the random variable. In the abstract mathematical framework of measure theory, expected values are defined by Lebesgue integration. These two sentences give a non-technical summary (with zero formulas) of expected value which (although we may fruitfully quibble about how best/most accurately to phrase it) are comprehensive and accurate to the scope of expected value. It isn't clear to me why you disagree with this. Would it be acceptable to you if we could find further word choices that clarify that the measure theoretic framework is only one extremely standard perspective (which hence may be disregarded by readers unfamiliar with measure theory)? Let me be clear: I have no doubt that Lebesgue integration must be mentioned in the lead paragraph (such as in the sentence I have suggested), but I also think that the lead paragraph must communicate that much/most about expected value can be understood without any knowledge about Lebesgue integration. I think this is the only way to give a reasonably comprehensive summary in the intro. Gumshoe2 (talk) 04:40, 5 February 2022 (UTC)

What do you mean exactly by "lead paragraph"? Is this the very first paragraph? If so, this paragraph was written with your proposition in mind and addresses several issues (see above). Short sentences are generally preferable. I am ok replacing "the experiment" with "the random variable" in the second sentence. Any other substantive differences left re this paragraph?

I, personally, have nothing against mentioning Lebesgue integration. (I didn't replace it with "integration" ). StrokeOfMidnight (talk) 05:37, 5 February 2022 (UTC)
 * I apologize, I thought you were familiar with the manual of style. I should have been more clear from the start. See this wikipage. Gumshoe2 (talk) 05:48, 5 February 2022 (UTC)
 * Note in particular that it says "Mathematical equations and formulas should be avoided" (in the lead paragraph). Gumshoe2 (talk) 05:51, 5 February 2022 (UTC)

To quote: "Mathematical equations and formulas should be avoided when they conflict with the goal of making the lead section accessible to as broad an audience as possible." (Emphasis added). StrokeOfMidnight (talk) 06:10, 5 February 2022 (UTC)
 * "The expected value is a weighted average of all possible outputs of the random variable" is more accessible than "The expected value of a random variable $$X$$ with outcomes $$\{c_1, \ldots, c_n\}$$ is the weighted average $$ \sum^n_{i=1} c_i \cdot \mathop{P}({X = c_i})$$ with respect to the probabilities $$\mathop{P}({X = c_i})$$ of occurrence of each individual outcome $$c_i.$$" Do you really disagree? Gumshoe2 (talk) 06:13, 5 February 2022 (UTC)

How about "The expected value is a weighted average of all possible outcomes $$ \{c_1, \ldots, c_n\}$$ of the random variable"? I am trying to convey that the r.v. has a finite number of them. StrokeOfMidnight (talk) 06:31, 5 February 2022 (UTC)
 * Just as it is extremely standard (even in high school calculus) to regard an integral as an average value, it is very standard to regard a Lebesgue integral as a weighted average value. So it is actually accurate in every single case to simply say that "The expected value is a weighted average of all possible outputs of the random variable". Remember, following manual of style, that the intro is not a good place for precise definitions. If you prefer, for clarity perhaps that sentence could instead say something like "The expected value may be thought of as a weighted average of all possible outputs of the random variable, and in many cases this is the basis of the precise definition." (Wording of the last few words could certainly be improved.) Gumshoe2 (talk) 06:46, 5 February 2022 (UTC)

"The expected value of a random variable with finite number of outcomes is a weighted average of all possible outcomes"? StrokeOfMidnight (talk) 07:02, 5 February 2022 (UTC)
 * Ok, I still prefer not to restrict here to finite outcomes, but I am ok with it. I've made an edit to these sentences, hope you like it. Gumshoe2 (talk) 16:49, 5 February 2022 (UTC)

Reads so much better now. I think, we can leave it like this. By the way, by "foundation for probability" did you mean "foundation of probability"? StrokeOfMidnight (talk) 19:09, 5 February 2022 (UTC)
 * I think they are both correct grammar. If you have a preference for one over the other, feel free to change. Gumshoe2 (talk) 04:41, 7 February 2022 (UTC)

The mathematical level of writing
I think it should be remembered that expected value is a topic not only for mathematicians, but belongs also to scientists and engineers across virtually all fields, including even non-scientific fields like economics and finance. Because it is a mathematical topic, and widely discussed as such, it is appropriate to comprehensively discuss the general formulation via Lebesgue integration; I think and I (the two page editors over last few days) agree on this. However, because it is also a topic for so many others, it is not appropriate to use measure-theoretic notions out of context where they will not be generally understood: More broadly, it is important to discuss expected value in the ways that it is discussed across all disciplines (i.e. both mathematics and not mathematics), while maintaining a rigorous perspective. I think the previous stage of this StrokeOfMidnight reversion did so successfully for countably-valued random variables, while StrokeOfMidnight's preferred perspective (which is reverted to in the given diff) is not given in any of the standard textbooks, will not be clear to a strong majority of readers, and is in reality just a transplantation of the usual definition of the Lebesgue integral into the case of countably-valued random variables. Again, I think it serves basically no purpose to maximize the level of generality at this stage in the text. Gumshoe2 (talk) 05:10, 7 February 2022 (UTC)
 * the meaning of "density" or "null set" in this partial reversion by StrokeOfMidnight is only understandable as measure theory. The version that it is reverting is mathematically rigorous, cited directly to how it is discussed in extremely standard textbooks, and (as such) posed at the most elementary level possible. It is not as general as possible, as the measure-theoretic perspective is discussed in the following subsection.