# Is it okay to write the square of expectation of a random variable $X$ as $\mathbb{E}^2(X)$?

Is this notation accepted when I write $\text{Var}(X)=\mathbb{E}(X^2)-\mathbb{E}^2(X)$?

• I would write $\left( \mathbb{E} (X)\right)^2$ because $\mathbb{E}^2(X)$ may be interpreted as $\mathbb{E}(\mathbb{E}(X))$ which is equal to $\mathbb{E}(X)$.
– user83346
Commented Jun 24, 2016 at 11:58
• There's a precedent with trigonometric functions - e.g. $\cos^2 x$ for $(\cos x)^2$ - but it's the only one I can think of, & not very encouraging. Commented Jun 24, 2016 at 12:11
• @Scortchi for what it's worth, I hate that notation for trig functions too. It's even worse in stats because there is so much linear algebra in stats, so the notation moves from "lazy" to "outright incorrect" Commented Jun 24, 2016 at 12:30
• @fcop Yes, but is there anything more plausible than exponentiation in this case? Commented Jun 24, 2016 at 12:32
• The meaning of $E^2(x)$ is perfectly clear from its uses in this argument. For instance, since you know the variance equals $E(X^2) - (E(X))^2$ and that is equated ("on simplification") with $E(X^2)-E^2(X)$, obviously it is intended that $E^2(X)$ means $(E(X))^2$. No definition is needed.
– whuber
Commented Jun 24, 2016 at 13:55

My feeling is "no" unless it is accompanied by a proper definition.

You are not "squaring" the expectation function, $E$, but are squaring the output of $E(X)$. It does not really make sense to square a function, which is a mapping from one set to another. Further, $E$ has a well-understood definition in statistics.

On the other hand, when you square a random variable (which, technically is a function mapping the outcome space to the real numbers), it is understood that the square is applied to the real number value, the output of $X$.

There are instances where subscripts and super scripts on a function are common, such as in topics involving families of functions, but in these contexts, this must be explained. So if this is critical to developing some argument in an article, you must take the time to carefully explain to the reader your definition of $E^2$ and probably put in a reminder.

• @StubbornAtom, Then cite a textbook in your question. That is relevant information. Commented Jun 24, 2016 at 11:58
• lmo answered, yes there is something mathematically wrong: this notation would make sense if you were iterating $\mathbb E$. Prefer $\mathbb E(X)^2$. Commented Jun 24, 2016 at 12:00
• @StubbornAtom I've slightly revised my answer. This is not standard notation, and so you should clearly define it, the presentations of Elvis and fcop are more standard.
– lmo
Commented Jun 24, 2016 at 12:03
• The problem with this argument is that it is founded on a limited perspective in which a superscript "2" following an operator like "$E$" is assumed to designate iteration. A great deal of mathematical communication relies on supposing the reader will have sufficient background knowledge to construct for herself the meanings of much of the notation by comparing algebraic manipulations done by the author to her own. The implicit demand for some kind of universal consistency of notation is unrealistic; mathematics is too rich for that.
– whuber
Commented Jun 24, 2016 at 14:01
• @whIuber. I agree with your statement in principle. An author should have more or less complete freedom to use whatever notation she desires. However, there do exist some near universal notations that aid a reader. For example, using $\chi$ instead of $\mu$ for the population mean and then defining variance as $E(X^2)-\chi^2$ would probably not be the best choice. An alert and experienced reader would adjust quickly, but some would not. My answer assumes the latter reader would be the majority, and so I argue that a definition would be appropriate. In the end, it's about knowing your audience.
– lmo
Commented Jun 25, 2016 at 17:04