CS70 Guide
  • This site is now deprecated
  • LaTeX Reference
  • Discrete Math
    • Overview
    • Propositional Logic
    • Proofs
    • Stable Matching
    • Graphs
    • Modular Arithmetic
    • RSA Cryptography
    • Polynomials
    • Countability
    • Computability
  • Probability
    • Overview
    • Counting
    • Discrete Probability
    • Hashing and the Union Bound
    • Expectation and Variance
    • Concentration Inequalities
    • Continuous Probability
    • Markov Chains
    • The Beta Family
    • The Gamma Family
    • Conditional Expectation and Variance
Powered by GitBook
On this page
  • Conditional Expectation
  • Conditional Variance

Was this helpful?

  1. Probability

Conditional Expectation and Variance

PreviousThe Gamma Family

Last updated 4 years ago

Was this helpful?

Properties:

Conditional Expectation

E(X∣Y)E(X|Y)E(X∣Y)is the conditional expectation of XXXgiven YYY

  • E(X∣Y=y)E(X|Y=y)E(X∣Y=y)is a fixed value, but E(X∣Y)E(X|Y)E(X∣Y)is a random variable (it is a function of YYY)

  • Iterated expectation: E(E(X∣Y))=E(X)E(E(X|Y)) = E(X)E(E(X∣Y))=E(X)

  • Additivity: E(Y+Z∣X)=E(Y∣X)+E(Z∣X)E(Y+Z | X) = E(Y|X) + E(Z|X)E(Y+Z∣X)=E(Y∣X)+E(Z∣X)

    • does not work on the right hand side: E(Y∣X+Z)≠E(Y∣X)+E(Y∣Z)E(Y | X+Z) \ne E(Y|X) + E(Y|Z)E(Y∣X+Z)=E(Y∣X)+E(Y∣Z)

  • Linearity: E(aX+b∣Y)=aE(X∣Y)+bE(aX + b | Y) = aE(X|Y) + bE(aX+b∣Y)=aE(X∣Y)+b

  • Conditioning on the same variable: E(g(S)T∣S)=g(S)E(T∣S)E(g(S)T | S) = g(S)E(T|S)E(g(S)T∣S)=g(S)E(T∣S)

Conditional Variance

If Var(Y)Var(Y)Var(Y)is difficult to find directly, we can use the variance decomposition to condition the variance on another variable.

Var(Y)=E(Var(Y∣X))+Var(E(Y∣X))Var(Y) = E(Var(Y|X)) + Var(E(Y|X))Var(Y)=E(Var(Y∣X))+Var(E(Y∣X))