Discussion 13A

Iterated Expectation

E[XY]E[X \mid Y] is a conditional expectation. 
E[XY]=xxPr(X=xY)E[X \mid Y] = \sum_x x \Pr(X=x \mid Y)
It is a function of YY: for any particular value of Y=yY=y, what do we expect XX to be? So E[XY]=g(Y)E[X \mid Y] = g(Y).
The expectation of this function EY[g(Y)]=EY[E[XY]]=E[X]E_Y[g(Y)] = E_Y[ E[ X \mid Y ] ] = E[X].

This is also known as the law of total expectation because EY[g(Y)]=yg(y)Pr(Y=y)=yE[XY=y]Pr(Y=y)E_Y [g(Y)] = \sum_y g(y) \Pr(Y=y) = \sum_y E[X \mid Y=y] \Pr(Y=y).
Taking it a couple steps further,
yE[XY=y]Pr(Y=y)\sum_y E[X \mid Y=y] \Pr(Y=y)
=y(xxPr(X=xY=y))Pr(Y=y)= \sum_y \Big(\sum_x x \Pr(X=x \mid Y=y) \Big) \Pr(Y=y)
=x,yxPr(X=xY=y)Pr(Y=y)= \sum_{x,y} x \Pr(X=x \mid Y=y) \Pr(Y=y)
=x,yxPr(X=x,Y=y)= \sum_{x,y} x \Pr(X=x, Y=y)
=xxyPr(X=x,Y=y)= \sum_{x} x \sum_y \Pr(X=x, Y=y)
=xxPr(X=x)= \sum_x x \Pr(X=x)
=E[X]=E[X]

Markov Chains

Premise: represent a sequence of random variables X1,X2,,XnX_1, X_2, \cdots, X_n as a directed graph, where each node represents a value that the random variables can take on, and holds a probability distribution to describe transitions to the next node

X\mathcal{X}: state space. set of possible values of XiX_i
PP: state transition matrix. entry Pi,jP_{i,j} at row ii and column jj is Pi,j=Pr(Xn+1=jXn=i)P_{i,j} = \Pr(X_{n+1} = j \mid X_n = i)
π0\pi_0: initial distribution. π0(i)=Pr(X0=i)\pi_0(i) = \Pr(X_0 = i). in general πn\pi_n is the distribution of XnX_n

The sum of each row of PP is 11. Because of the convention of defining Pi,jP_{i,j} as above, the distributions πi\pi_i are row vectors and the πn+1=πnP\pi_{n+1} = \pi_n P is a transposed version of the usual matrix-vector multiplication.

A stationary distribution π\pi is a distribution on X\mathcal{X} such that π=πP\pi = \pi P. It is a vector associated with an eigenvalue of 11.

Absorption Probabilities

See problem

Hitting Times

See problem