# Derive Posterior Distribution from Prior Distribution

Suppose that a random vector $(X_1,...,X_k)$ has a multinomial distribution $MULT(n; p_1,...,p_k)$.

Now consider the Dirichlet prior for $(p_1,...,p_k)$:

$$g(p_1,...,p_k)=\frac{\Gamma(\beta_1+...+\beta_k)}{\Gamma(\beta_1)\times...\times\Gamma(\beta_k)}\prod_{j=1}^kp_j^{\beta_j-1}$$ where $\beta_j>0$, $\sum_{j=1}^kp_j=1$ and $\Gamma(\alpha)$ is the gamma function.

Under this prior, derive the posterior distribution of $(p_1,...,p_k)$.

I'm sorry, but I'm at a total loss here. I'm very overwhelmed by this and don't even know how to get started. Would you please point me in the right direction? Thanks.

The posterior distribution can be found by Bayes rule: the postrior pdf of $\vec p=(p_1,...,p_k)$ given one sample $\vec X=(X_1,...,X_k)$ from multinomial distribution $MULT(n; p_1,...,p_k)$ is $$f(\vec p|\vec X=\vec x) \propto g(\vec p)\cdot\mathbb P(\vec X=\vec x|\vec p)$$ Here the sign $\propto$ means ''proportional to'', and the constant in r.h.s. is chosen to make the r.h.s. a probability density function. This constant should depend on $n$, $x_1,\ldots,x_k$ and $\beta_1,\ldots,\beta_k$. $$f(\vec p|\vec X=\vec x) \propto \frac{\Gamma(\beta_1+...+\beta_k)}{\Gamma(\beta_1)\dots\Gamma(\beta_k)}\prod_{j=1}^kp_j^{\beta_j-1} \cdot \dfrac{n!}{x_1!\dots x_k!}p_1^{x_1}\dots p_k^{x_k}$$ $$\propto \prod_{j=1}^kp_j^{x_j+\beta_j-1}, \text{ where }p_j>0 \text{ and } \sum_{j=1}^k p_j=1.$$ As you can see, the posterior distribution is again Dirichlet distribution.