Expectation (E) in LaTeX (E[X])

E[X]E[X]
LaTeX command
E[X]
Package
No package needed: built into LaTeX
Mode
Text and math mode

Where it is used

Expectation of X in plain italic E, the mean of its distribution.

Many statistics textbooks write E[X] or E(X) for the expected value, with the variance identity \operatorname{Var}(X) = E[X^2] - (E[X])^2 as a standard example. An italic E can collide with other meanings such as energy or an event called E, which is why \mathbb{E} or an upright \mathrm{E} are common in research papers. If you settle on upright, define \DeclareMathOperator{\E}{E} so spacing and font stay uniform everywhere. Conditional expectation follows the same style, E[X \mid Y]. Whichever form you choose, use it consistently from start to finish.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

E[X2]−(E[X])2≥0E[X^2] - (E[X])^2 \geq 0
\documentclass{article}
\begin{document}
Expectation (E): $E[X]$

\[ E[X^2] - (E[X])^2 \geq 0 \]
\end{document}

Related symbols

All 확률 및 통계 →

Frequently asked questions

How do I write Expectation (E) in LaTeX?
Type E[X] in math mode, for example $E[X^2] - (E[X])^2 \geq 0$. It works in plain LaTeX without loading any package.
Which package do I need for E[X]?
None. E[X] is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
Can I use E[X] in text mode, or only in math mode?
Both. E[X] compiles in running text as well as inside $...$; in a formula keep it in math mode so it gets math fonts and spacing.
Math poweredAI로 LaTeX 작성

최고의 AI LaTeX 편집기, Overleaf 대안

Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움

  • AI로 아름다운 TikZ 다이어그램 생성
  • 이미지를 업로드하고 LaTeX로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기