dirichlet¶
Syntax¶
Parameters¶
alphas- a list expression of shape parameters
Returns¶
Returns a list of random values from the constructed Dirichlet distribution with the given shape parameters.
Description¶
A Dirichlet-distributed random variable can be seen as a multivariate generalization of a Beta distribution. The probability density function (PDF) for the Dirichlet distribution is given by:
\[ f(x_1, x_2, \ldots, x_k; \alpha_1, \alpha_2, \ldots, \alpha_k) = \frac{1}{B(\alpha)} \prod_{i=1}^k x_i^{\alpha_i - 1} \]
where \( B(\alpha) \) is the multivariate beta function:
\[ B(\alpha) = \frac{\prod_{i=1}^k \Gamma(\alpha_i)}{\Gamma\left(\sum_{i=1}^k \alpha_i\right)} \]