CalcWorldHub
Free online calculator · no signup

Dirichlet categorical posterior probabilities calculator

Update a vector of category probabilities from multinomial counts and a Dirichlet prior, retaining uncertainty for every category.

4,000 tools
Dirichlet categorical posterior probabilities calculator — Observed category counts, Prior category concentrations and calculation method
Dirichlet categorical posterior probabilities calculator: inputs and calculation method.

How to use this calculator

Update a vector of category probabilities from multinomial counts and a Dirichlet prior, retaining uncertainty for every category.

  1. Enter Observed category counts, Prior category concentrations. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Dirichlet categorical posterior probabilities explained

Update a vector of category probabilities from multinomial counts and a Dirichlet prior, retaining uncertainty for every category.

First category posterior probability0.52
First category posterior probability: 0.52 in the worked scenario.

How the calculation works

αj′=αj+cj; A=Σαj′; E(pj)=αj′/A; Var(pj)=αj′(A−αj′)/[A²(A+1)].

Match each observed count to its prior concentration in the same category order. Posterior means also give the one-observation posterior predictive probabilities. Marginal variances summarize each component separately; the components remain dependent because they sum to one.

Set up the calculation

c — Observed category counts
Whole observed counts in a fixed order of exhaustive, mutually exclusive categories. Use comma-separated values in the stated order.
a — Prior category concentrations
One positive prior concentration for each category, aligned with the observed count list. These are not prior percentages. Use comma-separated values in the stated order.

Limits of this model

2–50 exhaustive, mutually exclusive categories and positive prior concentrations. Counts are whole observations. Marginal variances are not independent uncertainty estimates and no simultaneous credible region is supplied.

Check this example

Observed category counts = 12,7,3; Prior category concentrations = 1,1,1.

  • First category posterior probability: 0.52
  • Posterior category probabilities: 0.52, 0.32, 0.16
  • Posterior total concentration: 25
  • Marginal posterior variances: 0.0096, 0.0083692308, 0.0051692308

Counts 12, 7, and 3 combine with a uniform concentration vector of one each to give concentrations 13, 8, and 4, totaling twenty-five.

Reading the outputs

The vector result stays in the entered category order. The first scalar highlights category one for convenience; it does not imply that category has special statistical status.

Frequently asked questions

Is concentration one the same as a 1% prior?

No. Concentrations are distribution parameters, not percentages.

Can categories overlap?

No. A single multinomial trial belongs to one category.

How does this relate to beta updating?

For two categories, a Dirichlet reduces to a beta distribution for either component.

How do I use the Dirichlet categorical posterior probabilities calculator?

Enter Observed category counts, Prior category concentrations. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Dirichlet categorical posterior probabilities?

Observed category counts = 12,7,3; Prior category concentrations = 1,1,1. First category posterior probability: 0.52 Posterior category probabilities: 0.52, 0.32, 0.16 Posterior total concentration: 25 Marginal posterior variances: 0.0096, 0.0083692308, 0.0051692308 Counts 12, 7, and 3 combine with a uniform concentration vector of one each to give concentrations 13, 8, and 4, totaling twenty-five.