Multinomial Distribution |
---|
A random variables X1, X2, ...,
Xn have a multinomial distribution and it is referred to as a multinomial random variable if and only if their joint probability distribution is given by
R has two dedicated commands to generate multinomially distributed random number vectors and compute multinomial probabilities.
\[
M({\bf x}; {\bf p}, n ) = \Pr \left[ X_1 = x_1 , \ldots , X_m = x_m \right] =
\binom{n}{x_1, x_2 , \ldots , x_m} p_1^{x_1} p_2^{x_2} \cdots p_m^{x_m} ,
\]
where M(x; p, n) = M(x1, x2,
..., xm; p1, p2, ... ,
pm; n) with xi ∈ [0..n],
\( n= \sum_{i=1}^m x_i , \quad \sum_{i=1}^m p_i =1 . \)
size
and prob
:
- rmultinom(n, size, prob)
- multinom(x, size = NULL, prob, log = FALSE)