Variance in LaTeX (\text{Var}(X))

Var(X)\text{Var}(X)
LaTeX command
\text{Var}(X)
Package
Add to your preamble:\usepackage{amsmath}
Mode
Text and math mode

Where it is used

Variance of X, the expected squared deviation from its mean, with an upright label.

The usual identities are \text{Var}(X) = \mathbb{E}[(X - \mu)^2] = \mathbb{E}[X^2] - \mu^2 and \text{Var}(aX + b) = a^2\text{Var}(X). \text{Var} looks right in most places, but inside italic theorem text the label turns italic too, because \text copies the surrounding font. \operatorname{Var} or a preamble \DeclareMathOperator{\Var}{Var} is more robust and spaces correctly. Some authors write \mathbb{V}, \sigma^2 or \mathrm{Var} instead. For independent variables, variances add: \text{Var}(X+Y) = \text{Var}(X) + \text{Var}(Y), while the general case adds twice the covariance.

Minimal compilable example

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

Var(aX+b)=a2 Var(X)\text{Var}(aX + b) = a^2 \, \text{Var}(X)
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Variance: $\text{Var}(X)$

\[ \text{Var}(aX + b) = a^2 \, \text{Var}(X) \]
\end{document}

Related symbols

All 확률 및 통계 →

Frequently asked questions

How do I write Variance in LaTeX?
Type \text{Var}(X) in math mode, for example $\text{Var}(aX + b) = a^2 \, \text{Var}(X)$. Load amsmath first with \usepackage{amsmath}.
Which package do I need for \text{Var}(X)?
\text{Var}(X) needs amsmath: add \usepackage{amsmath} to your preamble before the document starts.
Can I use \text{Var}(X) in text mode, or only in math mode?
Both. \text{Var}(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로 원활하게 변환
  • 논문 작성 및 서식에 대한 즉각적인 지원 받기