# How is Simplex related to statistics at all?

I was reading here about change point detection using STAN(bayesian modeling language).

In section Discrete sampling gmodena uses simplex as a data type to store probabilities of a model parameter.

From my research I understand that simplex is a type of geometrical structure, but I don't follow as to why are statisticians looking at it?

Can someone explain to me in relatively simple english why do statisticians look at this shape? What does it represent in statistics?

## 1 Answer

If you have a disjoint set of possible events (say three of them) that exhaust all possiblites, the probabilities of each of these events must sum to one:

$$p_1 + p_2 + p_3 = 1$$

Being probabilities, each of these is also bounded between zero and one:

$$0 \leq p_i \leq 1$$

If consider the three probabilities as a point in euclidean space $(p_1, p_2, p_3)$, then this equation and the probability constraints define a triangle resting snugly in the positive quadrant.

(Image credit Wikipedia)

In general, when there are more than three probabilities involved

$$p_1 + p_2 + \cdots + p_k = 1$$

then the vectors of possible probabilities will trace out a simplex (a high dimensional triangle) in the corresponding euclidean space.

Simplex is used here because modeler is assuming that there is specifically one change point in the times series, modeler wants to make sure that probabilities of change point occurring on a given day add up to 1?

Given this quote from the document

The softmax transform maps log_p to a K-simplex...

I think that is correct.

• Thanks for quick repsonse, so to put it back in terms of change point detection. Simplex is used here becasuse modeler is assuming that there is specifically one change point in the times series, modeler wants to make sure that probabilities of change point occuring on a given day add up to 1. Commented Jul 21, 2017 at 14:46
• @sgp667 Edited into answer. Commented Jul 21, 2017 at 14:49
• A completely non-maths person here. Can you please explain how this property(probability vectors tracing out a simplex) might be important or useful ? Commented Mar 28, 2019 at 6:22