Home » Basic probability » Conditional Expectation
Category Archives: Conditional Expectation
Conditional Variance
Given two random variables, we define the conditional variance of \(X\) given \(Y\) by
\[ \text{Var}(X | Y ) = E(X^2 | Y ) – (\,E(X | Y )\,)^2 \]
Show that
\[ \text{Var}(X ) = E (\text{Var}(X | Y ) ) +\text{Var}( E(X | Y ) ) \,. \]
Of course \( E(X | Y )\) is just random variable so we have that
\[ \text{Var}( E(X | Y ) ) = E [\,E(X | Y )^2\,] – [\,E(\,E(X | Y )\,)\,]^2 \]
also is is useful to recall that \(E(E(X | Y ))= E(X )\).
Random Walk
Let \(\{Z_1, Z_2, \dots, Z_n,\dots\} \) be a sequence of i.i.d random variables such that
\[ P( Z_k = a ) = \begin{cases} \frac14 & \text{ If } a=1 \\\frac14 & \text{ If } a=0\\\frac12 & \text{ If } a=-1 \end{cases}\]
If \(X_{n+1} = X_n + Z_n\) and \(X_0=1\) what is
- \( E( X_{n+1} | X_{n}) \)?
- \( E( X_{n+1}) \)?
- \( \text{Var}( X_{n+1} | X_{n}) \)?
- \( \text{Var}( X_{n+1} )\)?
Notice that \(X_n\) depends only \(Z_{n-1},Z_{n-2},\dots,Z_1\) and hence \(X_n\) is independent of \(Z_n\) !
Which deck is rigged ?
Two decks of cards are sitting on a table. One deck is a standard deck of 52 cards. The other deck (called the rigged deck) also has 52 cards but has had 4 of the 13 Harts replaced by Diamonds. (Recall that a standard deck has 4 suits: Diamonds, Harts, Spades, and Clubs. normal there are 13 of each suit.)
- What is the probability one chooses 4 cards from the rigged deck and gets exactly 2 diamonds and no hearts?
- What is the probability one chooses 4 cards from the standard deck and gets exactly 2 diamonds and no hearts?
- You randomly chose one of the decks and draw 4 cards. You obtain exactly 2 diamonds and no hearts.
- What is the probability you chose the cards from the rigged deck?
- What is the probability you chose the cards from the standard deck?
- If you had to guess which deck was used, which would you guess? The standard or the rigged ?
Joint, Marginal and Conditioning
Let \( (X,Y)\) have joint density \(f(x,y) = e^{-y}\), for \(0<x<y\), and \(f(x,y)=0\) elsewhere.
- Are \(X\) and \(Y\) independent ?
- Compute the marginal density of \(Y\).
- Show that \(f_{X|Y}(x,y)=\frac1y \), for \(0<x<y\).
- Compute \(E(X|Y=y)\)
- Use the previous result to find \(E(X)\).
conditional densities
Let \(X\) and \(Y\) have the following joint density:
\[ f(x,y)=\begin{cases}2x+2y -4xy & \text{for } 0 \leq x\leq 1 \ \text{and}\ 0 \leq y \leq 1\\ 0& \text{otherwise}\end{cases}\]
- Find the marginal densities of \(X\) and \(Y\)
- find \(f_{Y|X}( y \,|\, X=\frac14)\)
- find \( \mathbf{E}(Y \,|\, X=\frac14)\)
[Pitman p426 # 2]
Expected max/min given min/max
Let \(X_1\) and \(X_2\) be the numbers on two independent fair-die rolls. Let \(M\) be the maximum and \(N\) the minimum of \(X_1\) and \(X_2\). Calculate:
- \(\mathbf{E}( M| N=x) \)
- \(\mathbf{E}( N| M=x) \)
- \(\mathbf{E}( M| N) \)
- \(\mathbf{E}( N| M) \)
Expectation of hierachical model
Consider the following hierarchical random variable
- \(\lambda \sim \mbox{Geometric}(p)\)
- \(Y \mid \lambda \sim \mbox{Poisson}(\lambda)\)