- #1

- 329

- 5

Hey all, I have been doing some math lately where I need to find the conditional expectation of a function of random variables. I also at some point need to find a derivative with respect to the variable that has been conditioned. I am not sure of my work and would appreciate it if you guys can maybe have a look.

Let us assume you have the following function (an AR(1) process): [itex]z_{k+1} = x_{k+1}z_k + \epsilon_{k+1}[/itex], where

[itex]x_{k+1}=x_k + v_{k+1}[/itex],

[itex]v_{k+1}\sim\mathcal{N}(0,\sigma_v^2)[/itex],

[itex]\epsilon_{k+1}\sim\mathcal{N}(0,\sigma_{\epsilon}^2)[/itex] and [itex]\epsilon[/itex] is iid.

So first, here is the conditional expectation of [itex]z_{k+1}[/itex] given [itex]x_{k+1}[/itex] and [itex]z_k[/itex]

[itex]E[z_{k+1}|x_{k+1},z_k]=x_{k+1}z_k = \mu[/itex] (is this correct?)

Here is the conditional covariance of [itex]z_{k+1}[/itex] given [itex]x_{k+1}[/itex] and [itex]z_k[/itex]

[itex]

\begin{equation}

\begin{split}

cov(z_{k+1}|x_{k+1},z_k) &= E[(z_{k+1}-\mu)(z_{k+1}-\mu)^T|x_{k+1},z_k] \\

&= E[z_{k+1}^2|x_{k+1},z_k]-E[z_{k+1}\mu|x_{k+1},z_k]-E[\mu z_{k+1}|x_{k+1},z_k]+E[\mu^2|x_{k+1},z_k] \\

&= E[z_{k+1}^2|x_{k+1},z_k]-\mu^2-\mu^2+\mu^2 \\

&= E[z_{k+1}^2|x_{k+1},z_k]-\mu^2 \\

&= E[(x_{k+1}z_k)^2 + 2x_{k+1}z_k\epsilon_{k+1}+\epsilon^2|x_{k+1},z_k] - \mu^2 \\

&= \mu^2 + \sigma^2 - \mu^2 \\

& = \sigma^2

\end{split}

\end{equation}

[/itex]

(is this correct?)

As for my derivative of conditioned RV, I think I will wait for your opinion/feedback on the above before I ask.

Any help and or comments will be greatly appreciated.

Thank you for reading : )

EDIT: Fixed an error

Let us assume you have the following function (an AR(1) process): [itex]z_{k+1} = x_{k+1}z_k + \epsilon_{k+1}[/itex], where

[itex]x_{k+1}=x_k + v_{k+1}[/itex],

[itex]v_{k+1}\sim\mathcal{N}(0,\sigma_v^2)[/itex],

[itex]\epsilon_{k+1}\sim\mathcal{N}(0,\sigma_{\epsilon}^2)[/itex] and [itex]\epsilon[/itex] is iid.

So first, here is the conditional expectation of [itex]z_{k+1}[/itex] given [itex]x_{k+1}[/itex] and [itex]z_k[/itex]

[itex]E[z_{k+1}|x_{k+1},z_k]=x_{k+1}z_k = \mu[/itex] (is this correct?)

Here is the conditional covariance of [itex]z_{k+1}[/itex] given [itex]x_{k+1}[/itex] and [itex]z_k[/itex]

[itex]

\begin{equation}

\begin{split}

cov(z_{k+1}|x_{k+1},z_k) &= E[(z_{k+1}-\mu)(z_{k+1}-\mu)^T|x_{k+1},z_k] \\

&= E[z_{k+1}^2|x_{k+1},z_k]-E[z_{k+1}\mu|x_{k+1},z_k]-E[\mu z_{k+1}|x_{k+1},z_k]+E[\mu^2|x_{k+1},z_k] \\

&= E[z_{k+1}^2|x_{k+1},z_k]-\mu^2-\mu^2+\mu^2 \\

&= E[z_{k+1}^2|x_{k+1},z_k]-\mu^2 \\

&= E[(x_{k+1}z_k)^2 + 2x_{k+1}z_k\epsilon_{k+1}+\epsilon^2|x_{k+1},z_k] - \mu^2 \\

&= \mu^2 + \sigma^2 - \mu^2 \\

& = \sigma^2

\end{split}

\end{equation}

[/itex]

(is this correct?)

As for my derivative of conditioned RV, I think I will wait for your opinion/feedback on the above before I ask.

Any help and or comments will be greatly appreciated.

Thank you for reading : )

EDIT: Fixed an error

Last edited: