20

More specifically, I want to prove or disprove the followings:

Let $X_1,\dots,X_n$ are $n$ i.i.d. random variables that its support is on integers (You can regard it as supporting on $\{1,2,\dots,n\}$. Is it always true that the probability of $X_1+\dots+X_n$ is a multiple of $n$ is always at least $\frac{1}{2^{n-1}}$?

This is a question that had came to my mind yesterday, which is $n=2$ case.

The proof of $n=2$ case is simple. Let $p$ be the probability of $X$ is odd, and $q$ is $X$ is even. Then $X_1+X_2$ is even has probability $p^2+q^2\ge\frac 12(p+q)^2=\frac 12$.

Then I found that I may be able to generalize this problem. I tried to prove $n=3$ case, and it is not hard: for $n=3$, it suffices to prove for any non-negative numbers $a,b,c$ with $a+b+c=1$, $a^3+b^3+c^3+6abc\ge \frac 14$. This can be done by noticing the Schur's inequality $a^3+b^3+c^3+3abc\ge a^2b+b^2c+c^2a+ab^2+bc^2+ca^2$, which yields

\begin{align*} & a^3+b^3+c^3+6abc\\ = & \frac 14(a^3+b^3+c^3)+\frac {15}4 abc+\frac{3}{4}(a^3+b^3+c^3+3abc)\\ \ge & \frac 14(a^3+b^3+c^3)+\frac {15}4 abc+\frac{3}{4}(a^2b+b^2c+c^2a+ab^2+bc^2+ca^2)\\ =&\frac 14(a+b+c)^3+\frac 94 abc\ge\frac 14(a+b+c)^3=\frac 14 \end{align*}

Now for $n=4$ things gets nontrivial: we need to prove that for $a+b+c+d=1$ we have $$a^4+b^4+c^4+d^4+12ac(b^2+d^2)+12bd(a^2+c^2)+6(a^2c^2+b^2d^2)\ge\frac 18$$

Which... is only verified true by MMA.

Please be noted that: The value $1/2^{n-1}$ can be achieved. It is achieved when $X$ is only distributed on two numbers $x,y$ with one half probability each, and $y-x$ is coprime with $n$.

I previously tried to argue it by using complex numbers, but failed... I am even not sure whether it is true, and any help are appreciated!

JetfiRex
  • 3,315
  • 2
    You're correct that if this lower bound is correct, it's sharp. For concreteness let $X$ be 1 or 2 with probability 1/2 each. Then the only multiples of $n$ that $X_1 + \ldots + X_n$ can be are $n$ and $2n$, each with probability $1/2^{n-1}$. – Michael Lugo Aug 28 '24 at 19:38

3 Answers3

8

$\newcommand{\ZpZ}{\mathbb{Z} / p \mathbb{Z}}$ $\newcommand{\ZnZ}{\mathbb{Z} / n \mathbb{Z}}$ I think the statement in the question is true.

Proposition. Let $X, X_1, \cdots, X_n$ be i.i.d random variables that take value $\ZnZ$. Then the probability that $X_1 + \cdots + X_n$ is congruent to $0$ modulo $n$ is at least $2^{-n+1}$.

Since the approaches are mostly orthogonal, I'll write two answers. The first answer proves the statement when $n$ is prime, and the second answer uses the first answer to prove the statement for all $n$.

In this answer, we consider the case where $n = p$ be a prime. The general idea is to decompose the random variables and reduce the problem to a "two-point inequality" (Lemma 2).

Lemma 1. If $a_1, \cdots, a_{p - 1}$ are members of $ \ZpZ$ that are non-zero modulo $p$ and $a$ is any element of $\ZpZ$, then there exists some $S \subset \{1,2,\cdots, p - 1\}$ such that $\sum_{i \in S} a_i$ is congruent to $a$ modulo $p$.

Proof: Let $S_i$ be the set of elements in $\ZpZ$ that can be represented as a subset sum of $a_1, \cdots, a_k$. Then $S_{i + 1} = S_i + \{0, a_{i + 1}\}$. By the Cauchy-Davenport inequality, $|S_{i + 1}| \geq \min(|S_i| + 1, p)$. As $|S_0| = 2$, we have $|S_{p - 1}| = p$ as desired. QED.

From Lemma 1, we can easily obtain

Lemma 2. Let $X_1, \cdots, X_p$ be independent random variables that take two distinct values in $\ZpZ$ with equal probability. Then for any $a$, the probability that $X_1 + \cdots + X_p$ is congruent to $a$ modulo $p$ is at least $2^{-p+1}$.

Proof: By Lemma 1, there are at least two distinct realizations of $(X_1, \cdots, X_p)$ such that $X_1 + \cdots + X_p$ is congruent to $a$ modulo $p$, and each realization happens with probability equal to $2^{-p}$. QED.

The idea now is to decompose the random variables and reduce to the scenario in Lemma 2.

Lemma 3. Let $X$ be a random variable taking value in a finite set $S$, such that $\mathbb{P}(X = a) \leq 1/2$ for any $a \in S$. Then there exists an integer-valued random variable $Z$, and $S$-valued random variables $Y_1, Y_2, \cdots$ independent of $Z$ and each taking two distinct values in $S$ with equal probability, such that $X$ is equi-distributed as $Y_Z$.

Proof: This follows from the following fact: The convex hull of vectors in $\{0, 1\}^k$ with exactly two coordinates equal to $1$ is equal to $$\{(p_1, \cdots, p_k) \in \mathbb{R}_{\geq 0}^k: p_i \leq \frac{1}{2}(p_1 + \cdots + p_k), \forall i\}.$$ One can prove this fact by assuming the contrary and trying to find a separating hyperplane. QED.

Lemma 4. Let $X, X_1, \cdots, X_p$ be i.i.d random variables that take value $\ZpZ$, such that $\mathbb{P}(X_i = a) \leq 1/2$ for any $a \in \ZpZ$. Then for any $a \in \ZpZ$, the probability that $X_1 + \cdots + X_p$ is congruent to $a$ modulo $p$ is at least $2^{-p+1}$.

Proof: Take $Y_i$ and $Z$ as in Lemma 3, and let $Y^j_{i}$ and $Z^j$ be independent copies of $Y_i$ and $Z$. Then the sum $X_1 + \cdots + X_p$ is equi-distributed as $$Y^1_{Z^1} + \cdots + Y^p_{Z^p}.$$ Conditioned on any realization of $(Z^1, \cdots, Z^p)$, Lemma 2 tells us that $Y^1_{Z^1} + \cdots + Y^p_{Z^p}$ is congruent to $a$ modulo $p$ with probability at least $2^{-p+1}$. So $Y^1_{Z^1} + \cdots + Y^p_{Z^p}$ is congruent to $a$ modulo $p$ with probability at least $2^{-p+1}$. QED.

This deals with the case where $\mathbb{P}(X_i = a) \leq 1/2$ for any $a \in \ZpZ$. Now let's deal with the other case! The idea is similar: we reduce to a two-point inequality. We say a variable on $\ZpZ$ is close to zero if it assumes at most two distinct values, and assumes value $0$ with probability at least $\frac{1}{2}$

Lemma 5. Let $X_1, \cdots, X_p$ be independent random variables that are close to zero. Then the probability that $X_1 + \cdots + X_p$ is congruent to $0$ modulo $p$ is at least $2^{-p+1}$.

Proof: Let $q_i = \mathbb{P}(X_i = 0)$. If one variable is always zero, say $X_1 \equiv 0$, then $$\mathbb{P}(X_1 + \cdots + X_p = 0) \geq \prod_{i = 1}^p \mathbb{P}(X_i = 0 ) \geq 1 \cdot (1/2) \cdots (1/2) \cdots (1/2) = 2^{-p+1}.$$ Otherwise, by Lemma 1, there are at least two distinct realizations of $(X_1, \cdots, X_p)$ such that $X_1 + \cdots + X_p$ is congruent to $0$ modulo $p$. One of them is the all zero realization, which happens with probability $q_1 \cdots q_p$. The other realization must happen with probability at least $$(1 - q_1) \cdots (1 - q_p).$$ Thus, the probability that $X_1 + \cdots + X_p$ is congruent to $0$ modulo $p$ is at least $$q_1 \cdots q_p + (1 - q_1) \cdots (1 - q_p) \geq 2^{-p+1}.$$

Lemma 6: Let $X$ be a random variable taking value in a finite set $\ZpZ$, such that $\mathbb{P}(X = 0) \geq 1/2$. Then there exists an integer-valued random variable $Z$, and $\ZpZ$-valued random variables $Y_1, Y_2, \cdots$ independent of $Z$ each close to zero, such that $X$ is equidistributed as $Y_Z$.

Proof: Let $q_i = \mathbb{P}(X = i)$. For $1 \leq i \leq p - 1$, let $Z$ take value $i$ with probability $q_i / (1 - q_0)$, and let $Y_i$ take value $0, i$ with probability $q_0, (1 - q_0)$ respectively. QED.

Lemma 7. Let $X, X_1, \cdots, X_p$ be i.i.d random variables that take value $\ZpZ$, such that $\mathbb{P}(X_i = a) \geq 1/2$ for some $a \in \ZpZ$. Then the probability that $X_1 + \cdots + X_p$ is congruent to $0$ modulo $p$ is at least $2^{-p+1}$.

Proof: Without loss of generality, assume $a = 0$. Take $Y_i$ and $Z$ as in Lemma 6, and let $Y^j_{i}$ and $Z^j$ be independent copies of $Y_i$ and $Z$. Then the sum $X_1 + \cdots + X_p$ is equi-distributed as $$Y^1_{Z^1} + \cdots + Y^p_{Z^p}.$$ Conditioned on any realization of $(Z^1, \cdots, Z^p)$, Lemma 5 tells us that $Y^1_{Z^1} + \cdots + Y^p_{Z^p}$ is congruent to $0$ modulo $p$ with probability at least $2^{-p+1}$. So $Y^1_{Z^1} + \cdots + Y^p_{Z^p}$ is congruent to $0$ modulo $p$ with probability at least $2^{-p+1}$. QED.

Combining Lemma 4 and Lemma 7, we obtain the desired result.

Proposition. Let $p$ be a prime. Let $X, X_1, \cdots, X_p$ be i.i.d random variables that take value $\ZpZ$. Then the probability that $X_1 + \cdots + X_p$ is congruent to $0$ modulo $p$ is at least $2^{-p+1}$.

abacaba
  • 11,210
  • 1
    Such a neat solution, I really appreciate this! Would you like to share how you think of this solution? More specifically, how do you come up with the approach that transform this problem into a NT-ish problem (So you split the case of surprise and composite numbers?) And even if you are dealing with prime numbers, How did you come up with the dealing method that made arguments about the independent random variables that only support on two numbers? Previously, I think the final solution will be some ineqality-ish thing as $n=3$ case above... – JetfiRex Aug 29 '24 at 05:35
  • 1
    Also the transformations reducing to two point case is totally amazing! The first one (lemma 3).is quite straightforward, but could I humbly ask you for lemma 5&6 how did you come up with the idea of this form of two numbers distribution And this kind of reduction...? Because after I have reading the first part, I am thinking about splitting the rest of the case with equal probabilities as the first one... Sorry for asking this many questions, but your solution is really clever and I really appreciate that! – JetfiRex Aug 29 '24 at 05:39
  • @JetfiRex Thank you for the kind words... I tried Srini's fourier approach first, but I couldn't get it work in general. Then I looked at a couple of simple cases and discovered that the two-point case works in the case of Lemma 4. Lemma 5 and 6 are ad-hoc fixes in the remaining cases. – abacaba Aug 31 '24 at 00:31
  • Also this is a very nice problem, and I enjoyed working on it! – abacaba Aug 31 '24 at 00:33
6

Consider the following proposition.

Proposition (*). Let $X, X_1, \cdots, X_n$ be i.i.d random variables that take value $\mathbb{Z}/n\mathbb{Z}$. Then the probability that $X_1 + \cdots + X_n$ is congruent to $0$ modulo $n$ is at least $2^{-n+1}$.

In my previous answer, I showed that the proposition holds if $n$ is a prime. Now, let's show that the proposition holds for all $n$. The observation is

Proposition. If (*) holds for $n = a$ and $n = b$, then it holds for $n = ab$.

Proof. We decompose the sum $$X_1 + \cdots + X_{ab}$$ into $b$ parts $Y_1, \cdots, Y_b$ $$Y_i = X_{(i - 1)a + 1}+ \cdots + X_{ia}.$$ Let $E_i$ be the event that $Y_i$ is divisible by $a$. Then the events $E_i$ are independent, and happens with probability at least $2^{-a+1}$ by hypothesis. Conditioned on all $E_i$ happening, let $Z_i = Y_i / a$ be elements of $\mathbb{Z} / b\mathbb{Z}$. Then $Z_i$ are also i.i.d random variables! So we have $$\mathbb{P}(X_1 + \cdots + X_{ab} = 0) \geq \mathbb{P}(E_1, \cdots, E_b) \mathbb{P}(Z_1 + \cdots + Z_b = 0 | E_1, \cdots, E_b) \geq 2^{-b(a - 1)}2^{-b+1} = 2^{-ab+1}$$ as desired. QED.

Since any positive integer is a product of primes, we conclude that the proposition holds for any positive integer $n$.

abacaba
  • 11,210
3

Disclaimer: This is a proof only for $n=2$, $n=3$ and $n=4$. This could be a sketch for proving for other values (but I have no success yet). I am providing these despite an accepted answer that proves it for all $n$. The reason is I had already spent sufficient time working on it and thought I might as well post it if any one finds it of interest (or easier to understand).

We will use the following ideas in the proof

  1. Distribution of the sum of i.i.d random variables is the convolution of the individual distributions. Convolution is associative. Hence for a sum of $n$ i.i.d RV, the distribution is convolution of the $n$ distributions.

  2. If $x[m]$ is the individual discrete distribution for $m \in \mathbb{Z}$, its fourier domain representation is a DTFT (Discrete Time Fourier Transform). This is defined as $X(e^{i \omega}) = \sum\limits_{m=-\infty}^{\infty} x[m] e^{i \omega m}$. Note that $X$ is periodic with a period of $2\pi$. Note that in this notation, $x[m]$ is the raw distribution over integers and is not same as your $a,b,c,...$ which denote a more condensed version like probability of being divisible by $2, 3, 4,$ etc. The only requirements are $x[m] \ge 0 \forall m \in \mathbb{z}$ and $\sum\limits_{m \in \mathbb{z}} x[m] = 1$.

  3. Convolution in discrete domain is equivalent to multiplication in fourier domain.

  4. After $n$ self-convolutions, probability of the sum being a multiple of $n$ is the sum $\mathbf{\sum\limits_{m=-\infty}^{\infty} \hat{x}_{n}[n m]} \color\red{\mathbf{\text{(our result of interest)}}}$. Here $n = 2,3,4 ...$ (same as what you have used in your question). $\hat{x}_{n}$ is the sequence after $n$ self convolutions.

  5. For the self-product in the fourier domain, I will use the convention $\operatorname{DTFT}[\hat{x}_{2}[m]] = X_{2}(e^{i \omega}) = \left[ X(e^{i \omega}) \right]^2$, $\operatorname{DTFT}[\hat{x}_{3}[m]] = X_{3}(e^{i \omega}) = \left[ X(e^{i \omega}) \right]^3$, $\operatorname{DTFT}[\hat{x}_{4}[m]] = X_{4}(e^{i \omega}) = \left[ X(e^{i \omega}) \right]^4$ etc. as per point #$3$.

  6. DTFT of $\hat{x}_{n}[n m]$ can be written as $\sum\limits_{m=-\infty}^{\infty} \hat{x}_{n}[n m] e^{i m \omega} = \sum\limits_{m=-\infty}^{\infty} \hat{x}_{n}[m] S[n] e^{\frac{i m \omega}{n}}$, where $S[n]$ is a repeating sequence that starts with $1$ at $m=0$ and is followed by $(n-1)$ $0$s. For example, for $n=2, S[2] = 1,0,1,0,1,0,...$ and for $n=3, S[3] = 1,0,0,1,0,0,1,0,0,...$ and for $n=4, S[4] = 1,0,0,0,1,0,0,0,1,0,0,0,...$. In the negative $m$-axis, it is just a mirror image of this sequence.

$$\mathbf{\color\red{\text{Proofs:}}}$$

Case $\mathbb{n=2}$

$S[2]$ can be represented as $\frac{1+(-1)^{m}}{2} = \frac12 (1+e^{i \pi m})$

So

$$ \begin{align} \operatorname{DTFT}(\hat{x}_{2}[2 m]) &= \frac12 \left( \sum\limits_{m=-\infty}^{\infty} \hat{x}_{2}[m]e^{\frac{i \omega m}{2}} + \sum\limits_{m=-\infty}^{\infty} \hat{x}_{2}[m]e^{i \pi m}e^{\frac{i \omega m}{2}}\right) \\ &= \frac12 \left( X_{2}(e^{\frac{i \omega}{2}}) + X_{2}(e^{\frac{i \omega}{2} - i\pi})\right) \\ &= \frac12 \left( \left[X(e^{\frac{i \omega}{2}})\right]^2 + X_{2}(e^{\frac{i \omega}{2} - i\pi})\right)\\ \end{align} $$

As per point #$4$, we are interested in the sum $\sum\limits_{m=-\infty}^{\infty} \hat{x}_{n}[n m]$. This corresponds to $\omega=0$ in $\sum\limits_{m=-\infty}^{\infty} \hat{x}_{n}[n m] e^{i m \omega}$. So let's plug $\omega=0$ in our equation for DTFT of $\hat{x}_{2}[2 m]$ (and also note the definition of DTFT in point # $2$).

$\sum\limits_{m=-\infty}^{\infty}\hat{x}_{2}[2 m] = \frac12 \left( \left[\sum\limits_{m=-\infty}^{\infty} x[m]\right]^2 + \left[\sum\limits_{m=-\infty}^{\infty} x[m] (-1)^{m}\right]^2\right)$

We know that $\sum\limits_{m=-\infty}^{\infty} x[m] = 1$ (because it is a probability distribution).

$\sum\limits_{m=-\infty}^{\infty}\hat{x}_{2}[2 m] = \frac12 \left( 1 + \left[\sum\limits_{m=-\infty}^{\infty} x[m] (-1)^{m}\right]^2\right) \color\red{\ge \frac12}$ (because the second term is non-negative, no matter what $x[m]$ distribution we choose).

Case $\mathbb{n=4}$

For $n=4$, $S[4]$ can be obtained from https://oeis.org/A121262 as $\frac{1+e^{i \pi m}+e^{\frac{i \pi m}{2}}+e^{\frac{-i \pi m}{2}}}{4}$.

Using the same approach as $n=2$,

$\sum\limits_{m=-\infty}^{\infty}\hat{x}_{4}[4 m] = \frac14 \left( 1 + \left[\sum\limits_{m=-\infty}^{\infty} x[m] (-1)^{m}\right]^4 + \left[\sum\limits_{m=-\infty}^{\infty} x[m] (-i)^{m}\right]^4 + \left[\sum\limits_{m=-\infty}^{\infty} x[m] (i)^{m}\right]^4\right)$

The second term is always non-negative. But the sum of third and 4th term can be negative. See my proof $\mathbf{\color\red{\text{(proof A)}}}$ at the end, where I show that the most negative value of sum of third and fourth terms is $\mathbf{-\frac12}$.

Therefore, for $n=4$, the sum is at least $\frac{1+(\text{non-negative-term})-\frac12}{4} \color\red{\ge \frac18}$

Further Notes:

  1. This is unnecessarily complicated for n=2. But the idea is shown in detail to deal with $n=4.

  2. Unfortunately this method cannot be (at least easily) applied for other n becasue there is no nice closed form for S[3], S[5],S[6] etc. (for example, S[6] is https://oeis.org/A079979). Most of them involve floor functions (which I haven't yet figured out how to convert to nicer forms).I have a suspicion that powers of 2 might have nice closed forms (but haven't worked on n=8, 16 etc yet).

  3. My brain got misdirected by first looking at OEIS for $S[n]$ formula. They complicate things by expressing in terms of floor functions. By simple analysis of complex numbers as rotating phases, the formula is just $S[n] = \sum\limits_{k=0}^{n-1} e^{\frac{i 2\pi k m}{n}}$.

  4. With this, for $n=3$, the required result is $\frac{1+\sum\limits_{m=-\infty}^{\infty}x[m]e^{\frac{i 2 \pi m}{3}}+\sum\limits_{m=-\infty}^{\infty}x[m]e^{\frac{-i 2 \pi m}{3}}}{3}$. Using the same approach as in Proof A below (which is for $n=4$), we can easily conclude that the sum of the second and third terms is $-\frac14$. Hence the required result is $\frac{1-\frac14}{3} = \frac14$. The minima is reached when $\sum x[3m] = \sum x[3m+1] = \frac12, \sum x[3m+2] = 0$.

  5. Even though I got a simple formula for $S[n]$, the minima analysis on paper becomes tedious for $n>=5$. Until $n \le 4$, the minima finding is resticted to $2$ variables with the simpliciations I do as in Proof A. I am not too familiar with easy minima finding methods for $\ge 3$ variables. I think $3$ variable case will just be manageable on paper.

$$\mathbf{\color\red{\text{(proof A)}}}$$ For the sum of third and fourth terms referred to in the proof for $n=4$ above,

$$ \begin{align} G &= \left(\left[\sum\limits_{m=-\infty}^{\infty} x[m] (-i)^{m}\right]^4 + \left[\sum\limits_{m=-\infty}^{\infty} x[m] (i)^{m}\right]^4\right)\\ &= \left(\left[ \sum\limits_{m=-\infty}^{\infty} x[2m] - i \sum\limits_{m=-\infty}^{\infty} x[2m+1] (-1)^{m}\right]^4 + \left[ \sum\limits_{m=-\infty}^{\infty} x[2m] + i \sum\limits_{m=-\infty}^{\infty} x[2m+1] (-1)^{m}\right]^4\right)\\ &= \left(\left[ 1 - \sum\limits_{m=-\infty}^{\infty} x[4m+1] -\sum\limits_{m=-\infty}^{\infty} x[4m+3] - i \left(\sum\limits_{m=-\infty}^{\infty} x[4m+1] -\sum\limits_{m=-\infty}^{\infty} x[4m+3] \right)\right]^4 + \left[ 1 - \sum\limits_{m=-\infty}^{\infty} x[4m+1] -\sum\limits_{m=-\infty}^{\infty} x[4m+3] + i \left(\sum\limits_{m=-\infty}^{\infty} x[4m+1] -\sum\limits_{m=-\infty}^{\infty} x[4m+3] \right)\right]^4\right)\\ \end{align} $$

Now let's denote $b = \sum\limits_{m=-\infty}^{\infty} x[4m+1]$ and $c = \sum\limits_{m=-\infty}^{\infty} x[4m+3]$. Note that $0 \le b \le 1$, $0 \le c \le 1$ and $0 \le (b+c) \le 1$(because they are sum of a subset of probabilities).

With this, $$ \begin{align} G &= [1 - b-c -i(b-c)]^4 + [1 - b-c +i(b-c)]^4 \\ &= 2 - 8b + 16b^3 - 8b^4 - 8c + 48bc - 48b^{2}c - 48 bc^2 + 48b^{2} c^{2} + 16 c^3 - 8 c^4\\ \end{align} $$

Setting $\frac{\partial G}{\partial b} = -8 (-1 + 2 b) (-1 - 2 b + 2 b^2 + 6 c - 6 c^2) = 0$ and solving further (while rejecting those solutions that cannot meet the criteria $0 \le b \le 1$, $0 \le c \le 1$ and $0 \le (b+c) \le 1$), we get $b = \frac12, c = 0, G_{\text{min}} = -\frac12$

Srini
  • 1,405
  • One thing to note is that I am able to give the exact conditions under which the minimum is reached. For $n=2$, the minimum is reached when $\sum\limits_{m=-\infty}^{\infty}x[2m] = \sum\limits_{m=-\infty}^{\infty}x[2m+1]$ and for $n=4$, the minimum is reached when $\sum\limits_{m=-\infty}^{\infty}x[4m+1] = \frac12$ AND $\sum\limits_{m=-\infty}^{\infty}x[4m+3] = 0$ or vice-verca. – Srini Aug 30 '24 at 21:04