Conditional expectation and Iterated expectation problem

I have $X_i|b_i \sim Poisson(\lambda_i)$, and $log(\lambda_i)=x_i^t\beta+\varepsilon_i$ further $\varepsilon\sim N(0,\sigma^2)$

then, how to find $E(X_i)$?

I try using the iterated expectation $E(X_i)=E[E(X_i|b_i)]$, so $E(X_i)=E(\lambda_i)$ but how to use $log(\lambda)$ to find the solution?

thanks.

• What is the $x_i^t$ in your equation for $\log(\lambda_i)?$ A constant unrelated to $X_i$? – spaceisdarkgreen Feb 20 '17 at 2:01
• linear model $x^t_i \beta +\varepsilon$ – albert Feb 20 '17 at 2:04
• so the $x_i$ is unrelated to the $X_i$? Why not call $X_i$ something different? – spaceisdarkgreen Feb 20 '17 at 2:06
• Is different $x_i$ and $X_i$ – albert Feb 20 '17 at 2:07

We have $\lambda_i = Ce^{\epsilon_i}$ where $C=e^{x_i^t\beta}$ so can take the expected value $$E(\lambda_i) = CE(e^{\epsilon_i})=C\int_{-\infty}^\infty e^t \frac{1}{\sqrt{2\pi\sigma^2}}e^{-\frac{t^2}{2\sigma^2}}dt$$ since $\epsilon_i\sim N(0,\sigma^2).$ The integral is a Gaussian integral and can be done by completing the square.
• @albert I'm using the fact that $\epsilon_i \sim N(0,\sigma^2).$ Since $\lambda_i =e^{x_i^t\beta}e^{\epsilon_i},$ we have$E(\lambda_i) = e^{x_i^t\beta}E(e^{\epsilon_i}).$ So you need to compute $E(e^Z)$ where $Z\sim N(0,\sigma^2)$ which is $\int e^z f_Z(z)dz$ where $f_Z(z)$ is the PDF for a $N(0,\sigma^2)$. – spaceisdarkgreen Feb 20 '17 at 2:28