# Computing expectation with n noisy sample?

Assume $\theta$~$N(0,\sigma^2)$, and we have $n$ realization of signals $s_i$, where $s_i$~$N(\theta,\sigma_i^2)$.

Now the question is: what is $E[\theta|s_1,s_2,\dots,s_n]$?

Since the random vector $(\theta,s_1,\ldots,s_n)$ is centered gaussian, $\mathbb E(\theta\mid s_1,\ldots,s_n)=\sum\limits_ka_ks_k$ for some deterministic vector $(a_1,\ldots,a_n)$. For every $i$, $\mathbb E(\theta s_i)=\sum\limits_ka_k\mathbb E(s_ks_i)$ yields the relation $$\sigma^2=a_i(\sigma^2+\sigma_i^2)+\sum\limits_{k\ne i}a_k\sigma^2=a_i\sigma_i^2+\sigma^2\sum_{k=1}^na_k.$$ Hence, $a_i\sigma_i^2$ does not depend on $i$. Assume that $a_k\sigma_k^2=\tau^2$ for every $k$, then $$\sigma^2=\tau^2+\sigma^2\tau^2\sum_{k=1}^n\frac1{\sigma_k^2},$$ which yields the value of $\tau^2$. Finally, $$\mathbb E(\theta\mid s_1,\ldots,s_n)=\tau^2\sum_{k=1}^n\frac{s_k}{\sigma_k^2},\qquad\frac1{\tau^2}=\frac1{\sigma^2}+\sum\limits_{k=1}^n\frac1{\sigma_k^2}.$$