# binomial random variable

Let Y be a binomial random variable with n trials and probability of success given by p. Show that n-Y is a binomial random variable with n trials and probability of success given by 1-p.

I understand why this is true, and can explain in logically, but I just don't know how to prove it in mathematical terms.

Any help is greatly appreciated!

Thanks!

-
I think you should edit your question to include your "logical explanation", so that people can help you to formalise it. Usually, when you actually set out explaining something, you will either realise that you don't know why it's true after all, or you will see how to turn the explanation into a rigorous proof. –  Alex B. Dec 9 '10 at 2:46

A discrete random variable is determined by the probabilities of all possible outcomes. If $Y$ is $n$ trials of a binomial random variable with probability $p$ of success, then the probability that $Y = i$ is given by ${\displaystyle{n \choose i} p^i(1 - p)^{n-i}}$. Thus the probability that $n - Y = i$ is given by the probability that $Y = n - i$, or ${\displaystyle {n \choose n - i} p^{n-i}(1 - p)^i}$. Since ${\displaystyle{n \choose n - i} = {n \choose i}}$, this is the same as ${\displaystyle{n \choose i} (1 - p)^ip^{n-i}}$. But if $Z$ denotes $n$ trials of a binomial random variable with probability $1 - p$ of success, this is exactly the probability that $Z = i$. Thus $n - Y$ and $Z$ have the same distribution (i.e. the same probability of each outcome), which is equivalent to saying that $n - Y$ is also $n$ trials of a binomial random variable with probability $1 - p$ of success.
I am not really sure how I qould go about giving a full prove right now, but here is a suggestion. Rewrite $Y=\Sigma_{i=1}^n Y_i$ where the $Y_i$ are from your other question, they are the indicator functions for each trial.
Continuing Sean's answer, rewrite $n = \sum\nolimits_{i = 1}^n 1$. –  Shai Covo Dec 9 '10 at 3:09
$Y$ counts the number of successes in $n$ trials. $n - Y$ counts the number of failures in $n$ trials. Notion of success and failure is arbitrary. $P[Y = i] = P[n - Y = n - i]$, so $n-Y$ is binomially distributed with "success" probability $1 - p$.