# Should random variables be italic or roman ($X$ or $\mathrm X$)?

I just recently learned that it is good style to write constants like Euler's number $\mathrm e$ and also functions and operators in roman letters while reserving italic letters for variables. Example: $\mathrm f(x)=x^2$.

However, I wonder what applies to random variables. Technically, they are functions and thus should be written in roman letters. But we often treat and wright them down as variables, e.g. $\mathbb P(X=k)=\dots$

I can hardly imagine that the right way is to switch the notation, depending on how they are used. But what is the correct way then?

• Whatever you like, as long as you're consistent throughout.
– Pedro
Commented May 14, 2014 at 22:39
• I have never seen functions like $f$ written as roman. Usually, identifiers that are longer than a single letter are written as roman, like $\sin$ and $\det$. What is the source of your "good style" advice?
– user856
Commented May 14, 2014 at 23:49
• Sorry for not answering before. You are indeed absolutely right! I just recently learned a couple of things about correct mathematical typesetting and must have totally misinterpreted a phrase like "mathematical operators indicated with letters must be set in roman type". A closer look shows that this is meant only for functions and operators with fixed names such as $\lim$, $\exp$ etc., as well as the differential operator and similar ones. Thanks for pointing that out. It also renders my question useless. So maybe you could change your comment to an answer. Commented May 24, 2014 at 13:51

I'd call them functions than operators, since operator has the context of some vector space being involved, while a (real valued) random variable is a measurable mapping from the probability space $(\Omega, \mathcal{F}, P)$ to $(\mathbb{R}, \mathcal{B}_{\mathbb{R}})$ and you don't require any vector space structure on the probability space.
Most textbooks do the italicised X, as in $X$ as in Durrett's Probability: Theory and Examples 3e and in Billingsley's Probability and Measure, so that is what I would follow. I prefer just $P$ to $\mathbb{P}$ for probability measure as well (as in those books), just because its less annoying to write. However, so long as you're consistent within your writing (and preferably with other people in your area), its OK.
• I corrected operator to function.^^ I like to use $\mathbb P$ and $\mathbb E$ for probability measures and expected values because otherwise I would stick with $\mathrm P$ and $\mathrm E$ which is not less tedious. Of course it would be the easiest to let them italic ($P$ and $E$), but here I want to be consistent and only use italic letters for variables. Commented May 14, 2014 at 22:54
• Suit yourself - its not wrong, but its more annoying to type and $E[X]$ (or even $EX$) and $P[X=k]$ are reasonably common (with parenthesis in some cases instead of square brackets). Commented May 14, 2014 at 23:00