Dictionary of Applied Machine Learning
Typeset PDF version — the authoritative form of this entry
The variance of a real-valued random variable (RV) is the expectation of the squared difference between the RV and its mean. It quantifies the spread of the probability distribution of the RV around the mean: a small variance means that realizations concentrate near the mean. For a random vector, the variance is the expectation of the squared Euclidean norm of the deviation from the mean. This quantity equals the trace of the covariance matrix of the random vector, i.e., the sum of the variances of its entries.
The variance of a real-valued random variable (RV) $\feature$ is defined as the expectation $\expect\big\{ \big( x - \expect\{x \} \big)^{2} \big\}$ of the squared difference between $\feature$ and its expectation $\expect\{x \}$. This definition extends to random vectors $\featurevec$ as $\expect\big\{ \big\| \featurevec - \expect\{\featurevec \} \big\|_{2}^{2} \big\} = \tr{\covmtx{\featurevec}}$, i.e., the sum of the variances of each entry of $\featurevec$, which can be written compactly as the trace of the covariance matrix $\covmtx{\featurevec}$ of $\featurevec$.
See also: random variable, expectation, vector.
@misc{dictml_variance,
author = {Jung, Alexander},
title = {variance},
howpublished = {Dictionary of Applied Machine Learning (course edition)},
year = {2026},
doi = {10.5281/zenodo.21569296},
note = {ISBN 978-952-64-3013-3, CC BY 4.0, retrieved 2026-08-06},
url = {https://dictionaryofml.org/terms/variance.html}
}