CS70 Guide
Search…
⌃K

Expectation and Variance

The expectation of a random variable,
E(X)E(X)
, is the average of possible values weighted by their probabilities. Formally, it can be defined in two ways:
  1. 1.
    Domain definition:
    E(X)=ωΩX(ω)P(ω)E(X) = \sum_{\omega \in \Omega} X(\omega) P(\omega)
    .
  2. 2.
    Range definition:
    E(X)=xxP(X=x)E(X) = \sum_x x P(X = x)
    .
Expectation has nice properties of linearity:
E(X+Y)=E(X)+E(Y)E(X + Y) = E(X) + E(Y)
and
E(aX+b)=aE(x)+bE(aX + b) = aE(x) + b
.