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$$?

  • 1
    See this question for finding why you shouldn't use $$ in LaTeX.
    – egreg
    Commented May 21, 2012 at 12:42

2 Answers 2


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.


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}}.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .