Expectation Symbol in LaTeX

After looking for a built-in expectation symbol in LaTeX, and coming up with none, I’ve defined one. Just add:

% Expectation symbol
DeclareMathOperator*{E}{mathbb{E}}

to your LaTeX preamble, and you’re done. You’ll also need to add usepackage{amsmath}, or in LyX, tick “Use AMS math package” under Document->Settings->Math Options.

Using the starred version of DeclareMathOperator makes sure subscripts go beneath the symbol in display mode.

One thought on “Expectation Symbol in LaTeX”

  1. Thanks for the tip. You need to import \usepackage{amssymb} in order for this to work.

Leave a Reply

Your email address will not be published. Required fields are marked *