Suppose that we have $X_1, X_2, \ldots$ is a sequence of i.i.d random variables with $E(X_i)<+\infty$ and $N$ is a random variable taking values in $\{1,2,\ldots\}$, $N$ is independent with $X_1, X_2, \ldots$.
I know that $$E\left(\sum_{i=1}^N X_i \right) = E(N)E(X_1)$$
If I divide the sum by $N$, $$M = \frac 1N \sum_{i=1}^N X_i $$ I have sample mean of $X_1, X_2,\ldots, X_N$ but $N$ is random. In this case, what is the distribution of $M$ and how to calculate $E(M)$ and $Var(M)$. Thanks.