The conditional probability mass function of Y given X is:
 |
(34) |
For continuous random variables, we can define the conditional
probability density function:
 |
(35) |
Rewriting the above equation yields:
 |
(36) |
The marginal density of Y can then be obtained from:
 |
(37) |
The conditional expectation of a random variable Y is the
expected value of Y given [X=x], and is denoted:
E[Y|X=x] or E[Y|x].
If the conditional probability density function is known, then
the conditional expectation can be found using:
![\begin{displaymath}E[Y\vert X=x] = \left\{ \begin{array}{ll}
\int_{-\infty}^{\in...
...vert x) & \mbox{if $Y$\space is discrete}
\end{array} \right.
\end{displaymath}](img43.gif) |
(38) |
To obtain the unconditional expectation of Y, we can take the
expectation of E[Y|X]. The result is the theorem of total
expectation:
![\begin{displaymath}E[Y] = \left\{ \begin{array}{ll}
\int_{-\infty}^{\infty} E[Y\...
...=x]p(x) & \mbox{if $X$\space is discrete}.
\end{array} \right.
\end{displaymath}](img44.gif) |
(39) |
A similar result is the theorem of total moments:
![\begin{displaymath}E[Y^{k}] = \left\{ \begin{array}{ll}
\int_{-\infty}^{\infty} ...
...{0.3in} & \mbox{if $X$\space is discrete}.
\end{array} \right.
\end{displaymath}](img45.gif) |
(40) |
Example:
Consider a computer system with different classes of jobs.
Y = service time of a job.
X = class of job. X takes on the values
with
probabilities
.
For job class i, service time is exponentially distributed with
parameter
.
The conditional expectation of Y given X=i is:
![\begin{displaymath}E[Y\vert X=i] = \frac{1}{\lambda_{i}}
\end{displaymath}](img49.gif) |
(41) |
The unconditional expectation is then:
![\begin{displaymath}E[Y] = \sum_{i=1}^{r} E[Y\vert X=i] P(X=i) =
\sum_{i=1}^{r}\frac{\alpha_{i}}{\lambda_{i}}
\end{displaymath}](img50.gif) |
(42) |
and
![\begin{displaymath}E[Y^{2}] = \sum_{i=1}^{r} E[Y^{2}\vert X=i] P(X=i)
= \sum_{i...
...a_{i}y}dy =
\sum_{i=1}^{r}\frac{2\alpha_{i}}{\lambda_{i}^{2}}
\end{displaymath}](img51.gif) |
(43) |
then
 |
(44) |
Another approach to calculating the unconditional variance of a
random variable is by using the following equation:
|
Var(Y) = E[Var(Y|X)] + Var[E(Y|X)]
|
(45) |
1999-08-31