Chapter 4 New Marginal Distributions (y)
Suppose we have the outcome variable: y∼MVNn(μ1n,τ−1(k1MMT+I))
with: μ∼N(μμ,τ−1μ)
And define Ψ=k1MMT+I
Then, as a ‘trick’ to estimate the mean and variance of y, we can write:
y=μ1n+[τ−1Ψ]1/2z
where z∼MVN(0,I) is a standard multivariate normal. Then we have:
E(y)=μμ1n+0=μμ1nVar(y)=Var(μ1n)+Var([τ−1Ψ]1/2)=τ−1μ1n1Tn+τ−1Ψ
Now let τ−1μ=k2τ−1, we get:
y∼MVN(μμ1,τ−1[k21n1Tn+Ψ])≡MVN(W0,τ−1W1)
We now want to marginalize this over τ∼Ga(α,β), by integrating out a Gamma distribution with:
Ga(n/2+α,β+(y−W0)TW−11(y−W0)2)
…so we get:
π(y|μμ,k1,k2)=∫(2π)−n/2τn/2|W1|−1/2exp[−τ2(y−W0)TW−11(y−W0)]τα−1exp(−βτ)∂τ
This becomes:
=(2π)−n/2|W1|−1/2Γ(n2+α)[(y−W0)TW−11(y−W0)2+β]−(n2+α)
(For examples of the evaluation of this marginal distribution, see )
4.0.1 log version of the marginal:
This equation in log-scale gives us:
\begin{eqnarray*} \log(\pi(\boldsymbol{y} | k_1, k_2, \mu, \alpha, \beta)) &=& -\frac{N}{2} \log(2\pi) -\frac{1}{2} \log(|\boldsymbol{\mathbf{W}}_{1}|) + \log(\Gamma(N/2 + \alpha)) \\ &-& (N/2 + \alpha)\left[ \log \Big( \beta + \frac{(\mathbf{y} - \mathbf{W}_{0})^T \mathbf{W}_{1}^{-1} (\mathbf{y} - \mathbf{W}_{0})}{2}\Big) \right] \end{eqnarray*}
And the same, when written for j = 1,\dots, b nodes of a tree, would look like:
\begin{eqnarray*} \sum_{j = 1}^{b} \log(\pi(\boldsymbol{y_{j}} | N_j, k_1, k_2, \mu, \alpha, \beta)) &=& \sum_{j = 1}^{b} -\frac{N_j}{2} \log(2\pi) + -\frac{1}{2} \log(|\boldsymbol{\mathbf{W}}_{1,j}|) + \log(\Gamma(N_j/2 + \alpha)) \\ &-& (N_j/2 + \alpha)\left[ \log \Big(\beta + \frac{(\mathbf{y}_j - \mathbf{W}_{0,j})^T \mathbf{W}_{1,j}^{-1} (\mathbf{y}_j - \mathbf{W}_{0,j})}{2} \Big) \right] \end{eqnarray*}