Categorical distribution (source code)

= Categorical distribution
{title2=$\operatorname{Cat}(p_1,\ldots,p_k)$}
{wiki}

A <categorical distribution> describes one trial with one of $k$ labelled outcomes and <probabilities> $p_1,\ldots,p_k$ summing to one. The labels need not be numbers or have an order. It is the single-trial building block of the <multinomial distribution>: $n$ <independent> draws with the same <categorical distribution> produce multinomial category counts.

For a trial choosing labels $A,B,C$ with <probabilities> $1/2,3/10,1/5$, the category-indicator <random vector> is $(1,0,0)$, $(0,1,0)$, or $(0,0,1)$. Its <expected value> is $(1/2,3/10,1/5)$; its components are dependent because exactly one is one. A numerical encoding of $A,B,C$ is a separate modelling choice: the category labels themselves do not define an <arithmetic mean>.