# Mean, Variance and Covariance of Multinomial Distribution

I'm working through the following problem:

Let $(X_1, \dots , X_k)$ be a random vector with multiomial distribution $\mathcal{M}(p_1, \dots , p_k, n)$. Determine $\mathbb{E}(X_i)$, $Var(X_i)$ and $Cov(X_i, X_j)$ with $i \neq j$ for each $1 \leq i, j \leq n$.

Given the probabilty function for the vector,

$$p(x_1, \dots , x_n) = \frac{n}{x_1! \cdot \dots \cdot x_n!}p_1^{x_1}\cdot \dots \cdot p_k^{x_k}$$

if $x_1 + \dots x_n = n$, and zero otherwise, I've tried rewriting this in such a way that I can recover the probability function for $X_i$ (is that even possible without asking for independence?), by summing on the other variables, and so I can at least calculate the mean, and then go from there. So far I've had no success. Is this the correct approach? Or is there a more elegant way to go about this?

P.D.: it may seem like I haven't tried enough. I'm fairly new to probability theory and for some reason I have a tough time gaining intuition in this subject. I've dedicated this problem some time, but I feel like I am conceptually stuck, and in need of a hint. Thanks in advance for your help.

The multinomial distribution corresponds to $n$ independent trials where each trial has result $i$ with probability $p_i$, and $X_i$ is the number of trials with result $i$. Let $Y_{ij}$ be $1$ if the result of trial $j$ is $i$, $0$ otherwise. Thus $X_i = \sum_{j} Y_{ij}$. It is easy to compute the means, variances and covariances of $Y_{ij}$ and use them to compute the means, variances and covariances of $X_i$.
Multinomial distribution function for $n$ random variables $\{x_{i}^{}\}$ is given by : $$P[\{x_{i}^{}\}]=n!\prod_{i=1}^{n}\frac{p_{i}^{x_{i}^{}}}{x_{i}^{}!},$$ with $0 \leq p_{i}^{} \leq 1$. Moment generating function for multinomial distribution is : $$\mathcal{Z}[\{\lambda_{i}^{}\}]=\mathop{\sum_{x_{1}^{}=1}^{n} \dots \sum_{x_{n}^{}=1}^{n}}_{\sum_{i}^{n}x_{i}=n}^{}n!\prod_{i=1}^{n}\frac{p_{i}^{x_{i}^{}}}{x_{i}^{}!}e^{i\lambda_{i}x_{i}^{}}_{},$$ which can be simplified using multinomial theorem as $$\mathcal{Z}[\{\lambda_{i}^{}\}]=\Big[\sum_{i=1}^{n} p_{i}^{} e^{i\lambda_{i}^{}}\Big]^{n}_{}.$$ All the moments of the random variables $\{x_{i}^{}\}$ can be obtianed as : $$\langle x_{a_1} \dots x_{a_m}\rangle = (-i)^{m}_{}\frac{\partial}{\partial \lambda_{a_1}}\dots \frac{\partial}{\partial \lambda_{a_m}} \mathcal{Z}[\{\lambda_{i}^{}\}] \Big|_{\{\lambda_{i}^{}\}=\{0\}}.$$ From which central moments can be obtained. For obtaining cumulants you have to take derivatives of $\log\mathcal{Z}[\{\lambda_{i}^{}\}]$.