# Distributions with Hierarchical models

This problem concerns three variables, $X, Y$, and $W$. The pair of random variables $(X,Y)$ is described by a hierarchical model; $X\sim N(\mu, \tau^2)$ and $Y\mid X \sim N(x, \sigma^2)$. The third variable is defined in terms of the first two that is $W = Y - X$.

1) Find the joint distribution of $X$ and $Y$.

2) Find the joint distribution of $X$ and $W$.

3) Are $X$ and $W$ independent?

4) What is the distribution of $W$?

5) What distribution does $X + W$ follow? Justify your answer.

For 1, I have tried using the mgf's to try and find a way to simplify the distribution but am wondering if I should simply apply the regular way of solving a conditional hierarchical model. For 2, I am trying to use a change of variable and using a $z$ and $w$ but not having much luck. For 3, They are not independent because $X$ is part of $W$. For 4, $W$ is a normal distribution but I am unsure of cleaning up the parameters. For 5, I am still getting a normal distribution but do not believe this is correct. Any help is greatly appreciated.

-

(1) and (5): Think of $Y$ as a sum of $X$ and an independent $N(0, \sigma^2)$. What do you know about the sum of independent normals?
(2), (3), and (4): Using moment generating functions will work here. Use $\mathbb{E}[e^{uY}|X] = e^{uX+\sigma^2u^2/2}$ and the tower property of conditional expectation. If you find that the mgf splits into two mgfs that you recognize then you've proven the random variables are independent and found their distributions.