Home/Statistics & Probability/Probability Distributions/Variance of a Discrete Random Variable

Formula & Calculator

Variance of a Discrete Random Variable

Calculates the spread of a discrete random variable's possible outcomes around its expected value.

StatisticsProbabilityDistributions

Variance of a Discrete Random Variable CalculatorVar(X) = E(X²) − [E(X)]²

Var(X) = E(X²)E(X)²
Var(X) = variance  ·  E(X²) = second moment  ·  E(X) = mean (first moment)
⟹ SolveVar(X), E(X²), E(X)
Please fix the errors above.
Solve for:
Presets:
Variance
Var(X): E(X²): E(X):
✓ Copied!
Variance Gauge
Low (< 1) Medium (1–10) High (> 10)
Var(X) = E(X²) − [E(X)]²  ·  E(X) is the mean, E(X²) is the second moment.

Interpretation

Var(X) = E(X²) − [E(X)]². Measures the spread of a random variable around its mean. Used in risk assessment and statistics.

Var(X) = E(X²) - [E(X)]²
Variance of a Discrete Random Variable

Variables

SymbolQuantityUnit
Var(X)Variance of X
E(X²)Expected value of X squared
E(X)Expected value of X

What it means

The variance of a discrete random variable measures the average squared deviation from the mean. It is calculated as the expected value of X² minus the square of the expected value. The variance quantifies uncertainty or risk. In finance, it is used to measure volatility; in quality control, it measures process spread. The standard deviation is the square root. Understanding variance is crucial for assessing the dispersion of random variables and is used in many statistical methods (ANOVA, regression, etc.). It is the second central moment of the distribution.

Worked example

Variance of Discrete RV – Two Examples

Real‑World
Scenario: For a random variable, E(X²)=15.17 and E(X)=3.5. Find Var(X).
ParameterValue
E(X²)15.17
E(X)3.5
1Var(X) = 15.17 − (3.5)² = 15.17 − 12.25 = 2.92
Result 2.92 ✓ Variance
Scenario: For a game, E(X²)=20 and E(X)=4. Find Var(X).
ParameterValue
E(X²)20
E(X)4
1Var = 20 − 16 = 4
Result 4 ✓ Variance
Insight: Variance measures the average squared deviation from the mean. For discrete RVs, it is E(X²) − [E(X)]².

Common mistakes

  • Variance of a discrete random variable: Var(X) = E[(X−μ)²] = E(X²) − [E(X)]².
  • Units: Variance is in squared units of X.
  • Non‑negative: Variance is always ≥ 0.
  • Use E(X²): Compute the expected value of X² correctly.
  • Alternative: Var(X) = Σ(xᵢ−μ)² · P(xᵢ).

Applications

The variance of a discrete random variable measures the spread of its probability distribution, computed as E(X²) − [E(X)]². It is essential for quantifying risk, uncertainty, and variability in stochastic processes. Engineers use variance in reliability analysis, quality control, and design of experiments. In finance, it measures portfolio risk. In operations research, it helps assess the variability of demand. By calculating variance, professionals can understand the dispersion of outcomes and make decisions that account for uncertainty. Variance is also the basis for many statistical tests (e.g., ANOVA) and for covariance analysis. Mastering this concept is crucial for advanced probabilistic modelling and inference.

  • Risk assessment and uncertainty quantification
  • Quality control – process variability characterisation
  • Design of experiments – ANOVA and variance component analysis
  • Financial portfolio risk measurement
  • Operations management – demand and lead time variability

Frequently Asked Questions

Q01What is the variance of a discrete random variable and how is it calculated?
A01

Var(X) = E(X²) − [E(X)]². Alternatively, Σ (xᵢ − μ)² · P(xᵢ). It measures the spread of the distribution around the mean.

Q02What is the standard deviation of a random variable?
A02

The standard deviation is the square root of the variance: SD(X) = √Var(X). It is in the same units as the variable.

Q03How does variance behave under linear transformations?
A03

If Y = aX + b, then Var(Y) = a² · Var(X). Adding a constant does not affect variance.

Q04What is the variance of a Bernoulli random variable?
A04

If X ~ Bernoulli(p), then Var(X) = p(1−p). This is maximised at p=0.5.

Q05What is the relationship between variance and covariance?
A05

Variance is the covariance of a variable with itself: Var(X) = Cov(X,X).

Q06Can variance be negative?
A06

No, variance is always non‑negative because it is an expectation of squared deviations.

Q07What is the variance of the sum of two independent random variables?
A07

If X and Y are independent, Var(X+Y) = Var(X) + Var(Y). If not independent, add 2Cov(X,Y).

Q08How is variance used in finance to measure risk?
A08

Variance (or standard deviation) of asset returns is a common measure of volatility, which is a proxy for financial risk.

Q09What is the coefficient of variation for a random variable?
A09

CV = SD / E(X) (if E(X)≠0). It is a standardized measure of dispersion.

Q10How do you calculate the variance of a binomial random variable?
A10

If X ~ Binomial(n,p), then Var(X) = np(1−p). This follows from the variance of the sum of independent Bernoulli variables.