Artificial intelligent assistant

Constraining the sum of Gaussian random variables? Suppose I have $n$ Gaussian random variables $X_i$ with $i=1,2,...,n$, each with zero mean $\mu=0$ and the same constant standard deviation $\sigma\neq 0$. I would like to constrain the elements collectively drawn from these distributions to satisfy $$\sum_{i=1}^nX_i=0$$ How should I modify the distributions to achieve this, while maintaining zero means for each distribution separately? In the case of $n=2$ the solution is obviously to restrict $X_2$ elements to $X_2=-X_1$ and let only $X_1$ be drawn independently. But what happens in the case $n>2$? EDIT: Considering the symmetry in the definition of all $X_i$ above, let us seek a solution which preserves this symmetry and keeps all $X_i$ identically distributed.

As pointed out by d.k.o. in a comment, $X_n=-\sum_{i=1}^{n-1}X_i$ represents one such solution. However, it is not homogeneous in the treatment of each $X_i$. Turns out, this can be easily fixed by considering all possible cases

$$X_j=-\sum_{{{i=1},{i\
eq j}}}^nX_i$$

instead, and defining the new random variables $X'_j$ by superpositions of all above combinations of old ones:

$$X'_j\equiv (n-1)X_j-\sum_{{{i=1},{i\
eq j}}}^nX_i$$

This is now completely symmetric in all $X'_j$.

The explicit construction is implied as follows. To obtain a collective element $(x'_1,x'_2,...,x'_n)$ we first draw a particular collective element $(x_1,x_2,...,x_n)$ from the unrestricted distributions and then literally calculate:

$$x'_j\equiv (n-1)x_j-\sum_{{{i=1},{i\
eq j}}}^nx_i$$

for all $j$.

If needed, one could figure out the new standard deviations from this answer to a different question.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d12d4d03a095b1bfcb7cc03dbe0c429b