multinomial

multinomial(A)

Try it yourself:


Count grouped arrangements with multinomial

multinomial counts arrangements of items divided into several labelled groups. It generalizes binomial coefficients: for group sizes n₁, n₂, and so on, the count is total factorial divided by each group factorial.

Example

It counts distinct arrangements of repeated letters or ways to assign distinguishable items to fixed group sizes. Compare combinations for one selected group and composition for distributions of identical items. factorial defines the underlying formula.

Caveats

Group sizes should be non-negative integers. They must add to the stated total when a total is supplied. Results grow fast, so retain exact arithmetic where possible and use lgamma for stable log-scale probability calculations.

Try Multinomial in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions