# Statistical model for quantities that add up to 1

I want to create a model for quantities $$z$$ that live in a probability simplex, that is, they are nonnegative and always add up to 1:

$$S = \left\{z \in \mathbb{R}^{k} : z_1 + \dots + z_{k} = 1, z_i \ge 0 \text{ for } i = 1, \dots, k \right\},$$ where $$k$$ is relatively small, let's say $$k \leq 5$$.

Additionally, I know these values come from a black box process where I only know some details about it, e.g. an input array of the form: $$(x_1, \ldots, x_k)$$ with additional features $$(\theta_1, \ldots, \theta_k)$$ where again, $$(x_1, \ldots, x_k)$$ are nonnegative and add up to one (notice it's also of dimension $$k$$).

For modelling purposes let's assume we got samples of all these arrays ($$x$$, $$z$$ and $$\theta$$) as time series (always all values measured at the same time), and additionally we know that:

1. There's a dependence of the $$z$$ array from the $$x$$'s and $$\theta$$'s, but with a lag, that is, $$z_t$$ depends on the previous time values of $$x$$ and $$\theta$$. This lag is not constant over time but it can't grow indefinitely either, let's say it's a maximum of $$N$$ previous timestamps where $$N$$ < 10

2. The $$z$$ and $$x$$ quantities are relative rates, not really probabilities

3. The output $$z$$ is somehow a mixture of the input $$x$$ of previous timestamps, e.g. $$z_i^T$$ will depend strongly on the respective $$x_i^{t}$$ for recent values $$T-N \leq t \leq T-1$$, and their associated parameters inside $$\theta_i^{t}$$ (that correspond to the $$i$$t-h quantity). But it won't be necessarily inside their convex combination, i.e. it could happen that the $$z_i^{T}$$ lies outside the minimum and maximum values of the recent $$x_i^{t}$$ values

I think that taking ideas from the following fields can be useful:

1. Graphical models - with $$k$$ (or $$k-1$$) output nodes
2. Neural networks - use a multilayer perceptron using an idea similar to the softmax activation function
3. Generalized additive models (create something similar to the multinomial logit model but with a response variable that isn't a classification response but probabilities)
4. Multivariate time series - but I'm not familiar with ways to impose the bounds that the series are between 0 and 1 and also the add-up-to-1 condition into the modelling framework

And I wonder if there's already some literature or known model for this kind of processes (nonnegative continuous variables that add up to a fixed quantity), but my search hasn't brought results yet. Do you have any pointers to relevant modelling approaches?

• Have you come across compositional data analysis? Oct 11, 2021 at 23:45
• As @awhug, your response data is on a simplex. Oct 11, 2021 at 23:55
• Hi @awhug thanks for the suggestion, yes, had found that same wikipedia article earlier and it looked promising. I see there are several R and Python libraries, will dig further into that field Oct 11, 2021 at 23:56
• Dirichlet Regression? Oct 12, 2021 at 0:18