Why Derive the Mean and Variance?
A binomial model describes the number of successes in a fixed number of trials. Its probability mass function can give the probability of each possible count, but calculating a whole distribution is not necessary to find its mean or variance. The key is to examine each trial separately, then combine the results.
This approach also makes the assumptions visible. The mean comes from adding the expected contributions of the trials. The variance has an additional requirement: the trials must be independent, so their indicators have zero covariance. Without that condition, the same variance formula need not hold.
An indicator is a numerical way to record whether an event occurred. It contributes exactly 1 to the total when the event occurs and 0 otherwise. Thus, counting successes is the same as adding one indicator for each trial.
Mean: Add the Expected Contributions
For any one trial, \(I_i=1\) with probability \(p\) and \(I_i=0\) with probability \(1-p\). Its expected value is therefore
Expectation is linear: the expected value of a sum is the sum of the expected values. This property does not require independence. Since the count is the sum of the \(n\) indicators, each with expected value \(p\),
Worked Example: Expected Successful Free Throws
Suppose a hypothetical player takes 10 free throws, with each shot modeled as an independent trial having success probability \(p=0.70\). Let \(X\) count the successful shots. Find its mean.
The fixed trial count is \(n=10\), and the same probability \(p=0.70\) applies to every shot. Under the stated independence assumption, the count follows \(X\sim\operatorname{Bin}(10,0.70)\). The indicator for each shot has expected value \(0.70\), so
The expected count is 7.00 successful shots. This is a property of the model’s probability distribution; it does not mean that every set of 10 shots contains exactly 7 successes.
Variance of One Indicator
Variance measures how much a random variable varies around its expected value. For any random variable \(Y\) with a finite second moment, the variance can be written as
For an indicator, \(I_i\) can only be 0 or 1, so \(I_i^2=I_i\) in either case. It follows that \(E(I_i^2)=E(I_i)=p\). Substituting into the variance formula gives
The same result can be obtained by considering the two possible values directly: the squared deviation from the mean \(p\) is \((1-p)^2\) when \(I_i=1\), and \(p^2\) when \(I_i=0\). Weighting those deviations by their probabilities gives \(p(1-p)^2+(1-p)p^2=p(1-p)\).
Variance of the Count: Why Independence Matters
For a sum of random variables, variance includes both the individual variances and the covariances between pairs. For two variables \(Y\) and \(Z\), the identity is
where \(\operatorname{Cov}(Y,Z)=E[(Y-E(Y))(Z-E(Z))]\). Extending this identity to the \(n\) indicators gives
If the trials are independent, their indicators are independent too. Independent variables have covariance zero, so every pairwise covariance term disappears. Each indicator has variance \(p(1-p)\), leaving \(n\) equal terms.
Write \(X=I_1+\cdots+I_n\), where \(I_i\) records success on trial \(i\).
Since \(I_i^2=I_i\) and \(E(I_i)=p\), \(\operatorname{Var}(I_i)=p-p^2=p(1-p)\).
Independence gives \(\operatorname{Cov}(I_i,I_j)=0\) for every distinct pair of trials.
There are \(n\) indicators, each with variance \(p(1-p)\), so \(\operatorname{Var}(X)=np(1-p)\).
Worked Example: Number of Defective Components
In a hypothetical quality-control model, 25 components are inspected. Each component independently has probability \(0.02\) of being defective. Let \(X\) be the number of defective components. Find the mean and variance of \(X\).
The count is binomial because the number inspected is fixed at 25, each component has the same defect probability \(p=0.02\), and the model states that outcomes are independent. Thus \(X\sim\operatorname{Bin}(25,0.02)\).
For each component, its defect indicator has expected value \(0.02\). Adding the 25 expectations gives
The variance of each indicator is \(p(1-p)=0.02(0.98)=0.0196\). Independence means the covariances between different components’ indicators are zero, so
The mean is in units of components, while the variance is in squared component-count units. These are summaries of the modeled count, not guarantees about the particular 25 components inspected.
Seeing the Covariance Term in a Small Model
A small example makes clear which part of the variance proof depends on independence. Suppose three hypothetical trials each have success probability \(0.40\). For each trial, \(E(I_i)=0.40\), and
Assume the three trials are independent and let \(X=I_1+I_2+I_3\). Then all three pairwise covariances are zero. The mean and variance follow by adding the individual contributions:
For a direct check of one covariance, independence gives \(P(I_1=1,I_2=1)=0.40(0.40)=0.16\). Since \(I_1I_2=1\) only when both trials succeed, \(E(I_1I_2)=0.16\), and
The other two pairs have the same calculation. This confirms that the covariance terms vanish here because the trial outcomes are independent, not merely because each indicator has the same success probability.
Worked Example: Detecting Why the Variance Formula Can Fail
Consider a hypothetical pair of indicators that always take the same value: both are 1 with probability \(0.40\), and both are 0 with probability \(0.60\). Each indicator separately has success probability \(p=0.40\). Let \(X\) count the successes across the two indicators. Find its actual variance and compare it with the binomial formula.
The indicators are dependent: if the first equals 1, the second must also equal 1. The count is 2 with probability \(0.40\) and 0 with probability \(0.60\). Therefore,
Using \(\operatorname{Var}(X)=E(X^2)-[E(X)]^2\),
Blindly applying the binomial formula would give \(2(0.40)(0.60)=0.480\), only half the actual variance. The count is not binomial because the trials are dependent. In the sum-of-indicators identity, the covariance is positive: the indicators move together, so their joint variability adds to the variance of the count.
Common Mistake and Why the Result Matters
A frequent error is to reason, “There are \(n\) trials, each with variance \(p(1-p)\), so the count’s variance is \(np(1-p)\),” without checking independence. In general, adding variances alone is not valid for a sum of dependent variables. The missing terms are the covariances:
The correction is to check the binomial conditions before using the formula. A fixed number of trials and a common success probability give the indicator expectations and individual variances used above; independence justifies dropping the covariance terms. If outcomes tend to occur together, covariance can increase the count’s variance; if they tend to offset one another, covariance can decrease it.
The indicator method matters because it explains the formulas rather than treating them as rules to memorize. It also separates two ideas that are easy to blur: linearity of expectation supports \(E(X)=np\), while independence supports \(\operatorname{Var}(X)=np(1-p)\). These derivations apply to any setting that genuinely satisfies the binomial model, whether the successes are correct answers, functioning parts, or another clearly defined outcome.
Check Your Understanding
Answer each question by connecting the count to its trial indicators.
- For an indicator that equals 1 with probability \(p\) and 0 otherwise, derive \(E(I)\) and \(\operatorname{Var}(I)\).
- Which step in deriving \(E(X)=np\) uses linearity of expectation, and does that step require independence?
- For \(n=12\) independent trials with success probability \(p=0.25\), calculate \(E(X)\) and \(\operatorname{Var}(X)\).
- Why does independence allow the pairwise covariance terms to be removed from the variance of a sum?
- Give a reason why a count with a fixed number of trials and a common success probability might still fail to have variance \(np(1-p)\).