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

Assume that $X$ and $Y$ are two independent random variables that follow the binomial distribution of parameters $p$ (the probability of one success) and $n$ (the number of trials).

I was wondering if there is a way of expressing the probability that $X=Y$, other than summing up all the cases when $X=Y=k$, with $k$ from $0$ to $n$, which will give the formula $$\sum_{k=0}^{n}\binom{n}{k}^{2}p^{2k}(1-p)^{2n-2k}.$$

Edit: I'm not interested in computing or rewriting the sum above using some algebraic tricks, but in finding another probabilistic or combinatorial approach to the problem that would yield another (maybe "nicer") answer.

share|cite|improve this question

You can factor out constants wrt $k$ and remain with the expression of the form $$ \sum_{k=0}^{n}\binom{n}{k}^2x^k $$ which unfortunately doesn't have a closed form. See here for some details. You will see more links in the answer to the question there.

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.