Distributions · Definition
Binomial distribution
Before you start you need to know
It answers “how many successes will there be in \(n\) attempts?” and is the basic model for yes/no counts.
Definition
A binomial variable \(X\) counts the successes \(k\) in \(n\) independent Bernoulli trials with the same success probability \(p\); \(P(X=k)\) is the probability of getting \(k\) successes.
If \(n\) independent Bernoulli trials are repeated, each with success probability \(p\), the total number of successes \(X\) is binomial; we write \(X\sim\mathrm{Bin}(n,p)\). To get exactly \(k\) successes there are \(\binom{n}{k}\) ways to choose which trials succeed, and each has probability \(p^k(1-p)^{n-k}\); that gives the mass function.
The four conditions are checked one by one: \(n\) fixed in advance, two outcomes per trial, the same \(p\) in every trial, and independent trials. If one fails, the model does not apply: drawing cards without replacement breaks independence, and counting tosses until the first success leaves \(n\) unfixed.
Since \(X\) is a sum of \(n\) independent Bernoulli variables, linearity gives \(E[X]=np\) and independence gives \(\operatorname{Var}(X)=np(1-p)\). With \(n=20\) and \(p=0.3\) we expect 6 successes with variance 4.2.
The distribution is symmetric when \(p=\tfrac12\) and skewed otherwise. For “at least one” the complement is convenient, \(1-(1-p)^n\). When \(n\) is large and \(p\) small, the binomial is approximated by the Poisson with \(\lambda=np\).
Think about it
Three marbles are drawn from a small urn without replacement and the red ones are counted. Is this binomial?
No: without replacement the probability of red changes from draw to draw, so the trials are not independent (it would be hypergeometric).
Why is the variance \(np(1-p)\) larger with \(p=0.5\) than with \(p=0.9\) for the same \(n\)?
Because \(p(1-p)\) is maximal at \(p=\tfrac12\): there is the most uncertainty about each trial, while with \(p=0.9\) almost every trial succeeds.
Exercises 10
- A fair coin is tossed 4 times. What is the probability of getting exactly 2 heads?
- If \(X\) is binomial with \(n=20\) and \(p=0.3\), compute \(E[X]\).
- If \(X\) is binomial with \(n=20\) and \(p=0.3\), compute \(\operatorname{Var}(X)\).
- A binomial variable has \(n=10\) and \(p=0.1\). What is \(P(X=0)\), rounded to 4 decimals?
- In which situation is the random variable binomial?
- A fair coin is tossed 3 times. What is the probability of getting at least one head?
- A die is rolled 6 times. What is the probability of getting exactly one 6?
- A binomial variable has mean 12 and variance 3. What are \(n\) and \(p\)?
- If \(X\) is binomial with \(n=10\) and \(p=\tfrac12\), which probability equals \(P(X=3)\)?
- A shooter hits with probability 0.8 on each shot, independently. In 3 shots, what is the probability of at least 2 hits?
What comes next
References
- Joseph K. Blitzstein, Jessica Hwang, Introduction to Probability, 2nd edition, CRC Press, 2019. §3.3
- Sheldon Ross, A First Course in Probability, 10th edition, Pearson, 2019. §4.6
- Ronald E. Walpole, Raymond H. Myers, Sharon L. Myers, Keying Ye, Probabilidad y estadística para ingeniería y ciencias, 9.ª edición, Pearson, 2012. §5.2