[Tex/LaTex] Should we use \mathbb{E} or \mathbf{E} as expectation symbol

amsmathmath-modesymbols

This question is pretty simple, but I couldn't find existing question regarding this, my current view is that people can choose whichever they want, but I sometimes see these two symbols appear in the same article, so I'm confused.

Best Answer

As long as you are consistent in your notation and you leave your readers in no doubt about your notation-related choices, then (almost!) any upright letter form for E – whether normal weight, bold weight, blackboard-bold, even math-calligraphic – is ok.

What's really important is that you define the expectations-operator symbol as a "math operator", in the TeX-specific sense of the word. That way, TeX will insert a thinspace before and after the operator, as needed. The easiest way I know of in LaTeX to inform that a symbol (or group of letters) is a "math operator" is to use the \DeclareMathOperator macro, which is provided by the amsmath package.

The spacing issue is illustrated in the following screenshot.

enter image description here

\documentclass{article}

\usepackage{amsmath} % for "\DeclareMathOperator" macro
\usepackage{amssymb} % for "\mathbb" macro
\DeclareMathOperator{\E}{E}
%% Or one of the following:
%\DeclareMathOperator{\E}{\mathbf{E}}
%\DeclareMathOperator{\E}{\mathbb{E}}
%\DeclareMathOperator{\E}{\mathcal{E}}

\begin{document}
$5\E_t x_{t+1}$

$5\mathrm{E}_t x_{t+1}$ --- bad! % observe the lack of spacing around "E_t"

\medskip
$2\sin\alpha$ % "\sin" is of type "mathop" too

$2\mathrm{sin}\alpha$ --- bad! % observe the lack of spacing around "sin"
\end{document}