DirichletDistribution
✖
DirichletDistribution
represents a Dirichlet distribution of dimension k with shape parameters αi.
Details

- DirichletDistribution is also known as multivariate beta distribution.
- The probability density for vector
in a Dirichlet distribution is proportional to
for
and
.
- DirichletDistribution allows αi to be any positive real number.
- DirichletDistribution allows αi to be a dimensionless quantity.
- DirichletDistribution can be used with such functions as Mean, CDF, and RandomVariate.
Background & Context
- DirichletDistribution[{α1,…,αk+1}] represents a continuous multivariate statistical distribution defined over k-tuples
of positive real numbers whose sum is less than one and for which
. The marginal distributions (MarginalDistribution) of DirichletDistribution[{α1,…,αk+1}] are all versions of BetaDistribution parametrized by various linear combinations of the components αi. As a result, the Dirichlet distribution is parametrized by a
-tuple (α1,…,αk+1) whose components αi are all positive real numbers that together determine the overall shape of its probability density function (PDF). The Dirichlet distribution is sometimes referred to as the multivariate beta distribution.
- The PDF of a Dirichlet distribution has an absolute maximum at its mean, i.e. at the k-vector whose components are the one-variable means of its univariate marginal PDF. The tails of each of the associated marginal PDFs corresponding to a Dirichlet distribution are "fat," in the sense that the marginal PDF decreases algebraically for large values of
rather than decreasing exponentially. (This behavior can be made quantitatively precise by analyzing the SurvivalFunction of these distributions.)
- The Dirichlet distribution is named for German mathematician Johann Dirichlet. It has been used as a tool for modeling both real-world and theoretical phenomena since its formal introduction by Thomas Ferguson in the 1970s. The Dirichlet distribution is a finite version of the more general Dirichlet process, an infinite-dimensional stochastic process that, roughly speaking, assigns a probability distribution to each of a collection of probability distributions according to a specific algorithm. Similarly, the Dirichlet distribution often occurs as a prior distribution in Bayesian statistics, including as the conjugate prior for MultinomialDistribution. One interesting application of the Dirichlet distribution is in modeling randomness among accuracies of (fair) dice manufactured over time, noting that dice manufactured more recently tend to be "fairer" because of more precise manufacturing processes. The Dirichlet distribution has also been applied to data mining, machine learning, and computer vision. More recently, the Dirichlet distribution has been used to model the frequencies of words across collections of texts.
- RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a Dirichlet distribution. Distributed[{x1,…,xk},DirichletDistribution[{α1,…,αk+1}]], written more concisely as {x1,…,xk}DirichletDistribution[{α1,…,αk+1}], can be used to assert that a k-tuple (x1,…,xk) of random variables is distributed according to a Dirichlet distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
- The probability density and cumulative distribution functions may be given using PDF[DirichletDistribution[{α1,…,αk+1}],{x1,…,xk}] and CDF[DirichletDistribution[{α1,…,αk+1}],{x1,…,xk}]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively. Moreover, Covariance can be used to compute the covariance matrix corresponding to DirichletDistribution.
- DistributionFitTest can be used to test if a given dataset is consistent with a Dirichlet distribution, EstimatedDistribution to estimate a Dirichlet parametric distribution from given data, and FindDistributionParameters to fit data to a Dirichlet distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic Dirichlet distribution, and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic Dirichlet distribution.
- TransformedDistribution can be used to represent a transformed Dirichlet distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a Dirichlet distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving Dirichlet distributions.
- DirichletDistribution is closely related to a number of other distributions. As noted previously, DirichletDistribution has close ties with BetaDistribution, in the sense that each of its marginal distributions is a beta distribution. Moreover, any one-dimensional Dirichlet distribution is a beta distribution, in the sense that the PDF of DirichletDistribution[{α1,α2}] is precisely that of BetaDistribution[α1,α2]. DirichletDistribution is also related to GammaDistribution, in the sense that the random variable
is distributed according to DirichletDistribution whenever
is the gamma-distributed random variable defined by the sum of k independently distributed gamma variates Y1,…,Yk. DirichletDistribution is the conjugate prior of MultinomialDistribution and is also related to BetaPrimeDistribution, CompoundPoissonDistribution, and MultinormalDistribution.
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Probability density function in two dimensions:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-1u74ju


https://wolfram.com/xid/0bmuk6a7o0psea8triy-d1z75u

Cumulative distribution function in two dimensions:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-sx1aea

Mean and variance in two dimensions:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-f4s5xv


https://wolfram.com/xid/0bmuk6a7o0psea8triy-d6xfm7


https://wolfram.com/xid/0bmuk6a7o0psea8triy-yzb1ai

Scope (8)Survey of the scope of standard use cases
Generate a sample of pseudorandom vectors from a bivariate Dirichlet distribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-ljmvtp
Visualize the sample using a histogram:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-2ycpd9

Distribution parameters estimation:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-oc5luj
Estimate the distribution parameters from sample data:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-t4a7qy


https://wolfram.com/xid/0bmuk6a7o0psea8triy-drlyn5


https://wolfram.com/xid/0bmuk6a7o0psea8triy-8f9y3n


https://wolfram.com/xid/0bmuk6a7o0psea8triy-1x45sw


https://wolfram.com/xid/0bmuk6a7o0psea8triy-1zadqu

Different mixed moments for a Dirichlet distribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-slatx7

https://wolfram.com/xid/0bmuk6a7o0psea8triy-2dtdhm

Closed form for a symbolic order:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-mtnuyw


https://wolfram.com/xid/0bmuk6a7o0psea8triy-s6xlj5


https://wolfram.com/xid/0bmuk6a7o0psea8triy-igch4a


https://wolfram.com/xid/0bmuk6a7o0psea8triy-oedqsj


https://wolfram.com/xid/0bmuk6a7o0psea8triy-ny3l9w


https://wolfram.com/xid/0bmuk6a7o0psea8triy-l28ifm

Univariate marginals of a Dirichlet distribution follow a BetaDistribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-dulj1k

Multivariate marginals follow a DirichletDistribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-s6veka

Applications (5)Sample problems that can be solved with this function
Show a distribution function and its histogram in the same plot:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-ig1qzy
Compare the PDF to its histogram version:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-h0i29c

https://wolfram.com/xid/0bmuk6a7o0psea8triy-ba9s1s

Compare the CDF to its histogram version:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-5806k

Simulate points on the half-plane
with mean
:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-zksto7


https://wolfram.com/xid/0bmuk6a7o0psea8triy-9y1uk


https://wolfram.com/xid/0bmuk6a7o0psea8triy-v80zz


https://wolfram.com/xid/0bmuk6a7o0psea8triy-zkk3u8

The point spread can be controlled by the third parameter:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-rjxyke

Use Dirichlet distribution to define a multivariate Pólya distribution as a parameter mixture:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-6xbnwv

https://wolfram.com/xid/0bmuk6a7o0psea8triy-fxqn5i


https://wolfram.com/xid/0bmuk6a7o0psea8triy-h9zw6b

Find the probability over a Disk for a Dirichlet distribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-3077ca

Estimate confidence interval for maximum likelihood estimates of distribution parameters:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-fr0igp

https://wolfram.com/xid/0bmuk6a7o0psea8triy-c0fwx

Apply fractional random weight bootstrap to estimate confidence interval, by repeating weighted estimation with weights sampled from a DirichletDistribution with unit parameters:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-dyp41z

https://wolfram.com/xid/0bmuk6a7o0psea8triy-lpayg0
Generate a bootstrap sample of parameter estimates:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-kdcgm
Visualize bootstrap estimates:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-fjc8se

Fit BetaDistribution to the bootstrap parameters:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-7swc


https://wolfram.com/xid/0bmuk6a7o0psea8triy-3jyny

Properties & Relations (2)Properties of the function, and connections to other functions
Equal probability contours for a Dirichlet distribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-o9k

One-dimensional Dirichlet distribution is a BetaDistribution:

https://wolfram.com/xid/0bmuk6a7o0psea8triy-8szok2


https://wolfram.com/xid/0bmuk6a7o0psea8triy-24l7m5


https://wolfram.com/xid/0bmuk6a7o0psea8triy-njcj0l

Wolfram Research (2010), DirichletDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/DirichletDistribution.html (updated 2016).
Text
Wolfram Research (2010), DirichletDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/DirichletDistribution.html (updated 2016).
Wolfram Research (2010), DirichletDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/DirichletDistribution.html (updated 2016).
CMS
Wolfram Language. 2010. "DirichletDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/DirichletDistribution.html.
Wolfram Language. 2010. "DirichletDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2016. https://reference.wolfram.com/language/ref/DirichletDistribution.html.
APA
Wolfram Language. (2010). DirichletDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DirichletDistribution.html
Wolfram Language. (2010). DirichletDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DirichletDistribution.html
BibTeX
@misc{reference.wolfram_2025_dirichletdistribution, author="Wolfram Research", title="{DirichletDistribution}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/DirichletDistribution.html}", note=[Accessed: 28-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_dirichletdistribution, organization={Wolfram Research}, title={DirichletDistribution}, year={2016}, url={https://reference.wolfram.com/language/ref/DirichletDistribution.html}, note=[Accessed: 28-May-2025
]}