Categorical Distribution#

Univariate, Discrete, Bounded

The Categorical distribution is the most general discrete distribution and is parameterized by a vector \(p\) where each element \(p_i\) specifies the probabilities of each possible outcome.

Key properties and parameters#

Support

\(x \in \{0, 1, \ldots, |p|-1\}\)

Parameters:

  • \(p\) : (array) Probabilities of each category, \(p_i \geq 0\) and \(\sum_i p_i = 1\).

Probability Density Function (PDF)#

\[ f(x) = p_x \]
Categorical Distribution PDF

Cumulative Distribution Function (CDF)#

\[\begin{split} F(x \mid p) = \begin{cases} 0 & \text{if } x < 0 \\ \sum_{i=0}^{x} p_i & \text{if } 0 \leq x < |p| \\ 1 & \text{if } x \geq |p| \end{cases} \end{split}\]

where \(p\) is the array of probabilities for each category.

Categorical Distribution CDF

See also

Related Distributions:

  • Bernoulli - The Categorical distribution is a generalization of the Bernoulli distribution to more than two outcomes.

  • Discrete Uniform - A special case of the Categorical distribution where all outcomes have equal probability.

References#