Likelihood function of a hierarchical model I have the following model:
$$
y\sim\textrm{MvNormal}\left(\mu,\Sigma\right)\\
p=\textrm{logistic}\left(y\right)\\
k\sim\textrm{Binomial}\left(p,n\right)
$$
Where $\mu$ and $\Sigma$ are free parameters, and $k$ and $n$ are known. What is the likelihood or log-likelihood function of this model? I know the likelihoods of the multivariate normal and binomial distributions, but how do I combine them to find the likelihood of this hierarchical model?
If there is one, I would like to know the general method for finding likelihoods of these kinds of hierarchical models. Another model I'm interested in is: 
$$
y\sim\textrm{MvNormal}\left(\mu,\Sigma\right)\\
\lambda=\textrm{exp}\left(y\right)\\
x\sim\textrm{Poisson}\left(\lambda\right)
$$
where $x$ is known.
 A: I came across this question with something similar in mind. I hope my terminology is correct, I don't have a formal stats/math background.
For clarity I will include the index $i = 1, \dots, m$, since I find it confusing to refer to multivariate binomial and Poisson distributions. Hence we can write the first model as
$$
    k_i \sim \text{Binomial}\left(p_i, n\right) \\
    p_i = \text{logistic}(y_i) \\
    \mathbf{y} \sim N_m(\mu, \Sigma)
$$
while the joint likelihood of the data under this model is the product of the two conditional distributions
$$
  p(k|y,p,\mu,\Sigma) = p(k|p) \ p(y|\mu, \Sigma)
$$
where $p(k|y)$ is the binomial probability mass function, and $p(y|\mu, \Sigma)$ is a multivariate normal density.
Similarly, for $i = 1, \dots, m$,
$$
    x_i \sim \text{Poisson}(\lambda_i) \\
    \lambda_i = \exp(y_i) \\
    \mathbf{y} \sim N_m(\mu, \Sigma)
$$
the joint likelihood is the product of the conditional distributions
$$
p(x|y,\mu,\Sigma) = p(x|y) \ p(y|\mu, \Sigma)
$$
where $p(x|y)$ is the Poisson probability mass function, and $p(y|\mu, \Sigma)$ is a multivariate normal density.
