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 Probability at Statistics →

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 poweredSumulat ng LaTeX gamit ang AI

Pinakamahusay na AI LaTeX Editor, Alternatibo sa Overleaf

Tinutulungan ng Octree ang mga researcher mula sa 15+ na unibersidad na sumulat ng research papers nang mas mabilis gamit ang AI

  • Gumawa ng magagandang TikZ diagrams gamit ang AI
  • Mag-upload ng larawan at i-convert ito sa LaTeX nang walang problema
  • Makakuha ng instant na tulong sa pagsulat at pag-format ng research papers