4

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.

5
  • 1
    $\mathrm{E}[X]$, with use of amsmath you can define it as \DeclareMathOperator{\E}{E} and than use as $\E[X]$ – Zarko May 27 '19 at 17:42
  • 2
    Are you sure that when you see both forms in a single article, they mean the same thing? Often such similar forms are defined with slightly different meanings. (Otherwise, this is evidence of faulty copyediting.) – barbara beeton May 27 '19 at 18:05
  • I like \mathbb{E} (and usually say \newcommand*{\expe}{\mathbb{E}}), but that's presumably just because my professors used that notation and I got used to it. If I had been exposed to \mathbf{E} as the go-to symbol, I might feel differently. I also see \mathbf{E}, \mathrm{E} and sometimes even E. If an article uses several forms I would expect them to mean different things (and I would expect the article to define them) unless it is a typo and the author intended to use the same symbol in all cases. – moewe May 27 '19 at 18:47
  • 1
    That all said, in its current form this question is either opinion-based or off-topic because it should be asked at math.stackexchange.com or one of the other sister sites. The question is not so much about TeX, but rather about mathematical practice. – moewe May 27 '19 at 18:48
  • 1
    @moewe -- I believe there is a TeX-related "angle" here: The need to define the expectations operator as being of type "mathop", to get the spacing around the operator symbol right. I elaborate this point in my answer. – Mico May 27 '19 at 19:01
4

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}
5
  • 2
    Using single letters as command names is almost always a bad idea. – Henri Menke May 27 '19 at 21:10
  • 1
    @HenriMenke - I would have to take issue with the "almost always" qualifier. I'd be ok with "frequently", though. :-) I guess it depends importantly on which letter is picked. – Mico May 27 '19 at 21:13
  • Yes, but most beginners don't know that and when they come here to copy and paste solutions, they might get the impression that this is best practice until they define things like \newcommand*\O{\mathcal{O}} and suddenly all Hungarian umlauts stop working. – Henri Menke May 27 '19 at 21:16
  • 1
    @HenriMenke - I suppose it also depends very strongly on the writer's field. In my field (economics and econometrics), the only time I've ever come across the single letter E -- in more than 30 years of professional work -- is to denote the expectations operator. I'll allow that the situation may be very different in other fields. For sure, though, I cannot recall every seeing the equation E=mc^2 showing up in economic writing... – Mico May 27 '19 at 21:16
  • 1
    @Mico Since I'm also in the field of Economics, I am happy to see your great answer and comments. I also thank everyone for valuable comments. – The R May 28 '19 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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