TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I get an expectation symbol which behaves like $\sum$? Specifically, I want the underscore to be like that of a summation. At the moment I use

$$\mathbb{E}_{x\in A}$$ 

However, I do not like this. It feels like I am writing a sum as

$$\Sigma_{x\in A}$$ 

Whereas the alternative

$$\sum_{x\in A}$$

is much nicer when in a centered equation. (The underscore appears directly below the sigma, instead of slight infront and below.)

Is there a way to make an expectation symbol which behaves like $$\sum$$ rather then $$\Sigma$$?

share|improve this question
See this question for finding why you shouldn't use $$ in LaTeX. – egreg May 21 '12 at 12:42
up vote 20 down vote accepted

Use \mathop{\mathbb{E}} to get math operator spacing and limits behaviour. Or \mathop{{}\mathbb{E}} If you want E to remain on the baseline.

share|improve this answer
Thanks, I will try these. – EPN May 21 '12 at 13:46

If you want "limits" of this operator, e.g., x\in A, always to be typeset as a "subscript" (to the right and below the "E") rather than entirely below the "E" when in display math mode, you may want to use the \DeclareMathOperator instruction that is made available by loading the amsmath or amsopn packages.

Aside: The \mathop directive, in contrast, will make its argument behave exactly like \sum or \prod, in the sense that subscript and superscript arguments will be typeset fully below or above the operator when the directive is processed in display-math mode. Do check out @DavidCarlisle's answer for an application of the \mathop directive to your case.

$\E_{x\in A}$ and $\displaystyle \E_{x\in A}$
vs.\ $\displaystyle \mathop{\mathbb{E}}_{x\in A}$

enter image description here

Conversely, if you do want the x\in A particle to be typeset entirely below the operator when TeX is in display-math mode, you could use the instruction \DeclareMathOperator* (note the *) instead: \DeclareMathOperator*{\E}{\mathbb{E}}.

share|improve this answer
There is also \DeclareMathOperator* that would avoid the need of using \mathop. – egreg May 21 '12 at 12:58
@egreg -- Thanks for that. I'll add a paragraph to mention the "starred" version of the macro. – Mico May 21 '12 at 13:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.