Multinomial distribution is an extension of the binomial distribution.
It describes outcomes in scenarios with multiple possible categories, unlike the binomial distribution, which only considers two outcomes (e.g., blood types in a population or outcomes from rolling dice).
It has three parameters:
Draw out a sample for dice roll:
from numpy import random x = random.multinomial(n=6, pvals=[1/6, 1/6, 1/6, 1/6, 1/6, 1/6]) print(x) |
Note: Multinomial samples will not yield a single value; instead, they will generate one value for each probability value (pval). |