Categorical distribution Created 2026-09-24 Updated 2026-10-14
A categorical distribution describes one trial with one of labelled outcomes and probabilities summing to one. The labels need not be numbers or have an order. It is the single-trial building block of the multinomial distribution: independent draws with the same categorical distribution produce multinomial category counts.
For a trial choosing labels with probabilities , the category-indicator random vector is , , or . Its expected value is ; its components are dependent because exactly one is one. A numerical encoding of is a separate modelling choice: the category labels themselves do not define an arithmetic mean.
Suppose two independent random variables have the same categorical distribution, with label probabilities . The disjoint equal-label events give
For the original chosen probabilities , this is , rather than the uniform four-label value . The Cauchy-Schwarz inequality gives , so uniform probabilities minimize this two-draw collision probability. This pair formula alone does not supply the entire group collision probability for a nonuniform model.
The WinBUGS model uses a finite truncation of the reciprocal prior. The numbered lines have the following roles:
Combining that categorical distribution observation likelihood with the truncated reciprocal prior produces
The Markov chain Monte Carlo output approximates this posterior. The actual PDF separates the observation line from the preceding comment; it must remain an active stochastic statement.
Bayes' theorem turns the categorical distribution prior probabilities and the component multivariate normal densities into
These probabilities define the label update in the Gibbs sampler.