## Tuesday, September 21, 2010

### Similarities Discrete and Continuous Random Variables

From 1st three chapters of Introduction to Probability, it is pretty clear that many properties for both kind of random variables turn out to be strikingly similar. This post is an attempt to consolidate them for easy reference.

Note: In following table, $A_i$s are positive probability events that form a partition of sample space unless otherwise stated.

DescriptionDiscreteContinuous
Basic Expectation Related
E[X]$\sum_x xp_X(x)$$\int xf_X(x)dx E[g(X)]\sum_x g(x)p_X(x)$$\int g(x)f_X(x)dx$
if Y = aX + bE[Y] = aE[X] + bE[Y] = aE[X] + b
if Y = aX + bvar(Y) = $a^2$var(X)var(Y) = $a^2$var(X)
Joint PMF\PDFs
Marginal PMF\PDFs$p_X(x)$ = $\sum_y p_{X,Y}(x,y)$$f_X(x) = \int f_{X,Y}(x,y)dy E[g(X,Y)]\sum_x \sum_y g(x,y)p_{X,Y}(x,y)$$\int \int g(x,y)f_{X,Y}(x,y)dxdy$
if g(X,Y) = aX + bY + cE[g(X,Y)] = aE[X] + bE[Y] + cE[g(X,Y)] = aE[X] + bE[Y] + c
Conditional PMF\PDF$p_{X,Y}(x,y)$ = $p_Y(y)p_{X|Y}(x|y)$$f_{X,Y}(x,y) = f_Y(y)f_{X|Y}(x|y) Conditional Expectation E[X|A]\sum_x xp_{X|A}(x)$$\int xf_{X|A}(x)dx$
E[g(X)|A]$\sum_x g(x)p_{X|A}(x)$$\int g(x)f_{X|A}(x)dx E[X|Y=y]\sum_x xp_{X|Y}(x|y)$$\int xf_{X|Y}(x|y)dx$
E[g(X)|Y=y]$\sum_x g(x)p_{X|Y}(x|y)$$\int g(x)f_{X|Y}(x|y)dx E[g(X,Y)|Y=y]\sum_x g(x,y)p_{X|Y}(x|y)$$\int g(x,y)f_{X|Y}(x|y)dx$
Total Probability Related
$p_X(x)$ = $\sum_{i = 1}^n P(A_i)p_{X|A_i}(x)$$f_X(x) = \sum_{i = 1}^n P(A_i)f_{X|A_i}(x) P(A)\sum_x P(A|X=x)p_X(x)$$\int P(A|X=x)f_X(x)dx$
Total Expectation Related
E[X]$\sum_y p_Y(y)E[X|Y=y]$$\int f_Y(y)E[X|Y=y] E[g(X)]\sum_y p_Y(y)E[g(X)|Y=y]$$\int f_Y(y)E[g(X)|Y=y]$
E[g(X,Y)]$\sum_y p_Y(y)E[g(X,Y)|Y=y]$$\int f_Y(y)E[g(X,Y)|Y=y] E[X]\sum_{i=1}^n P(A_i)E[X|A_i]$$\sum_{i=1}^n P(A_i)E[X|A_i]$
E[g(X)]$\sum_{i=1}^n P(A_i)E[g(X)|A_i]$$\sum_{i=1}^n P(A_i)E[g(X)|A_i] A_is, partition on BE[X|B] = \sum_{i=1}^n P(A_i|B)E[X|A_i\cap B] X and Y are independent p_{X,Y} = p_X(x)p_Y(y)$$f_{X,Y}$ = $f_X(x)f_Y(y)$
E[XY]E[X]E[Y]E[X]E[Y]
E[g(X)h(Y)]E[g(X)]E[h(Y)]E[g(X)]E[h(Y)]
var(X + Y)var(X) + var(Y)var(X) + var(Y)