next up previous


Postscript version of this page

STAT 380 Week 2

Summary

Example 3: Mean values

$ Z_n$ = total number of sons in generation $ n$.

$ Z_0=1$ for convenience.

Compute $ {\rm E}(Z_n)$.

Recall definition of expected value:

If $ X$ is discrete then

$\displaystyle {\rm E}(X) = \sum_x x P(X=x)
$

If $ X$ is absolutely continuous then

$\displaystyle {\rm E}(X) = \int_{-\infty}^\infty x f(x) dx
$

Theorem: If $ Y=g(X)$, $ X$ has density $ f$ then

$\displaystyle {\rm E}(Y) = {\rm E}(g(X)) =\int g(x) f(x) dx
$

Key properties of $ {\rm E}$:

1: If $ X\ge 0$ then $ {\rm E}(X) \ge 0$. Equals iff $ P(X=0)=1$.

2: $ {\rm E}(aX+bY) = a{\rm E}(X) +b{\rm E}(Y)$.

3: If $ 0 \le X_1 \le X_2 \le \cdots$ then

$\displaystyle {\rm E}(\lim X_n) = \lim {\rm E}(X_n)
$

4: $ {\rm E}(1) = 1$.

Conditional Expectations

If $ X$, $ Y$, two discrete random variables then

$\displaystyle {\rm E}(Y\vert X=x) = \sum_y y P(Y=y\vert X=x)
$

Extension to absolutely continuous case:

Joint pmf of $ X$ and $ Y$ is defined as

$\displaystyle p(x,y) = P(X=x,Y=y)
$

Notice: The pmf of $ X$ is

$\displaystyle p_X(x) = \sum_y p(x,y)
$

Analogue for densities: joint density of $ X,Y$ is

$\displaystyle f(x,y) dx dy \approx P(x \le X \le x+dx, y \le Y \le y+dy)
$

Interpretation is that

$\displaystyle P(X \in A, Y \in B) = \int_A \int_B f(x,y) dy dx
$

Property: if $ X,Y$ have joint density $ f(x,y)$ then $ X$ has density

$\displaystyle f_X(x) = \int_y f(x,y) dy
$

Sums for discrete rvs are replaced by integrals.

Example:

$\displaystyle f(x,y) = \begin{cases}x+y & 0 \le x,y \le 1
\\
0 & \text{otherwise}
\end{cases}$

is a density because

$\displaystyle \iint f(x,y)dx dy$ $\displaystyle = \int_0^1\int_0^1 (x+y) dy dx$    
  $\displaystyle = \int_0^1 x dx + \int_0^1 y dy$    
  $\displaystyle = \frac{1}{2} + \frac{1}{2} = 1$    

The marginal density of $ X$ is, for $ 0 \le x \le 1$.

$\displaystyle f_X(x)$ $\displaystyle = \int_{-\infty}^\infty f(x,y)dy$    
  $\displaystyle = \int_0^1 (x+y) dy$    
  $\displaystyle = \left.(xy+y^2/2)\right\vert _0^1 = x+\frac{1}{2}$    

For $ x$ not in $ [0,1]$ the integral is 0 so

$\displaystyle f_X(x) = \begin{cases}x+\frac{1}{2} & 0 \le x \le 1
\\
0 & \text{otherwise}
\end{cases}$

Conditional Densities

If $ X$ and $ Y$ have joint density $ f_{X,Y}(x,y)$ then we define the conditional density of $ Y$ given $ X=x$ by analogy with our interpretation of densities. We take limits:

\begin{multline*}
f_{Y\vert X}(y\vert x)dy \\
\approx \frac{ P(x \le X \le x+dx, y \le Y \le y+dy)}{P(x
\le X \le x+dx)}
\end{multline*}

in the sense that if we divide through by $ dy$ and let $ dx$ and $ dy$ tend to 0 the conditional density is the limit

$\displaystyle \frac{\lim_{dx, dy \to 0} \frac{ P(x \le X \le
x+dx, y \le Y \le y+dy)}{(dx\,dy)}}{
\lim_{dx\to 0} \frac{P(x \le X \le x+dx)}{dx}}
$

Going back to our interpretation of joint densities and ordinary densities we see that our definition is just

$\displaystyle f_{Y\vert X}(y\vert x) = \frac{f_{X,Y}(x,y)}{f_X(x)}
$

When talking about a pair $ X$ and $ Y$ of random variables we refer to $ f_{X,Y}$ as the joint density and to $ f_X$ as the marginal density of $ X$.

Example: For $ f$ of previous example conditional density of $ Y$ given $ X=x$ defined only for $ 0 \le x \le 1$:

$\displaystyle f_{Y\vert X}(y\vert x) = \begin{cases}
\frac{x+y}{x+\frac{1}{2}} ...
...y>1
\\
0 & 0 \le x \le 1, y < 0
\\
\text{undefined} & otherwise
\end{cases}$

Example: $ X$ a Poisson$ (\lambda)$ random variable. Observe $ X$ then toss a coin $ X$ times. $ Y$ is number of heads. $ P(H) = p$

$\displaystyle f_Y(y)$ $\displaystyle = \sum_x f_{X,Y}(x,y)$    
  $\displaystyle = \sum_x f_{Y\vert X}(y\vert x) f_X(x)$    
  $\displaystyle = \sum _{x=0}^\infty \dbinom{x}{y} p^y(1-p)^{x-y} \times \frac{\lambda^x}{x!} e^{-\lambda}$    

WARNING: in sum $ 0 \le y \le x$ is required and $ x$, $ y$ integers so sum really runs from $ y$ to $ \infty$

$\displaystyle f_Y(y)$ $\displaystyle = \frac{(p\lambda)^ye^{-\lambda}}{y!} \sum_{x=y}^\infty \frac{\left[(1-p)\lambda\right]^{x-y}}{(x-y)!}$    
  $\displaystyle = \frac{(p\lambda)^ye^{-\lambda}}{y!}\sum_0^\infty \frac{\left[(1-p)\lambda\right]^{k}}{k!}$    
  $\displaystyle = \frac{(p\lambda)^ye^{-\lambda}}{y!}e^{(1-p)\lambda}$    
  $\displaystyle = e^{-p\lambda} (p\lambda)^y/y!$    

which is a Poisson($ p\lambda$) distribution.

Conditional Expectations

If $ X$ and $ Y$ are continuous random variables with joint density $ f_{X,Y}$ we define:

$\displaystyle E(Y\vert X=x) = \int y f_{Y\vert X}(y\vert x) dy
$

Key properties of conditional expectation

1: If $ Y\ge 0$ then $ {\rm E}(Y\vert X=x) \ge 0$. Equals iff $ P(Y=0\vert X=x)=1$.

2: $ {\rm E}(A(X)Y+B(X)Z\vert X=x) = A(x){\rm E}(Y\vert X=x) +B(x){\rm E}(Z\vert X=x)$.

3: If $ Y$ and $ X$ are independent then

$\displaystyle {\rm E}(Y\vert X=x) = {\rm E}(Y)
$

4: $ {\rm E}(1\vert X=x) = 1$.

Example:

$\displaystyle f(x,y) = \begin{cases}x+y & 0 \le x,y \le 1
\\
0 & \text{otherwise}
\end{cases}$

has conditional of $ Y\vert X$:

$\displaystyle f_{Y\vert X}(y\vert x) = \begin{cases}
\frac{x+y}{x+\frac{1}{2}} ...
...y>1
\\
0 & 0 \le x \le 1, y < 0
\\
\text{undefined} & otherwise
\end{cases}$

so, for $ 0 \le x \le 1$,

$\displaystyle {\rm E}(Y\vert X=x)$ $\displaystyle = \int_0^1 y \frac{x+y}{x+\frac{1}{2}} dy$    
  $\displaystyle = \frac{x/2 +1/3}{x+1/2}$    

Computing expectations by conditioning:

Notation: $ {\rm E}(Y\vert X)$ is the function of $ X$ you get by working out $ {\rm E}(Y\vert X=x)$, getting a formula in $ x$ and replacing $ x$ by $ X$. This makes $ {\rm E}(Y\vert X)$ a random variable.

Properties:

1: $ {\rm E}(A(X)Y+B(X)Z\vert X) = A(X){\rm E}(Y\vert X) +B(X){\rm E}(Z\vert X)$.

2: If $ Y$ and $ X$ are independent then

$\displaystyle {\rm E}(Y\vert X) = {\rm E}(Y)
$

3: $ {\rm E}(1\vert X) = 1$.

4: $ {\rm E}\left[{\rm E}(Y\vert X)\right] = {\rm E}(Y) $ (compute average holding $ X$ fixed first, then average over $ X$).

In example:

$\displaystyle {\rm E}(Y\vert X) = \frac{X+2/3}{2X+1}
$

Application to last names problem. Put $ m={\rm E}(X)$

$\displaystyle {\rm E}(Z_n)$ $\displaystyle = {\rm E}\left[{\rm E}(Z_n\vert X)\right]$    
  $\displaystyle = {\rm E}\left[ X{\rm E}(Z_{n-1})\right]$    
  $\displaystyle = {\rm E}(X){\rm E}(Z_{n-1})$    
  $\displaystyle = m {\rm E}(Z_{n-1})$    
  $\displaystyle = m^2 {\rm E}(Z_{n-2})$    
  $\displaystyle \quad \vdots$    
  $\displaystyle = m^{n-1}{\rm E}(Z_1)$    
  $\displaystyle = m^n$    

For $ m < 1$ expect exponential decay. For $ m>1$ exponential growth (if not extinction).

Summary of Probability Review

We have reviewed the following definitions:

Tactics:

Tactics for expected values:


next up previous



Richard Lockhart
2002-02-07