askvity

What is the Variance of a Random Variable?

Published in Statistical Dispersion 3 mins read

The variance of a random variable quantifies how much the values of that variable deviate or spread out from its expected value (mean). It gives a measure of the variability or dispersion of a dataset.

Understanding Variance

Variance is a crucial concept in statistics and probability, offering insights into the spread of data points. Specifically, it calculates the average squared difference between each value and the mean. The higher the variance, the more spread out the values are.

Key Components of Variance

  • Expected Value (Mean): The average value of a random variable. Represented as E[X].
  • Squared Difference: The difference between each data point and the expected value, squared (to eliminate negative differences). Represented as (X-E[X])².
  • Expected Value of Squared Differences: The average of all squared differences. This is what variance represents.

Formula for Variance

The variance of a random variable X, denoted as Var[X], is defined as:

Var[X] = E[(X - E[X])²]

This formula states that the variance is the expected value (mean) of the squared differences between each value of the random variable and its expected value. The reference also provides an alternative formula:

Var[X] = E[X²] - (E[X])²

This formula calculates the variance by taking the expected value of the square of the random variable and subtracting the square of the expected value of the random variable. Both formulas yield the same result.

Calculating Variance

Here's a step-by-step breakdown of calculating variance using the first formula:

  1. Calculate the Expected Value (E[X]): Find the average or mean of all possible values of the random variable.
  2. Find the Difference: Subtract the expected value from each value of the random variable (X - E[X]).
  3. Square the Differences: Square each of the differences obtained in step 2, resulting in (X-E[X])².
  4. Calculate the Expected Value of Squared Differences: Average the squared differences obtained in step 3. This average is the variance.

Example

Consider a random variable X with two possible values, 2 and 4, each with equal probability of 0.5.

  1. E[X] = (2 0.5) + (4 0.5) = 3
  2. The differences are (2-3) = -1 and (4-3) = 1
  3. The squares of these differences are (-1)^2 = 1 and 1^2 = 1
  4. Var[X] = (1 0.5) + (1 0.5) = 1
    The variance of X is 1.

Practical Insights

  • High Variance: Indicates a wide spread in the data values, meaning individual values are quite far from the average.
  • Low Variance: Indicates that the data values are clustered closely around the mean, with little variation.
  • Units: The unit of variance is the square of the unit of the original data. Standard deviation, the square root of the variance, is often preferred because it's in the same unit as the data.

Summary of Variance Formula

Formula Explanation
Var[X] = E[(X - E[X])²] Expected value of the squared differences between each value and its mean.
Var[X] = E[X²] - (E[X])² Expected value of the square of the variable minus the square of the expected value of the variable.

Related Articles