Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Oh, it is hard to express math questions in English. What I mean concerns a Bernoulli distribution $B(n,p)$. We know that $A$ happens $k$ times and $A^c$ happens $n-k$ times. So does the difference $(k-(n-k))=2k-n$ also follow certain distribution? And what is the distribution?

share|cite|improve this question
This is sometimes called "the heads minus tails" distribution, although that name is often also used for the distribution of the absolute value of the difference. It is very closely related to the binomial distribution. The probabilities can be simply written down from the known probabilities for the binomial. – André Nicolas Jan 17 '13 at 6:09

This random variable can also be described as the sum of $n$ independent random variables each of which takes one of values $\pm 1$ with probabilities $p$ and $1-p$. When $n$ is large, the resulting distribution is approximately Gaussian, $\mathcal{N}((1-2p)n,2(1-p)\sqrt{n})$. The exact distribution is $$P(X=m)=\begin{cases} p^{(n+m)/2}(1-p)^{(n-m)/2}\binom{n}{(n+m)/2} \quad &\text{if }\ (n+m)/2 \in \{0,1,\dots,n\} \\ 0 &\text{otherwise}\end{cases}$$ For example, with $n=40$ and $p=1/2$ it already looks pretty much normal:


share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.