# Probability mass function of the sample mean

Suppose that $X_1,X_2,\ldots,X_n$ is a random sample from a distribution with probability function:

$$p_X(x)=\begin{cases} 1/2 &x=-1,1 \\ 0 & \text{otherwise} \end{cases}$$

Now if we define the average

$\bar{X}= \frac{1}{n} \sum X_i$, I need to show that that for an odd $n$ the probability function for $\bar{X}$ is:

$$p_{\bar{X}} (x)= \frac{\binom{n}{\frac{n}{2} (x+1)}}{2^n}$$ for $x=\pm 1/n,\pm 3/n,\ldots,\pm 1$, $0$ otherwise.

Since $P[\sum X_i=k] =P [\bar{X}=k/n ]$, I thought it would be easier to first derive the probability function for the sum. Since they are still $2^n$ n-tuples and each one is equilikely, I need to count the ones whose sum is $k$ for:

$k=\pm 1,\pm 3,\ldots \pm n-2,\pm n$ (since even numbers are not a feasible combination)

The problem here though is that I do not immediately recognize how I could count all these tuples. Could you please help me with this? If it is easier to proceed another way, I am of course all ears.

• Could you elaborate on what you understand "$\binom{n}{n(x+1)/2}$" to be? I ask this because for many people it is defined to be the count you seek!
– whuber
Jul 2, 2014 at 16:49
• @whuber I cannot quite interpret $\frac{n(x+1)}{2}$ What is the intuition here? Jul 2, 2014 at 17:26
• As $x$ ranges over $\pm 1/n, \pm 3/n,$ etc, $n(x+1)/2$--when sorted--ranges over $0, 1, \ldots, n$. It represents the number of $1$'s that are summed (along with the remaining $-1$s) to produce $nx$.
– whuber
Jul 2, 2014 at 17:51
• @whuber Okay, thank you. It's still a little blurry in my head but I'll get it eventually. Jul 2, 2014 at 18:01

If $Z \sim Bernoulli(\frac12)$, then $X=2Z-1$ has a Rademacher distribution where $X=-1$ or $1$ with equal probability. Let $X_1, ..., X_n$ denote indepedent Rademacher random variables.

Then, the pmf of:

$$S = \sum_{i=1}^n X_i = (2 \sum_{i=1}^n Z_i) - n = 2 Y -n$$

where $Y \sim Binomial(n,\frac12)$ (since the sum of $n$ Bernoulli's is $Binomial(n,p)$).

That is: $Y \sim Binomial(n,\frac12)$ with pmf:

$$f(y) = 2^{-n} \binom{n}{y} \quad \quad \text{for } y = {0,1,\dots,n}$$

Then, the pmf of $\bar X = \frac{S}{n} = \frac1n(2 Y - n)$ can be obtained directly via the method of transformations, which yields:

$$2^{-n} \binom{n}{\frac{1}{2} n \left(\bar{x}+1\right)}$$

... which is the result you seek. Since $y = {0,1,\dots, n}$, the domain of support of $\bar X = \frac1n(2 Y - n)$ will be:

• for odd-valued $n$: $\quad \bar x= \pm \frac1n,\pm \frac3n,\ldots, \pm 1$
• for even-valued $n$: $\quad \bar x= 0, \pm \frac2n,\pm \frac4n,\ldots,\pm 1$
• +1. I did not know that distribution had a name, thank you. Jul 2, 2014 at 17:32