Menu

Expected Value and Variance of a Random Variable

Expected Value and Variance of a Random Variable

The expected value is the long-run average of a random variable. It is what you would get if you repeated the process a very large number of times and averaged the results.

Expected Value

E(X) = Σ x × P(x)

  • E(X): the expected value, also written μ. It is the distribution's balance point.
  • x: each possible value of the random variable.
  • P(x): the probability of that value.
  • Σ (sigma): add up the product x × P(x) across all possible values.

Variance

Var(X) = Σ (x − μ)² × P(x)

  • Var(X): the variance of the random variable, which measures how widely its values spread around the expected value.
  • x − μ: the distance of a value from the expected value.
  • P(x): each squared distance is weighted by how likely that value is.

The standard deviation is σ = √Var(X), which returns the spread to the original units.

Example: A support team receives a number of urgent tickets in a day, X, with the following probabilities. Find E(X) and Var(X).

x

0

1

2

3

P(x)0.10.40.30.2
  1. E(X) = 0(0.1) + 1(0.4) + 2(0.3) + 3(0.2) = 0 + 0.4 + 0.6 + 0.6 = 1.6
  2. Var(X) = (0 − 1.6)²(0.1) + (1 − 1.6)²(0.4) + (2 − 1.6)²(0.3) + (3 − 1.6)²(0.2)
  3. Var(X) = 0.256 + 0.144 + 0.048 + 0.392 = 0.84
  4. σ = √0.84 ≈ 0.92

The team can expect about 1.6 urgent tickets a day, plus or minus about 0.92. You calculate a model’s expected loss from its possible errors the same way.


Probability and Statistics for Data Science

AP

Abhishek Pati



Learn via Video Course

Probability and Statistics for Data Science Logo

Probability and Statistics for Data Science

4 hrs



Get in Touch For Details