Multinomial test is the statistical test of the null hypothesis that the parameters of a multinomial distribution equal specified values; it is used for categorical data. Beginning with a sample of N {\displaystyle ~N~} items each of which has been observed to fall into one of k {\displaystyle k} categories. It is possible to define x = ( x 1 , x 2 , … , x k ) {\displaystyle ~\mathbf {x} =(x_{1},x_{2},\dots ,x_{k})~} as the observed numbers of items in each cell. Hence ∑ i = 1 k x i = N . {\displaystyle ~\sum _{i=1}^{k}x_{i}=N~.} Next, defining a vector of parameters H 0 : π = ( π 1 , π 2 , … , π k ) , {\displaystyle ~H_{0}:{\boldsymbol {\pi }}=(\pi _{1},\pi _{2},\ldots ,\pi _{k})~,} where:
∑ i = 1 k π i = 1 . {\displaystyle ~\sum _{i=1}^{k}\pi _{i}=1~.}
These are the parameter values under the null hypothesis. The exact probability of the observed configuration x {\displaystyle ~\mathbf {x} ~} under the null hypothesis is given by
P ( x ) 0 = N ! ∏ i = 1 k π i x i x i ! . {\displaystyle ~\operatorname {\mathbb {P} } \left(\mathbf {x} \right)_{0}=N!\,\prod _{i=1}^{k}{\frac {\pi _{i}^{x_{i}}}{x_{i}!}}~.}
The significance probability for the test is the probability of occurrence of the data set observed, or of a data set less likely than that observed, if the null hypothesis is true. Using an exact test, this is calculated as
p [ s i g ] = ∑ y : P ( y ) ≤ P ( x ) 0 P ( y ) {\displaystyle ~p_{\mathcal {[sig]}}=\sum _{\mathbf {y} \,:\;\operatorname {\mathbb {P} } \left(\mathbf {y} \right)\,\leq \,\operatorname {\mathbb {P} } \left(\mathbf {x} \right)_{0}}\operatorname {\mathbb {P} } \left(\mathbf {y} \right)~}
where the sum ranges over all outcomes as likely as, or less likely than, that observed. In practice this becomes computationally onerous as k {\displaystyle ~k~} and N {\displaystyle ~N~} increase so it is probably only worth using exact tests for small samples. For larger samples, asymptotic approximations are accurate enough and easier to calculate. One of these approximations is the likelihood ratio. An alternative hypothesis can be defined under which each value π i {\displaystyle ~\pi _{i}~} is replaced by its maximum likelihood estimate p i = x i N . {\displaystyle ~p_{i}={\frac {\;x_{i}\,}{N}}~.} The exact probability of the observed configuration x {\displaystyle ~\mathbf {x} ~} under the alternative hypothesis is given by
… excerpt ends here. Continue reading the full article.
