How this calculation works
A multinomial model describes a fixed number of independent trials whose outcomes belong to mutually exclusive, exhaustive categories. The entered counts specify one complete count vector, not one particular chronological sequence. The multinomial coefficient counts all sequences that produce those totals; category-probability powers supply the probability of each sequence. This calculator evaluates the mass through log-gamma arithmetic to avoid constructing enormous factorials directly.
P(C=c) = n! ∏p_i^c_i / ∏c_i!, where n=Σc_i.A worked example
For four trials with probabilities 0.5,0.25,0.25 and counts 2,1,1, the arrangement count is 4!/(2!1!1!) = 12. Each such sequence has probability 0.5²×0.25×0.25 = 1/64. Multiplying gives the joint count-vector probability 12/64 = 0.1875. This differs from the probability of one named order, which would be only 1/64.
Good to know
Supports 1–20 categories and total count at most 1,000,000. Counts must be whole and nonnegative. Probabilities must align, lie between zero and one and sum to one within 10⁻¹²; no automatic normalization is applied. Trials require the same probability vector and independence. Extremely small positive probabilities may underflow numerically, so the natural log probability is also returned.
Reference: SciPy — multinomial distribution and probability mass (opens in a new tab) ↗
A vector of totals includes many chronological sequences
The coefficient depends on repeated category counts. If every outcome belongs to the first category, there is only one sequence consistent with that vector. With two occurrences of one category and one each of two others, twelve sequences share the same counts. The existing multinomial-arrangements calculator reports this combinatorial count alone; this page includes the fixed category probabilities to answer a different probability question.
A zero count contributes no logarithmic probability term. In particular, zero observations from a zero-probability category do not make an otherwise possible event impossible. A positive count in such a category does make the vector impossible and is reported explicitly with probability zero and log probability minus infinity. That exact impossibility is distinguished from a positive mass too tiny for floating-point representation.
The Dirichlet posterior predictive calculator for categorical counts integrates uncertainty in the category probability vector, while this multinomial page treats the entered probabilities as fixed.
The categories and trial model must match the experiment
Category probabilities describe all possible outcomes of a trial. Omitting an other category while keeping its probability outside the list makes the supplied vector incomplete. Conversely, overlapping categories can count one outcome twice. The sum-to-one check catches a numerical inconsistency, but it cannot determine whether your definitions really are mutually exclusive and exhaustive. Establish those definitions before entering the counts.
The total count is the implied number of trials; no separate sample-size field can contradict it. Sampling without replacement from a small finite population generally needs a different model because trial probabilities change. If category probabilities are unknown and inferred from previous counts, the Dirichlet posterior-predictive page can integrate that uncertainty. Plugging estimated probabilities into this fixed-probability mass does not create the same Bayesian joint prediction.
A few questions, answered
Does this return a goodness-of-fit p-value?
No. It returns the mass of one specified count vector. A test p-value requires an explicit statistic and a set of outcomes considered at least as extreme.
Are counts allowed to sum to zero?
Yes. The empty trial sequence has all-zero counts and probability one, provided the category probabilities themselves form a valid vector.