# distinguishing two random distributions

Let $x_1,x_2,\ldots,x_n$ and $y_1,y_2,\ldots,y_n$ be uniformly, independent random variables. What can I say about the distribution of the following two variables?

$$S_1 = (x_1,x_2,\ldots,x_n,-\sum(x_i))$$

$$S_2 = (y_1,y_2,\ldots,y_n,-\sum(y_i))$$

My guess is that they have exactly the same distribution, but got stuck on how to argue for it. It would be easier without $\sum(x_i)$ and $\sum(y_i)$, since both $S_1$ and $S_2$ are made of independent identical random variables.

I denote by $U$ the support of your variables. So any variable $z$ among $x_1,x_2, \ldots ,x_n,y_1,y_2, \ldots ,y_n$ satisfies

$$P(z\in E)=\frac{\mu_1 (E \cap U)}{\mu_1 (U)},$$

for any measurable subset $E$ of $\mathbb R$, where $\mu_1$ denotes the Lebesgue measure on $\mathbb R$.

Note that $S_1$ and $S_2$ both take their values in the hyperplane $H$ defined by the equation $$t_1+t_2+t_3+ \ldots +t_n+y=0$$

The map $p : H \to {\mathbb R}^{n}, (x_1,x_2, \ldots ,x_n,y) \mapsto (x_1,x_2, \ldots ,x_n)$ is a linear isomorphism. Let $A$ be a measurable subset of ${\mathbb R}^{n+1}$. Then

$$P(S_1 \in A)=\frac{\mu_n(p(A \cap H))}{\mu_n(U^n)}=P(S_2 \in A)$$

where $\mu_n$ denotes the Lebesgue measure on ${\mathbb R}^n$. So $S_1$ and $S_2$ are identically distributed.