Expectation of squared non zero-mean data w.r.t. two distributions I have the following model:
$\hat{d}_i=a_i+b_i+c$, where
$a_i$ is a zero-mean Gaussian r.v., $b_i$ is a r.v of unknown distribution, and $c$ is a constant. I want to estimate $E_a\left[E_b\left(\hat{d}^2\right)\right]$, directly from the recorded sample $\hat{d}$.
Can I say the following? 
$E_a\left[E_b\left(\hat{d}^2\right)\right]=\frac1N\Sigma_{i=1}^{N}\hat{d}_i^2$
Thanks a bunch!
Zohair
 A: Assuming ergodictiy,
$$\frac1N\Sigma_{i=1}^{N}\hat{d}_i^2 \xrightarrow{a.s.} E\left(\hat d^2\right)$$
But $\hat d^2 = h(a,b)$, i.e. it is a function of the RV's $a$ and $b$, and so the expected value is taken with respect to the joint distribution of $\{a,b\}$. So
$$E\left(\hat d^2\right) = \int_{S_a}\int_{S_b}f_{ab}(a,b)h(a,b) \text{d}b\text{d}a $$
Since $a$ and $b$ are independent, we have that $f_{ab}(a,b) = f_{a}(a)f_{b}(b)$ so
$$E\left(\hat d^2\right) = \int_{S_a}\int_{S_b}f_{a}(a)f_{b}(b)h(a,b) \text{d}b\text{d}a = \int_{S_a}f_{a}(a)\int_{S_b}f_{b}(b)h(a,b) \text{d}b\text{d}a$$
$$=\int_{S_a}f_{a}(a)\Big(E_b[h(a,b)]\Big) \text{d}a = E_a\Big(E_b[h(a,b)]\Big)$$
$$=E_a\left[E_b\left(\hat{d}^2\right)\right]$$
So what you can say is that the sample mean of $\hat d^2$ is a strongly consistent estimator of this "sequential" expected value.
A: Thanks @Aleco for the comment. I think, I figured out the answer, as follows:
$E_a\left[E_b\left(\hat{d}^2\right)\right]=\int_a\left(\int_b\hat{d}^2{f_b}\left(b\right)db\right)f_a(a) da\\=\int_a\int_b\hat{d}^2{f_b}\left(b\right)f_a(a). db.da\\=\int_a\int_b\hat{d}^2f_{a,b}(a,b). db.da\\=E_{a,b}\left[\hat{d}^2\right]\\=\frac1N\Sigma_{i=1}^{N}\hat{d}^2_i$
where the third step follows from the independence. 
Is my proof correct?
