# What is the probability that a parameter is greater than other parameters given we know the posterior distribution

Suppose that we have have some form of compositional data $$x_i, i\in[1, n]$$ which we propose comes from a Dirichlet distribution such that $$x_i \sim \mbox{Dir}(\lambda \alpha),$$ where $$x_i=(x_1^{(i)}, x_2^{(i)}, x_3^{(i)})$$, $$\lambda>0$$, and that $$\alpha=(\alpha_1, \alpha_2, \alpha_3)$$ such that $$\sum_{i=1}^3\alpha_i=1$$. Due to the constraint on $$\alpha$$, we do not have an identifiability between $$\alpha$$ and $$\lambda$$. Therefore using MCMC we can get posterior distribution for all parameters involved. My question is, given the posterior distributions that we have for $$\alpha_1, \alpha_2, \alpha_3$$, how can we determine the probability that say $$\alpha_1$$ is greater than $$\alpha_2$$ and $$\alpha_3$$?

Given that you would be using MCMC sampling, you can simply calculate the probabilities from the samples. If you draw $$n$$ MCMC samples from the posterior distribution of $$\alpha$$, than the alpha matrix would be $$n \times 3$$, so you can calculate the probability by counting such cases and dividing by total (i.e. taking mean of booleans). In R, this translates to:
mean(alpha[1,] > alpha[2,] & alpha[1,] > alpha[3,])