3.4 Expectation

  • Parameters extracted from datasets, such as mean and standard deviation can also be modelled via ideal versions using random variables.

  • Definition: The expectation of a random variable \(X\) is \(\mathbb{E}[X] = \displaystyle{ \sum_{x\in X(\Omega)} } x \cdot p_X (x)\) .

  • Expectation is the mean of the random variable \(X\).

  • \(\mathbb{E}[X]\) does not necessarily match with some state, it’s more like a center of mass between all the states of \(X\).

  • Example: Game with reward after flipping a coin 3 times.

  • Reward:

    • 0 usd, if there are 0 or 1 head.
    • 1 usd, if there are 2 heads.
    • 8 usd, if there are 3 heads.
  • Model:

    • \(X\): Number of heads after flipping a fair coin 3 times.
    • \(Y\): Reward obtained from this game.
  • Sample space: HHH, HHT, HTH, THH, THT, TTH, HTT, TTT .

  • Values obtained:

    • \(p_X(0) = 1/8, p_X(1) = 3/8, p_X(2) = 3/8, p_X(3) = 1/8\)
    • \(p_Y(0) = p_X(0) + p_X(1) = 4/8\)
    • \(p_Y(1) = p_X(2) = 3/8\)
    • \(p_Y(8) = p_X(3) = 1/8\)
  • Expected reward:

    • \(E[Y] = 0\cdot 4/8 + 1\cdot 3/8 + 8\cdot 1/8 = 11/8\) .
    • Therefore, if the cost of the game is greater than \(11/8\) usd, then, we would lose money (on average).