Dirichlet Distribution Generator & Visualizer

Generate probability vectors (each component ≥0 and the total sums to 1), then visualize marginals and simplex plots.

Everything runs in your browser; nothing is uploaded. Share URLs contain settings only (no generated samples).

Secure mode uses CSPRNG. Seeded mode is for reproducibility, not secrecy.

Other languages: ja | en

What is a Dirichlet distribution?

A Dirichlet distribution is a distribution over probability vectors (x1,…,xK) where each component is non‑negative and the total sums to 1. This space is called a simplex.

Common use cases: Bayesian priors for categorical probabilities, topic proportions, mixture weights, and probability‑like test data. You don’t need to enter personal information to use it.

Presets

Pick a practical preset (it regenerates instantly; you can tweak after applying).

Tip: For large K, use profile JSON for sharing instead of long URLs.

Generator

Choose a parameterization, generate samples, then inspect means, marginals, and diagnostics.

All components use α_i = α. Good starting point to see “corner vs center”.

Show components (marginals)

Up to 5 components are used for marginal histograms. (For large K, the checkbox list is hidden — use the index input.)

Per-component stats

Component Theory mean Sample mean Theory var Sample var

Samples preview (first 20)

Profile JSON (save/restore settings)

Share URLs contain settings only. For large K, use profile JSON to save/restore without long URLs.

Tip: Don’t include confidential labels (customer names, etc.) in shared profiles.

FAQ

Why do components negatively correlate?
Because the components must sum to 1, increasing one component tends to decrease others. The theoretical covariance is negative for i≠j.
Why do samples stick to corners?
If any α_i<1 or α0 is small, the density can spike near simplex boundaries, creating sparse, corner-heavy vectors.
Does rounding affect Σ=1?
Yes. Rounding for export can make rows no longer sum to 1. Preview rounding is safe because it does not change the underlying samples.
Is seeded RNG secure?
No. Seeded mode is for reproducibility only. Use Secure (CSPRNG) for security-sensitive randomness.