Sum modulo a prime

99 Views Asked by At

Simple question to which I expect a not so simple solution/proof.

Let $p$ be a prime and choose n numbers randomly from $\mathbb{Z}/p\mathbb{Z}$ using the uniform distribution. What is the probability that the sum of the $n$ elements is $0\pmod{p}$?

2

There are 2 best solutions below

3
On BEST ANSWER

Do an induction on $n$. If for $n=k$ the sum of two randomly chosen elements of $\mathbb{Z}_p$ is equally likely to be congruent to one of $0,1,\dots,p-1$ modulo $p$, then whatever be the $(k+1)$-th element chosen, the sum is equally likely to be congruent to one of $0,1,\dots, p-1$ modulo $p$.

0
On

$\frac{1}{p} $. In general, the probability distribution of sum of elements is convolution, $P=P_{1}*P_{2}*...*P_{n}$ and for convolution of two or more uniforms $U*U=U$, $U*U*U=U$ et.c.