5
$\begingroup$

We know that a random variable $p=(p_{1}, p_{2},..., p_{K})$ which follows a $\textit{Dirichlet}$ distribution with parameters $\textbf{a} = (a_{1}, a_{2},..., a_{K})$ has as pdf

$$f(p) = \frac{1}{B(\textbf{a})}\prod_{i=1}^{K}p_{i}^{a_{i}-1}$$

On https://en.wikipedia.org/wiki/Dirichlet_distribution there is no CDF expression for the $\textit{Dirichlet}$ distribution and here https://www.researchgate.net/post/What-is-the-CDF-of-Dirichlet-Distribution, they note that the expression of CDF is really complicated and they redirect you to Implementation of Dirichlet cdf? where they recommend using $\textit{Monte Carlo}$ approximation for the CDF.


Suppose that $K=3$, then I assume the CDF of the distribution for $\epsilon >0$ would be

$$F(\epsilon)=\mathbb{P}(p\leq \epsilon ) = \mathbb{P}(\begin{bmatrix}p_{1}\\ p_{2}\\ p_{3} \end{bmatrix} \leq \begin{bmatrix} \epsilon\\ \epsilon\\ \epsilon \end{bmatrix}) = \mathbb{P}(p_{1}\leq \epsilon, p_{2}\leq \epsilon,p_{3}\leq \epsilon)= \frac{1}{B(\textbf{a})}\int_{0}^{\epsilon}\int_{0}^{\epsilon}\int_{0}^{\epsilon}p_{1}^{a_{1}-1}p_{2}^{a_{2}-1}p_{3}^{a_{3}-1}dp_{1}dp_{2}dp_{3} $$ $$=\frac{1}{B(\textbf{a})}\frac{\epsilon^{a_{1}}}{a_{1}}\frac{\epsilon^{a_{2}}}{a_{2}}\frac{\epsilon^{a_{3}}}{a_{3}}$$

I assume I do something totally wrong, because I do not take into account that $\sum_{i=1}^{K}p_{i}=1$. If I did then we would have to calculate the integral

$$\frac{\epsilon}{B(\textbf{a})}\int_{0}^{\epsilon}\int_{0}^{\epsilon}p_{1}^{a_{1}-1}p_{2}^{a_{2}-1}(1-p_{1}-p_{2})^{a_{3}-1}dp_{1}dp_{2} $$

where I assume that this is the integral that it is very complicated to be solved. So, the only way to compute it is through numerical approximations as pointed out here Implementation of Dirichlet cdf? ?

$\endgroup$
4
  • 1
    $\begingroup$ What is the cdf of a multivariate vector? Why is it of interest? The quantity you consider as $F(\epsilon)$ is not a multvariate cdf as $\epsilon\in\mathbb R$. It should be in $\mathbb R^3$. Or more specifically in the simplex of $\mathbb R^3$. And the pdf is incorrect as well, since it supported by the simplex of $\mathbb R^3$, hence is absolutely continuous wrt Lebesgue measure on that simplex, not $\mathbb R^3$. In simpler terms, there are two integrals, not three, since $p_1+p_2+p_3=1$. $\endgroup$
    – Xi'an
    Commented Sep 15, 2021 at 12:29
  • 1
    $\begingroup$ @Xi'an follow the definition displayed on Wikipedia, that is for three random variables $X$ and $Y$ the the CDF is $F_{X,Y,Z}(x,y,z) = \mathbb{P}(X\leq x, Y\leq y, Z\leq z)$ where $F_{X,Y,Z}$ is the joint CDF. My ultimate goal is to prove the consistency of a Bayesian Model with Dirichlet prior and Multinomial Likelihood, like the question I posted here math.stackexchange.com/questions/4250131/…. It is not of direct interest the calculation of the CDF, but I want to get more familiar with the DIrichlet distribution $\endgroup$
    – Fiodor1234
    Commented Sep 15, 2021 at 12:42
  • $\begingroup$ The latter case where I rewrite the $p_{3}$ as $p_{3}=1-p_{1}-p_{2}$ then has to be the correct integration? $\endgroup$
    – Fiodor1234
    Commented Sep 15, 2021 at 12:44
  • $\begingroup$ @Xi'an So, they have to be different because if they are all equal, I assume that we integrate on a region that is outside of the simplex? $\endgroup$
    – Fiodor1234
    Commented Sep 15, 2021 at 14:05

1 Answer 1

7
$\begingroup$

The Dirichlet distribution is either defined on the simplex of $\mathbb R^k$, $$\mathcal S_{k-1}=\big\{\mathbf x;\ x_i\in (0,1),~i=1,2,\ldots,k,~\sum_{i=1}^k x_i=1\big\}$$ in which case the density $$f(\mathbf x) = \frac{1}{B(\textbf{a})}\prod_{i=1}^{k}x_{i}^{a_{i}-1}$$ is with respect to the Lebesgue distribution over that simplex, or defined in $\mathbb R^{k-1}$, in which case the density $$f(\mathbf x) = \frac{1}{B(\textbf{a})}\prod_{i=1}^{k-1}x_{i}^{a_{i}-1}(1-x_1-\cdots-x_{k-1})^{a_k-1}$$ is with respect to the Lebesgue distribution over $\mathbb R^{k-1}$. The later is Wikipedia's definition albeit poorly written since written as a function of $k$ terms.

A particular instance of the later is the family of Beta distributions, which illustrates why it is not feasible to derive an closed form cdf, except for small integer values of the parameters $a_i$: $$\mathbb P_{\alpha,\beta}(X\le \epsilon)=\dfrac{B(\epsilon;\alpha,\beta)}{B(\alpha,\beta)}\quad0\le\epsilon\le 1$$ where $B(\epsilon;\alpha,\beta)$ is the so-called incomplete Beta function (and an acknowledgement of the absence of closed form!).

Both representations obviously lead to the same distribution, but writing events such as $\mathbb P(\mathbf X\in A)$ will depend on which representation is used for $A$, i.e., either $A\subset\mathcal S_{k-1}$ or $A\subset\mathbb R^{k-1}$. In the former case, $$\mathbb P(\mathbf X\in A)=\int_A \frac{1}{B(\textbf{a})}\prod_{i=1}^{k}x_{i}^{a_{i}-1}\,\text d\lambda_{\mathcal S_{k-1}}(\mathbf x)$$ and in the later $$\mathbb P(\mathbf X\in A)=\int_A \frac{1}{B(\textbf{a})}\prod_{i=1}^{k-1}x_{i}^{a_{i}-1}(1-x_1-\cdots-x_{k-1})^{a_k-1} \,\text dx_1\cdots\,\text dx_{k-1}$$

$\endgroup$
1
  • 1
    $\begingroup$ I see, so the problem was that I wasn't defining properly the densities and that the event that I was trying to calculate the probability wasn't restricted to the simples defined by either of the approaches $\endgroup$
    – Fiodor1234
    Commented Sep 15, 2021 at 14:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.