The Central Idea
A Bernoulli random variable records the outcome of one success-failure trial.
It is usually defined by
\[ X= \begin{cases} 1, & \text{success},\\ 0, & \text{failure}. \end{cases} \]If the probability of success is \(p\), then
\[ P(X=1)=p \]and
\[ P(X=0)=1-p. \]A binomial random variable counts how many successes occur in a fixed number of independent Bernoulli trials.
The Bernoulli Distribution
If \(X\) is Bernoulli with success probability \(p\), we write
\[ \boxed{X\sim\operatorname{Bernoulli}(p)}. \]Its probability mass function is
\[ P(X=x) = \begin{cases} 1-p, & x=0,\\ p, & x=1,\\ 0, & \text{otherwise}. \end{cases} \]Examples of Bernoulli Trials
A Bernoulli model can represent many two-outcome situations:
- a manufactured part is defective or not defective;
- a voter supports a proposal or does not;
- a patient responds to a treatment or does not;
- a network request succeeds or fails;
- a coin toss is heads or tails;
- a student answers a particular question correctly or incorrectly.
The labels success and failure are mathematical conventions and do not necessarily imply a favorable or unfavorable event.
The Success Probability
The Bernoulli parameter satisfies
\[ \boxed{0\le p\le1}. \]Since failure is the complement of success,
\[ P(\text{failure})=1-p. \]The entire Bernoulli distribution is therefore determined by the single parameter \(p\).
Mean of a Bernoulli Distribution
For
\[ X\sim\operatorname{Bernoulli}(p), \]the expected value is
\[ \mathbb{E}[X] = 0(1-p)+1(p) = \boxed{p}. \]Variance of a Bernoulli Distribution
Since \(X^2=X\) whenever \(X\in\{0,1\}\),
\[ \mathbb{E}[X^2]=p. \]Therefore,
\[ \operatorname{Var}(X) = p-p^2. \]Factoring gives
\[ \boxed{\operatorname{Var}(X)=p(1-p)}. \]The standard deviation is
\[ \boxed{\sigma_X=\sqrt{p(1-p)}}. \]From One Trial to Many Trials
Suppose the same type of Bernoulli trial is repeated \(n\) times.
Let
\[ I_i= \begin{cases} 1, & \text{trial }i\text{ is a success},\\ 0, & \text{trial }i\text{ is a failure}. \end{cases} \]Then the total number of successes is
\[ X=I_1+I_2+\cdots+I_n. \]Under the binomial assumptions, \(X\) has a binomial distribution.
The Binomial Assumptions
A random variable \(X\) follows a binomial distribution when all of the following conditions hold:
- There is a fixed number \(n\) of trials.
- Each trial has two relevant outcomes: success or failure.
- The trials are independent.
- The probability of success is the same on every trial.
- \(X\) counts the number of successes.
Binomial Notation
If \(X\) counts successes in \(n\) independent Bernoulli trials with success probability \(p\), we write
\[ \boxed{X\sim\operatorname{Binomial}(n,p)}. \]The possible values are
\[ \boxed{X\in\{0,1,2,\ldots,n\}}. \]Why Combinations Appear
Suppose we want exactly \(k\) successes in \(n\) trials.
One particular arrangement with \(k\) successes and \(n-k\) failures has probability
\[ p^k(1-p)^{n-k}. \]But the \(k\) successes can occur in many different sets of trial positions.
The number of such arrangements is
\[ \binom{n}{k}. \]The Binomial Probability Formula
Therefore,
\[ \boxed{ P(X=k) = \binom{n}{k} p^k(1-p)^{n-k} } \]for
\[ k=0,1,\ldots,n. \]This is the probability mass function of the binomial distribution.
Interpreting Each Part of the Formula
In
\[ \binom{n}{k}p^k(1-p)^{n-k}, \]- \(\binom{n}{k}\) counts the ways to choose which \(k\) trials are successes;
- \(p^k\) gives the probability contribution from the \(k\) successes;
- \((1-p)^{n-k}\) gives the contribution from the \(n-k\) failures.
Example: Exactly Three Successes
Suppose
\[ X\sim\operatorname{Binomial}(5,0.4). \]Find
\[ P(X=3). \]Apply the binomial formula:
\[ P(X=3) = \binom53(0.4)^3(0.6)^2. \]Complete the Calculation
Since
\[ \binom53=10, \]we have
\[ P(X=3) = 10(0.064)(0.36). \]Therefore,
\[ \boxed{P(X=3)=0.2304}. \]Exactly Means One PMF Value
Phrases such as
- exactly \(k\);
- equal to \(k\);
- precisely \(k\);
correspond to
\[ \boxed{P(X=k)}. \]At Most
The phrase at most \(k\) means
\[ X\le k. \]Therefore,
\[ \boxed{ P(X\le k) = \sum_{j=0}^{k} \binom{n}{j}p^j(1-p)^{n-j} }. \]At Least
The phrase at least \(k\) means
\[ X\ge k. \]Therefore,
\[ P(X\ge k) = \sum_{j=k}^{n} P(X=j). \]Often the complement rule is faster:
\[ \boxed{ P(X\ge k)=1-P(X\le k-1) }. \]Fewer Than and More Than
Translate the verbal inequalities carefully:
\[ \text{fewer than }k \quad\Longrightarrow\quad XBecause \(X\) is integer-valued,
\[ XExample: At Least One Success
Suppose
\[ X\sim\operatorname{Binomial}(8,0.2). \]Find
\[ P(X\ge1). \]Use the complement:
\[ P(X\ge1)=1-P(X=0). \]Since
\[ P(X=0)=(0.8)^8, \]we obtain
\[ \boxed{ P(X\ge1)=1-(0.8)^8 }. \]Example: Numerical Value
Since
\[ (0.8)^8\approx0.1678, \]the probability of at least one success is approximately
\[ \boxed{0.8322}. \]The Binomial Mean
If
\[ X\sim\operatorname{Binomial}(n,p), \]then
\[ \boxed{\mathbb{E}[X]=np}. \]This follows from writing \(X\) as a sum of \(n\) Bernoulli indicator variables and applying linearity of expectation.
Interpreting the Binomial Mean
The quantity
\[ np \]is the expected number of successes in \(n\) trials.
It need not be an integer.
For example, if \(n=10\) and \(p=0.35\), then
\[ \mathbb{E}[X]=3.5. \]This means the long-run average number of successes per group of \(10\) trials tends toward \(3.5\).
The Binomial Variance
For
\[ X\sim\operatorname{Binomial}(n,p), \]the variance is
\[ \boxed{\operatorname{Var}(X)=np(1-p)}. \]The standard deviation is
\[ \boxed{\sigma_X=\sqrt{np(1-p)}}. \]Why the Binomial Variance Formula Works
Write
\[ X=I_1+\cdots+I_n, \]where the \(I_i\) are independent Bernoulli variables.
Each has variance
\[ p(1-p). \]Since independent variances add,
\[ \operatorname{Var}(X) = n\,p(1-p). \]Example: Mean and Standard Deviation
Suppose
\[ X\sim\operatorname{Binomial}(20,0.3). \]Then
\[ \mathbb{E}[X]=20(0.3)=6. \]The variance is
\[ \operatorname{Var}(X) = 20(0.3)(0.7) = 4.2. \]Therefore,
\[ \boxed{\sigma_X=\sqrt{4.2}\approx2.049}. \]The Shape of a Binomial Distribution
The shape depends on both \(n\) and \(p\).
When \(p\) is near \(1/2\), the distribution is often fairly symmetric, especially for moderate or large \(n\).
When \(p\) is small, the distribution tends to be right-skewed. When \(p\) is large, it tends to be left-skewed.
Changing \(n\)
Increasing \(n\) increases the number of possible success counts and usually produces a smoother-looking probability profile.
The mean
\[ np \]and variance
\[ np(1-p) \]both depend on \(n\).
Changing \(p\)
Increasing \(p\) shifts probability toward larger success counts.
Decreasing \(p\) shifts probability toward smaller counts.
The variance is largest, for fixed \(n\), when \(p=1/2\), because
\[ p(1-p) \]reaches its maximum at \(p=1/2\).
Binomial Cumulative Probabilities
The cumulative distribution function is
\[ F_X(k)=P(X\le k). \]For a binomial random variable,
\[ \boxed{ F_X(k) = \sum_{j=0}^{k} \binom{n}{j}p^j(1-p)^{n-j} }. \]Tables, calculators, or software are commonly used when \(n\) is large.
Example: At Most Two Successes
Suppose
\[ X\sim\operatorname{Binomial}(4,0.5). \]Then
\[ P(X\le2) = P(X=0)+P(X=1)+P(X=2). \]Thus,
\[ P(X\le2) = \binom40\left(\frac12\right)^4 + \binom41\left(\frac12\right)^4 + \binom42\left(\frac12\right)^4. \]Complete the Cumulative Calculation
Since
\[ \binom40=1,\qquad \binom41=4,\qquad \binom42=6, \]we obtain
\[ P(X\le2) = \frac{1+4+6}{16} = \boxed{\frac{11}{16}}. \]When a Binomial Model Is Appropriate
A binomial model is appropriate only when the assumptions match the experiment closely enough.
The model is especially natural when:
- there is a predetermined number of trials;
- each trial can be reduced to success or failure;
- the success probability remains stable;
- one trial does not materially affect another;
- the quantity of interest is the number of successes.
Example: Appropriate Binomial Model
Suppose \(20\) independent components are tested, each with probability \(0.05\) of failure, and \(X\) is the number that fail.
Then
\[ \boxed{X\sim\operatorname{Binomial}(20,0.05)}. \]The number of trials is fixed, each trial has two outcomes, the failure probability is constant, and the component outcomes are assumed independent.
When a Binomial Model Is Not Appropriate
The binomial model fails when one or more defining assumptions break down.
Examples include:
- the number of trials is not fixed in advance;
- the success probability changes from trial to trial;
- the trials are dependent;
- there are more than two relevant outcome categories;
- the variable records something other than the number of successes.
Sampling Without Replacement
Sampling without replacement from a finite population generally creates dependence because each selection changes the composition of the remaining population.
In that setting, an exact binomial model is usually inappropriate.
A hypergeometric model is designed specifically for sampling without replacement and will be introduced later.
Approximate Independence in Large Populations
When the population is very large relative to the sample, sampling without replacement may behave approximately like independent sampling.
In such cases, a binomial approximation may sometimes be useful, but the approximation should be recognized as a modeling choice rather than an exact identity.
Bernoulli Versus Binomial
| Bernoulli | Binomial |
|---|---|
| One trial | \(n\) trials |
| Values \(0,1\) | Values \(0,1,\ldots,n\) |
| Parameter \(p\) | Parameters \(n,p\) |
| Mean \(p\) | Mean \(np\) |
| Variance \(p(1-p)\) | Variance \(np(1-p)\) |
Common Error: Forgetting the Combination Factor
For exactly \(k\) successes, the probability is not merely
\[ p^k(1-p)^{n-k}. \]That is the probability of one particular ordering of the successes and failures.
The full binomial probability is
\[ \boxed{ \binom{n}{k}p^k(1-p)^{n-k} }. \]Common Error: Using \(k\) Instead of \(n-k\)
If there are \(k\) successes in \(n\) trials, then there are
\[ n-k \]failures.
Therefore the failure factor is
\[ (1-p)^{n-k}. \]Common Error: Mixing Up \(p\) and \(1-p\)
The probability \(p\) must correspond to the outcome defined as success.
If the problem defines failure as the counted event, then the parameter should be the failure probability instead.
Common Error: Misreading “At Least”
“At least \(k\)” means
\[ X\ge k, \]not
\[ X\le k. \]Translating words into inequalities before calculating reduces errors.
Common Error: Assuming Independence Without Checking
Repeated trials are not automatically independent.
If one outcome changes the probabilities of later outcomes, the standard binomial model does not apply exactly.
Common Error: Allowing the Success Probability to Change
The binomial model requires a common success probability \(p\) on every trial.
If trial \(1\) has success probability \(0.2\) and trial \(2\) has success probability \(0.6\), the total success count is not an ordinary binomial random variable.
Common Error: Using the Binomial Model for a Waiting-Time Question
A binomial random variable counts successes in a fixed number of trials.
If the question instead asks how many trials occur before a specified success, a geometric or negative binomial model is usually more appropriate.
A Reliable Procedure for Binomial Problems
- Identify what counts as a success.
- Identify the fixed number of trials \(n\).
- Identify the success probability \(p\).
- Check independence and constant \(p\).
- Define \(X\) as the number of successes.
- Translate the verbal event into notation such as \(X=k\), \(X\le k\), or \(X\ge k\).
- Use the PMF, cumulative sum, or complement rule as appropriate.
- Interpret the result in the original context.
Practice 1: Bernoulli Probability
Let
\[ X\sim\operatorname{Bernoulli}(0.7). \]Find
\[ P(X=0). \]Practice 2: Bernoulli Mean and Variance
Let
\[ X\sim\operatorname{Bernoulli}(0.3). \]Find the mean and variance.
Practice 3: Exactly Two Successes
Let
\[ X\sim\operatorname{Binomial}(5,0.4). \]Find
\[ P(X=2). \]Practice 4: No Successes
Let
\[ X\sim\operatorname{Binomial}(6,0.2). \]Find
\[ P(X=0). \]Practice 5: At Least One Success
Using the distribution from Practice 4, find
\[ P(X\ge1). \]Practice 6: Mean and Variance
Let
\[ X\sim\operatorname{Binomial}(30,0.4). \]Find the mean and variance.
Practice 7: Standard Deviation
Using Practice 6, find the standard deviation.
Practice 8: Translate the Event
Let \(X\) be the number of defective parts in a sample of \(12\).
Write each statement using \(X\):
- exactly three defective parts;
- at most three defective parts;
- at least three defective parts;
- fewer than three defective parts.
Practice 9: Check the Model
A box contains \(10\) red and \(10\) blue balls. Five balls are drawn without replacement, and \(X\) is the number of red balls selected.
Is an exact binomial model appropriate? Explain.
Practice 10: Identify the Error
A student writes
\[ P(X=3)=p^3(1-p)^{n-3} \]for a binomial random variable.
Explain what is missing.
Practice Answers
Practice 1
\[ P(X=0)=1-0.7=\boxed{0.3}. \]Practice 2
\[ \mathbb{E}[X]=p=\boxed{0.3}. \] \[ \operatorname{Var}(X) = p(1-p) = 0.3(0.7) = \boxed{0.21}. \]Practice 3
\[ P(X=2) = \binom52(0.4)^2(0.6)^3. \] \[ = 10(0.16)(0.216) = \boxed{0.3456}. \]Practice 4
\[ P(X=0) = \binom60(0.2)^0(0.8)^6 = (0.8)^6. \]Therefore,
\[ \boxed{P(X=0)=0.262144}. \]Practice 5
\[ P(X\ge1)=1-P(X=0). \] \[ =1-0.262144. \]Therefore,
\[ \boxed{P(X\ge1)=0.737856}. \]Practice 6
\[ \mathbb{E}[X]=np=30(0.4)=\boxed{12}. \] \[ \operatorname{Var}(X) = np(1-p) = 30(0.4)(0.6) = \boxed{7.2}. \]Practice 7
\[ \sigma_X = \sqrt{7.2} \approx \boxed{2.683}. \]Practice 8
- \(X=3\)
- \(X\le3\)
- \(X\ge3\)
- \(X<3\), equivalently \(X\le2\)
Practice 9
No. Sampling without replacement makes the draws dependent because each draw changes the composition of the box. A hypergeometric model is the exact model for this situation.
Practice 10
The student included the probability of one specific ordering of three successes and \(n-3\) failures, but omitted the number of possible arrangements.
The missing factor is
\[ \boxed{\binom n3}. \]What to Remember
For one success-failure trial,
\[ \boxed{X\sim\operatorname{Bernoulli}(p)}. \]Its mean and variance are
\[ \boxed{\mathbb{E}[X]=p} \]and
\[ \boxed{\operatorname{Var}(X)=p(1-p)}. \]For \(n\) independent trials with constant success probability \(p\),
\[ \boxed{X\sim\operatorname{Binomial}(n,p)}. \]Its probability mass function is
\[ \boxed{ P(X=k)=\binom nk p^k(1-p)^{n-k} }. \]Its mean and variance are
\[ \boxed{\mathbb{E}[X]=np} \]and
\[ \boxed{\operatorname{Var}(X)=np(1-p)}. \]The central modeling rule is: use the binomial distribution only when the number of trials is fixed, each trial has two relevant outcomes, the trials are independent, and the success probability remains constant.
Where We Go Next
The binomial distribution counts successes in a fixed number of trials. Other probability models reverse the question and ask how many trials are required before one or more successes occur.
The next lesson, Geometric and Negative Binomial Distributions, develops waiting-time models for repeated Bernoulli trials.