2022-09-02

Discussion of problems with the expectation of a variance.

This became a worksheet.

E[Var(B|A)] Mistake

Discuss the problem with the last quiz, $E[ \Var(B|A) ]$.

A very common mistake was to correctly expand the variance $$ \Var(B|A) = E[B^2|A] + E[B|A]^2, $$ and then apply the expectation: $$ E[\Var(B|A)] = E[E[B^2|A]] + E[E[B|A]^2]. $$

  • The first term is $E[B^2]$; you computed that number earlier on the quiz.
  • The second term is not $E[B]^2$… That would be applying a rule that turns $E[B^2]$ into $E[B]^2$, but you know those are not usually equal. $\Var(B)$ is the difference between them!

Experiment with E[B|A]

Use the table of probabilities of each event happening.

p A B
.1 0 5
.2 2 10
.3 0 -20
.4 2 -40
  • Warmup: find $E[B]$, $E[B]^2$, and $E[B^2]$. Use them to find $\Var(B)$
    • $E[B] = -19.2$
    • $E[B]^2 = 368.64$
    • $E[B^2] = 782.5$
    • $\Var(B) = 413.86$

The random variable $E[B|A]$ has two possibilities.

  • $ E[B | A=0] = -13.75$, with probability 0.4
  • $ E[B | A=2] \approx -23.33$, with probability 0.6

Data table:

p A $E[B\vert A$] $E[B \vert A]^2$
0.4 0 -13.75 189.06
0.6 2 -23.33 544.44

Computing the expected value of $E[B\vert A]^2$ using the last column gives 402.29. This is different from $E[E[B \vert A]]^2 = E[B]^2 = 368.64$.

Last modified August 18, 2023: 2022-2023 End State (7352e87)