Skip to content
All LaTeX symbols

Expectation symbol (𝔼, E[X])

Miscellaneous

𝔼

LaTeX command

\mathbb{E}[X]

blackboard E

Use inside math mode: $\mathbb{E}[X]$ — needs \usepackage{amssymb}

There is no single convention. Modern probability texts favour \mathbb{E}; statistics texts often use an upright E via \operatorname. The bracket style varies too: E[X], E(X) and E X all appear. Pick one and keep it.

All ways to write it

CommandUsePackageCopy
\mathbb{E}[X]blackboard Eamssymb
\operatorname{E}[X]upright Enone
E[X]plain italic E, common in older textsnone
\mathrm{Var}(X)variancenone
\operatorname{Cov}(X, Y)covariancenone
\mathbb{P}(A)probability, same stylenone

Commands marked with a package need that \usepackage line in a LaTeX document.

Example

\mathbb{E}[X] = \sum_{x} x \, P(X = x), \qquad \operatorname{Var}(X) = \mathbb{E}[X^2] - \mathbb{E}[X]^2

Expectation of a discrete variable and the variance identity.

Questions

How do I get a bold or upright E without amssymb?

\operatorname{E} gives an upright roman E in any setup, including KaTeX.

Related symbols

Using expectation in Confluence

Confluence Cloud has no built-in LaTeX. With LaTeX Math for Confluence you add a math macro to any page, type \mathbb{E}[X] and it renders inline or as a block, with a live preview while you edit. Every command on this page renders there without extra packages.