Every part you must know concerning the Dirichlet distribution
The Dirichlet distribution is a generalization of the beta distribution. In Bayesian statistics, it is often used because the conjugate prior to the multinomial distribution, hence it could actually be used to model the uncertainty of a random vector of probabilities. It has a big selection of applications including Bayesian evaluation, text mining, statistical genetics, and nonparametric inference. This text gives an intuitive introduction to Dirichlet distribution and shows the way it is connected to the multinomial distribution. As well as, it shows how it could actually be modeled and visualized in Python.
Definition
Suppose that the continual random variables X₁, X₂, …Xₖ (k≥2) form the random vector X defined as:
We also define the vector α as:
where
Now the random vector X is claimed to have Dirichlet distribution with parameter α if it has the next joint PDF:
The function B(α) is known as the multivariate beta function and is defined as
where Г(x) is the gamma function. If the random vector X has a Dirichlet distribution with parameter α, it’s denoted by X ~ Dir(α). The multivariate beta function is included within the joint PDF to normalize it. The joint PDF should integrate to 1 over its domain:
Hence, we have now:
Based on Equation 1, the values that the random variables X₁, X₂, …Xₖ take should meet the next conditions to have fₓ(x)>0:
These conditions define the support of the Dirichlet distribution. The support of X, and of its distribution, is the set of all x (the values that X can take) where fₓ(x)>0. If X has k elements, the support of X with a Dirichlet distribution is a k-1 dimensional simplex. A simplex is a bounded linear manifold that’s created due to the constraints of Equation 3. A simplex is the generalization of the notion of a triangle to higher dimensions. Hence, a k-1…