Finding moments of compounding normal random variables

50 Views Asked by At

Suppose that given $\Theta=\theta$, X is normally distributed with mean $\mu$ and variance $v$ so that $$f_{X|\Theta}(x|\theta)= \frac{1}{\sqrt{2\pi v}} \exp \left[ -\frac{1}{2v}(x-\theta)^2\right]; -\infty <x<\infty$$

and $\Theta$ itself is normally distributed with mean $\mu$ and variance $a$ i.e.

$$f_{\Theta}(\theta)= \frac{1}{\sqrt{2\pi a}} \exp \left[ -\frac{1}{2a}(\theta-\mu)^2\right]; -\infty <\theta<\infty$$

How can one determine the marginal distribution function of $X$, the probability density function of $X$, and hence the $var(X)$?

Using the answer given by Tommik below, I was also able to give more details derivations below

From definition of marginal distribution, we have $$f_X(x)=\int _{\forall \theta} f_{X| \Theta}f_{\Theta} \ d \theta$$ That is we consider \begin{align*} f_{X| \Theta}f_{\Theta} &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2v}(x-\theta)^2-\dfrac{1}{2a}(\theta-\mu)^2\right) \end{align*} Simplifying the expression inside, we have \begin{align*} f_{X| \Theta}f_{\Theta} &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2v}(x-\theta)^2-\dfrac{1}{2a}(\theta-\mu)^2\right) \\ &= \dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2va} \left( a (x-\theta)^2+v(\theta-\mu)^2 \right) \right)\\ &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2va} \left( a (x-\theta)^2+v(\theta-\mu)^2 \right) \right) \\ &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2va} \left( ax^2+v\mu^2+(a+v)\theta^2-2\theta (ax+\mu v) \right) \right) \\ \end{align*} Now, we complete the square about $ \theta $ and about $\mu$, we have \begin{align*} f_{X| \Theta}f_{\Theta}&=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2va} \left( ax^2+v\mu^2+(a+v)\theta^2-2\theta (ax+\mu v) \right) \right) \\ &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2va} \left( M+(a+v) \left(\theta-\frac{ax+\mu v}{a+v} \right)^2 \right) \right) \end{align*} Where $ M=ax^2+v\mu^2-\dfrac{(ax+\mu v)^2}{a+v}= \dfrac{av(x-\mu)^2}{a+v} $\

Thus, we have \begin{align*} f_{X| \Theta}f_{\Theta}&=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2va} \left( \dfrac{av(x-\mu)^2}{a+v}+(a+v) \left(\theta-\frac{ax+\mu v}{a+v} \right)^2 \right) \right) \end{align*} Hence, we substitute this in the integral above and we have \begin{align*} & \int _{\forall \theta } f_{X| \Theta}f_{\Theta} \ d \theta \\ &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2} \dfrac{(x-\mu)^2}{a+v} \right) \int _{\forall \theta } \exp\left( -\dfrac{1}{2va} \left( (a+v) \left(\theta-\frac{ax+\mu v}{a+v} \right)^2 \right) \right) \ d \theta \end{align*} Letting $ t= \theta-\frac{ax+\mu v}{a+v} \Rightarrow dt=d \theta$, we have \begin{align*} \int _{\forall \theta } f_{X| \Theta}f_{\Theta} \ d \theta &=\dfrac{1}{2 \pi \sqrt{va}}\exp\left( -\dfrac{1}{2} \dfrac{(x-\mu)^2}{a+v} \right) \int _{\forall \theta } \exp\left( -\frac{t^2(a+v)}{2va} \right) \ d \theta \end{align*} Letting $ y=\dfrac{t\sqrt{a+v}}{\sqrt{va}} \Rightarrow dt=\dfrac{\sqrt{va}}{\sqrt{a+v}} dy$, we can write \begin{align*} \int _{\forall \theta } f_{X| \Theta}f_{\Theta} \ d \theta &=\dfrac{1}{2 \pi \sqrt{va}} \dfrac{\sqrt{va}}{\sqrt{a+v}}\exp\left( -\dfrac{1}{2} \dfrac{(x-\mu)^2}{a+v} \right) \int _{\forall \theta } \exp\left( -\frac{y^2}{2} \right) \ d y \\ &= \dfrac{1}{ \sqrt{2 \pi(v+a)}} \exp\left( -\dfrac{1}{2} \dfrac{(x-\mu)^2}{a+v} \right) \int _{\forall \theta } \dfrac{1}{\sqrt{2\pi}} \exp\left( -\frac{y^2}{2} \right) \ d y \\ \Rightarrow f_X(x) &= \dfrac{1}{ \sqrt{2 \pi(v+a)}} \exp\left( -\dfrac{1}{2} \dfrac{(x-\mu)^2}{a+v} \right) \end{align*} This is the pdf of $ N(\mu, a+v) $

Hence, $ \mathbb{V}ar(X)=a+v $

1

There are 1 best solutions below

2
On BEST ANSWER

Assuming that there is a typo in your question so that

$$X|\theta\sim N(\theta;v)$$

and $\theta$ itself is gaussian

$$\theta\sim N(\mu;a)$$

Is it easy to prove that marginally

$$X\sim N(\mu;a+v)$$


Proof:


Let's set

$$Y=X-\theta$$

The conditional law $Y|\theta$ is obviously $N(0;v)$ , $\forall{\theta}$ and thus $Y\perp\!\!\!\perp \theta$

This means that

$$X=Y+\theta$$

is a linear combination of two independent gaussians and thus $X$ itself is Gaussian with the following parameters:

$$X\sim N(\mu;a+v)$$