# What would be the alternative to the Dirichlet distribution but parametrized by mean and variance?

Let's assume that I have some measurements about the total mass of certain compound. These measurements are very accurate so let's assume that the mass is just 1 (unit) in each case. Then I know that the compound consists of some $s$ fractions $x_i, i=1,...,s$ that have been measured with some error. Naturally $\sum_{i=1}^s x_i = 1$ and $x_i \geq 0$. I'm just given what are the (estimated) mean and variance of each $x_i$. No information about the correlation is provided. Also, sometimes the mean and variance may be more like "educated guesses".

Anyway, I would like to model the predictive uncertainty in these fractions so that it is taken into account in a Bayesian predictive posterior of a certain model with parameters estimated using MCMC. In addition to parameter uncertainty I want to take into account the uncertainty in these fractions (as input for the model). This Bayesian stuff is very familiar to me but I was wondering how could the uncertainty in the fractions be modeled.

The first idea was Dirichlet distribution as it is defined in the simplex given by the constraints above but if I fix the means then there is essentially just one parameter left for setting the variances so that they would match well with the given values. Also I can't really control the correlations (though such information is not available to me). Then there are also Generalized Dirichlet distribution and multivariate logistic normal distribution but they don't seem to have analytical solutions for the first two moments or it's not easy to generate random samples from them. The current "quick and dirty" solution is based on Gaussian distribution but the fractions can sometimes become negative that causes problems.

So my question is that is there some other more or less common distribution that could be used to model this uncertainty (at least at some rough scale so that the given means and variances approximately match and some sensible correlation structure exists)?

• Mixtures of Dirichlet keep the simplicity but extend the versatility. – Xi'an Jun 26 '15 at 9:35
• Yes, that might work! However, it is not obvious to me how many mixture components I should choose and I have to check what kind of formulas it leads if I try to match the moments and how I deal with the correlation structure. I will try this as soon as I get some other work out of the way. Thanks! – MarkoJ Jun 26 '15 at 10:29
• seems that the Dirichlet mixture distribution indeed leads to some ambiguities and difficulties in my case (how many components to choose, how to choose the weights, can the distibution be multimodal yet have approximately the required means and variances etc.) and tricky formulas so maybe there is some better approach... – MarkoJ Jul 1 '15 at 8:43

So to model the positive random values that must sum to one I consider the probability distribution $$x_i = e^{z_i}/\sum_{j=1}^s e^{z_j},\quad i = 1,...,s$$ where $z_j \sim N(m_j,\sigma_j^2)$ indepently. Now the fractions are clearly positive and sum to 1. The parameters $m_j,\sigma_j^2$ can be fitted as described in the paper in the blog post, however I just fixed the first parameter to zero due to the unidentifiability problem and used simulated method of moment approach to fit the rest (I generate many realizations of $z_j$ beforehand and construct a least squares type fitness function for the given and simulated moments that I minimize using an optimization algorithm and finite differences). This procedure seems work fine in our case where $s$ is either 4 or 5 and the input information (the given means and variances) is somewhat uncertain anyway. In some rare cases some of the fractions can end up being highly correlated which maybe against what one wishes. Also if one of the fractions is certainly known to be zero is should be eliminated from the fitting procedure to avoid some issues.