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 | es | fr

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.

How to use this tool effectively

This guide helps you use Dirichlet Distribution Generator & Visualizer in a repeatable way: define a baseline, change one variable at a time, and interpret outputs with explicit assumptions before you share or act on results.

How it works

The page applies deterministic logic to your inputs and shows rounded output for readability. Treat it as a comparison workflow: run one baseline case, adjust a single parameter, and measure both absolute and percentage deltas. If a result seems off, verify units, time basis, and sign conventions before drawing conclusions. This approach keeps your analysis reproducible across teammates and sessions.

When to use

Use this page when you need a fast estimate, a classroom check, or a practical what-if comparison. It works best for planning and prioritization steps where you need direction and magnitude quickly before investing in deeper modeling, manual spreadsheets, or formal external review.

Common mistakes to avoid

Interpretation and worked example

Run a baseline scenario and keep that result visible. Next, modify one assumption to reflect your realistic alternative and compare direction plus size of change. If the direction matches your domain expectation and the size is plausible, your setup is usually coherent. If not, check hidden defaults, boundary conditions, and interpretation notes before deciding which scenario to adopt.

See also

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.
What should I do first on this page?

Start with the minimum required inputs or the first action shown near the primary button. Keep optional settings at defaults for a baseline run, then change one setting at a time so you can explain what caused each output change.

How to use Dirichlet Distribution Generator & Visualizer effectively

How this tool helps

Tools are designed for quick scenario comparisons. They work best when you keep one question per run, define success criteria first, and avoid switching objectives mid-stream. This reduces decision noise and produces results you can defend in follow-up review.

Input validation checklist

Before running, verify that required values are in the right format, that optional flags are intentionally set, and that baseline assumptions reflect current conditions. Invalid assumptions are often mistaken for tool bugs, so validation is part of interpretation quality.

Scenario planning pattern

Build three rows: conservative, expected, and aggressive cases. Keep data sources transparent for each case and compare output spacing. The pattern helps you spot non-linear jumps and decide whether a model is stable under plausible variation.

When to revisit inputs

Revisit inputs when input scale changes, time window shifts, or downstream decisions add new constraints. If constraints change, your previous output remains a useful reference but should not be treated as final guidance.