ArticleslgStudy

mathematics

Variance

Variance is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Variance rather than just read about it. In short: In probability theory and statistics, variance is a measure of dispersion, meaning it is a measure of how far a set of numbers are spread out from their average value. It is defined as the expected value of the squared deviation from the mean of a random variable.

Variance — main illustration
Variance — illustration

Key takeaways

  • Variance belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Variance to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Variance from memory before moving on to harder problems.

Reference excerpt

In probability theory and statistics, variance is a measure of dispersion, meaning it is a measure of how far a set of numbers are spread out from their average value. It is defined as the expected value of the squared deviation from the mean of a random variable. The standard deviation is the square root of the variance. Technically, it is the second central moment of a distribution, and the covariance of the random variable with itself, and it is often represented by ⁠σ2⁠, ⁠s2⁠, ⁠Var⁡(X)⁠, ⁠V(X)⁠, or ⁠𝕍(X)⁠. An advantage of variance as a measure of dispersion is that it is more amenable to algebraic manipulation than other measures of dispersion such as the expected absolute deviation; for example, the variance of a sum of uncorrelated random variables is equal to the sum of their variances. A disadvantage of the variance for practical applications is that, unlike the standard deviation, its units differ from the random variable, which is why the standard deviation is more commonly reported as a measure of dispersion once the calculation is finished. Another disadvantage is that the variance is not finite for many distributions. There are two distinct concepts that are both called "variance". One, as discussed above, is part of a theoretical probability distribution and is defined by an equation. The other variance is a characteristic of a set of observations. When variance is calculated from observations, those observations are typically measured from a real-world system. If all possible observations of the system are present, then the calculated variance is called the population variance. Normally, however, only a subset is available, and the variance calculated from this is called the sample variance. The variance calculated from a sample is considered an estimate of the full population variance. There are multiple ways to estimate the population variance on the basis of the sample variance, as discussed in the section below. The two kinds of variance are closely related. To see how, consider that a theoretical probability distribution can be used as a generator of hypothetical observations. If an infinite number of observations are generated using a distribution, then the sample variance calculated from that infinite set will match the value calculated using the distribution's equation for variance. Variance has a central role in statistics, where some ideas that use it include descriptive statistics, statistical inference, hypothesis testing, goodness of fit, and Monte Carlo sampling.

Definition The variance of a random variable X is the expected value of the squared deviation from the mean of ⁠X⁠, ⁠μ=E⁡[X]⁠: Var⁡(X)=E⁡[(X−μ)2]. This definition encompasses random variables that are generated by processes that are discrete, continuous, neither, or mixed. The variance can also be thought of as the covariance of a random variable with itself: Var⁡(X)=Cov⁡(X,X). The variance is also equivalent to the second cumulant of a probability distribution that generates ⁠X⁠. The variance is typically designated as ⁠Var⁡(X)⁠, or sometimes as V(X) or ⁠𝕍(X)⁠, or symbolically as ⁠σX2⁠ or simply σ2 (pronounced "sigma squared"). The expression for the variance can be expanded as follows: Var⁡(X)=E⁡[(X−E⁡[X])2]=E⁡[X2−2XE⁡[X]+E⁡[X]2]=E⁡[X2]−2E⁡[X]E⁡[X]+E⁡[X]2=E⁡[X2]−2E⁡[X]2+E⁡[X]2=E⁡[X2]−E⁡[X]2 In other words, the variance of ⁠X⁠ is equal to the mean of the square of ⁠X⁠ minus the square of the mean of ⁠X⁠. This equation should not be used for computations using floating-point arithmetic, because it suffers from catastrophic cancellation if the two components of the equation are similar in magnitude. For other numerically stable alternatives, see Algorithms for calculating variance.

Discrete random variable If the generator of random variable X is discrete with probability mass function x1↦p1,x2↦p2,…,xn↦pn, then Var⁡(X)=∑i=1npi⋅(xi−μ)2, where μ is the expected value. That is, μ=∑i=1npixi. (When such a discrete weighted variance is specified by weights whose sum is not 1, then one divides by the sum of the weights.) The variance of a collection of n equally likely values can be written as Var⁡(X)=1n∑i=1n(xi−μ)2, where μ is the average value. That is, μ=1n∑i=1nxi. The variance of a set of n equally likely values can be equivalently expressed, without directly referring to the mean, in terms of squared deviations of all pairwise squared distances of points from each other: Var⁡(X)=1n2∑i=1n∑j=1n12(xi−xj)2=1n2∑i∑j>i(xi−xj)2.

Absolutely continuous random variable If the random variable X has a probability density function ⁠f(x)⁠, and F(x) is the corresponding cumulative distribution function, then Var⁡(X)=σ2=∫ℝ(x−μ)2f(x)dx=∫ℝx2f(x)dx−2μ∫ℝxf(x)dx+μ2∫ℝf(x)dx=∫ℝx2dF(x)−2μ∫ℝxdF(x)+μ2∫ℝdF(x)=∫ℝx2dF(x)−2μ⋅μ+μ2⋅1=∫ℝx2dF(x)−μ2, or equivalently, Var⁡(X)=∫ℝx2f(x)dx−μ2, where μ is the expected value of X given by μ=∫ℝxf(x)dx=∫ℝxdF(x). In these formulas, the integrals with respect to dx and dF(x) are Lebesgue and Lebesgue–Stieltjes integrals, respectively. If the function x2f(x) is Riemann-integrable on every finite interval [a,b]⊂ℝ, then Var⁡(X)=∫−∞+∞x2f(x)dx−μ2, where the integral is an improper Riemann integral.

Examples

Exponential distribution The exponential distribution with parameter ⁠λ>0⁠ is a continuous distribution whose probability density function is given by f(x)=λe−λx on the interval [0, ∞). Its mean can be shown to be E⁡[X]=∫0∞xλe−λxdx=1λ. Using integration by parts and making use of the expected value already calculated, we have: E⁡[X2]=∫0∞x2λe−λxdx=[−x2e−λx]0∞+∫0∞2xe−λxdx=0+2λE⁡[X]=2λ2. Thus, the variance of ⁠X⁠ is given by Var⁡(X)=E⁡[X2]−E⁡[X]2=2λ2−(1λ)2=1λ2.

Fair die A fair six-sided die can be modeled as a discrete random variable, ⁠X⁠, with outcomes 1 through 6, each with equal probability 1/6. The expected value of ⁠X⁠ is (1+2+3+4+5+6)/6=7/2. Therefore, the variance of ⁠X⁠ is Var⁡(X)=∑i=1616(i−72)2=16((−5/2)2+(−3/2)2+(−1/2)2+(1/2)2+(3/2)2+(5/2)2)=3512≈2.92. The general formula for the variance of the outcome, ⁠X⁠, of an ⁠n⁠-sided die is Var⁡(X)=E⁡(X2)−(E⁡(X))2=1n∑i=1ni2−(1n∑i=1ni)2=(n+1)(2n+1)6−(n+12)2=n2−112.

Commonly used probability distributions The following table lists the variance for some commonly used probability distributions.

Properties

… excerpt ends here. Continue reading the full article.

Illustrations

Variance: Example of samples from two populations with the same mean but different variances. The red population has mean .mw-parser-output .texhtml{font-family:"Nimbus Roman No9 L","Times New Roman",Times,serif;font-size:118%;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-kerning:none}.mw-parser-output .texhtml .texhtml{font-size:100%}.mw-parser-output .texhtml-big{font-size:165%}.mw-parser-output .mvar{font-style:italic}@media(min-width:420px){.mw-parser-output .texhtml{white-space:nowrap}}μ = 100 and variance σ2 = 100 (σ = 10), while the blue population has mean μ = 100 and variance σ2 = 2500 (σ = 50).
Example of samples from two populations with the same mean but different variances. The red population has mean .mw-parser-output .texhtml{font-family:"Nimbus Roman No9 L","Times New Roman",Times,serif;font-size:118%;line-height:1;font-variant-numeric:lining-nums tabular-nums;font-kerning:none}.mw-parser-output .texhtml .texhtml{font-size:100%}.mw-parser-output .texhtml-big{font-size:165%}.mw-parser-output .mvar{font-style:italic}@media(min-width:420px){.mw-parser-output .texhtml{white-space:nowrap}}μ = 100 and variance σ2 = 100 (σ = 10), while the blue population has mean μ = 100 and variance σ2 = 2500 (σ = 50).
Variance: Geometric visualisation of the variance of an arbitrary distribution (2, 4, 4, 4, 5, 5, 7, 9): A frequency distribution is constructed.The centroid of the distribution gives its mean.A square with sides equal to the difference of each value from the mean is formed for each value.Arranging the squares into a rectangle with one side equal to the number of values, n, results in the other side being the distribution's variance, σ2.
Geometric visualisation of the variance of an arbitrary distribution (2, 4, 4, 4, 5, 5, 7, 9): A frequency distribution is constructed.The centroid of the distribution gives its mean.A square with sides equal to the difference of each value from the mean is formed for each value.Arranging the squares into a rectangle with one side equal to the number of values, n, results in the other side being the distribution's variance, σ2.
Variance illustration
Variance illustration

Worked examples

Example 1 — a first encounter with Variance

Start with the simplest possible case. Write down what Variance claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Variance before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Variance ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Variance

In research
Variance appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Variance in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Variance is common in secondary-school and first-year university syllabi. It links to neighbouring topics Moments (mathematics), Statistical deviation and dispersion, so understanding it makes those chapters shorter.
In everyday life
Look for Variance outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Variance” →

How to study Variance in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Variance means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Variance out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Variance in simple terms?

In probability theory and statistics, variance is a measure of dispersion, meaning it is a measure of how far a set of numbers are spread out from their average value. It is defined as the expected value of the squared deviation from the mean of a random variable.

Why does Variance matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Variance?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Variance.

Tags

  • Moments (mathematics)
  • Statistical deviation and dispersion

Keep exploring