Tutorials › VEE Mathematical Statistics › Binomial Variance From Independent Indicators

VEE Mathematical Statistics · Bernoulli and Binomial Models · Tutorial 85 of 880

Binomial Variance From Independent Indicators

Learn why a binomial count has variance \(np(1-p)\), and how to detect when dependence makes that formula inapplicable.

Beginner 10 min read

What You'll Learn

  • Express a count of successes as a sum of Bernoulli indicator variables
  • Derive the variance of one Bernoulli indicator
  • Expand the variance of a sum and locate its covariance terms
  • Apply independence to obtain the binomial variance
  • Correctly calculate variance when indicators are dependent

Why Independence Matters for Variance

A binomial count is built by adding indicators: each trial contributes 1 if it is a success and 0 otherwise. The variance of the count depends on the variability of each indicator, but also on how the indicators move together. Independence matters because it removes the covariance terms between different trials. Without that condition, adding the individual variances alone can give the wrong answer.

This tutorial derives the binomial variance from indicators and distinguishes two facts that are easy to conflate: a Bernoulli indicator has variance \(p(1-p)\) whether or not it is independent of other indicators; the formula \(np(1-p)\) for a count uses independence to combine those individual variances.

Definition: For a success event \(A_i\) on trial \(i\), its indicator \(I_i\) is 1 when \(A_i\) occurs and 0 otherwise. If \(P(A_i)=p\), then \(I_i\) is Bernoulli with success probability \(p\). The count of successes in \(n\) trials is \(X=\sum_{i=1}^{n} I_i\).

The binomial model considered here has a fixed number \(n\) of trials, independent trial outcomes, and the same success probability \(p\) on every trial. Thus \(X\sim\operatorname{Bin}(n,p)\), where \(n\) is a positive integer and \(0\leq p\leq1\). Write \(q=1-p\). The equal success probabilities make the indicators identically distributed; independence is the condition that will eliminate their covariances.

Variance of One Indicator

An indicator can take only 0 and 1. Since \(I_i^2=I_i\) for either possible value, its first and second moments are especially simple. The variance definition gives:

$$ E[I_i]=p,\qquad E[I_i^2]=E[I_i]=p, \qquad \operatorname{Var}(I_i)=E[I_i^2]-(E[I_i])^2 =p-p^2=p(1-p)=pq. $$

No independence assumption was needed in this calculation. It concerns just one indicator. Independence enters when we calculate the variance of a sum of indicators.

Deriving the Binomial Variance

For any two random variables with finite variances, covariance is defined by \(\operatorname{Cov}(I_i,I_j)=E[I_iI_j]-E[I_i]E[I_j]\). Expanding the square in the variance of a sum gives the general result:

$$ \operatorname{Var}\left(\sum_{i=1}^{n} I_i\right) = \sum_{i=1}^{n}\operatorname{Var}(I_i) + 2\sum_{1\leq i<j\leq n}\operatorname{Cov}(I_i,I_j). $$

The factor 2 appears because each distinct pair occurs twice when the square of the sum is expanded: once as \(I_iI_j\), and once as \(I_jI_i\). Equivalently, the covariance between each pair contributes to the total variance.

1
Write the count as a sum.
Set \(X=\sum_{i=1}^{n} I_i\), with each \(I_i\) indicating success on trial \(i\).
2
Find the individual variances.
Each indicator has success probability \(p\), so \(\operatorname{Var}(I_i)=p(1-p)\).
3
Account for pairs.
If the indicators are independent, every covariance between distinct indicators is 0.
4
Add the remaining terms.
There are \(n\) individual variances, each equal to \(p(1-p)\), so \(\operatorname{Var}(X)=np(1-p)\).

To justify Step 3, independence of \(I_i\) and \(I_j\) implies \(E[I_iI_j]=E[I_i]E[I_j]\). Therefore:

$$ \operatorname{Cov}(I_i,I_j) =E[I_iI_j]-E[I_i]E[I_j] =0. $$

Substituting zero for each covariance in the general variance-of-a-sum formula yields the binomial variance:

Theorem: If \(X\sim\operatorname{Bin}(n,p)\), then $$ \operatorname{Var}(X)=np(1-p)=npq. $$ This formula assumes independent trials with the same success probability \(p\). Mutual independence is sufficient; for the variance calculation itself, it is enough that every distinct pair of indicators has covariance 0.

The formula includes the boundary cases. If \(p=0\), there are no successes and \(X=0\) with certainty, so the variance is 0. If \(p=1\), every trial succeeds and \(X=n\) with certainty, so again the variance is 0. In both cases \(np(1-p)=0\). For probabilities between 0 and 1, the count is variable.

Worked Applications

Worked Example: Independent Quality Checks

A hypothetical laboratory checks 12 independently prepared samples. Each sample has probability \(0.25\) of failing a specified check, and the failure probability is the same for every sample. Let \(X\) be the number of failures. Find the variance and standard deviation of \(X\).

Method. The fixed number of trials, common failure probability, and independence specify \(X\sim\operatorname{Bin}(12,0.25)\). Here \(n=12\), \(p=0.25\), and \(q=1-p=0.75\).

The variance of one failure indicator is:

$$ p(1-p)=0.25(0.75)=0.1875. $$

There are 12 independent indicators, so their covariances are zero. Hence:

$$ \operatorname{Var}(X)=12(0.1875)=2.25. $$

The standard deviation is the positive square root of the variance:

$$ \operatorname{SD}(X)=\sqrt{2.25}=1.5. $$

Check. The variance also follows directly from \(12(0.25)(0.75)=2.25\). The standard deviation is 1.5 failures. Common mistake avoided: using \(np=3\), the mean number of failures, as the variance. The variance is \(np(1-p)=2.25\), not 3.

Worked Example: Independent Hypothetical Claim Flags

A hypothetical portfolio review considers 15 policies. For each policy, the probability of a claim flag during the review period is \(0.20\), and the flags are assumed independent across policies. Let \(X\) count the flags. Calculate its variance and standard deviation.

Method. Under the stated assumptions, \(X\sim\operatorname{Bin}(15,0.20)\). The probability of no flag on one policy is \(1-0.20=0.80\), so the variance of one indicator is:

$$ 0.20(0.80)=0.16. $$

Adding the 15 individual variances, with zero covariance terms because the indicators are independent, gives:

$$ \operatorname{Var}(X)=15(0.16)=2.40. $$

The standard deviation is:

$$ \operatorname{SD}(X)=\sqrt{2.40}\approx1.5492. $$

Check. Substitution in the compact formula gives \(15(0.20)(1-0.20)=15(0.20)(0.80)=2.40\). The standard deviation is rounded to four decimal places. Common mistake avoided: forgetting the complementary probability and using \(15(0.20)\) as the variance. Each indicator's variance is \(p(1-p)\), not \(p\).

Worked Example: Two Dependent Indicators

Two hypothetical monitoring devices each have probability \(0.50\) of recording an alert. Their joint outcomes have probabilities \(P(I_1=1,I_2=1)=0.35\), \(P(I_1=1,I_2=0)=0.15\), \(P(I_1=0,I_2=1)=0.15\), and \(P(I_1=0,I_2=0)=0.35\). Let \(X=I_1+I_2\). Find \(\operatorname{Var}(X)\), and compare it with the result that would follow from incorrectly assuming independence.

Method. First confirm the marginal probability for each device:

$$ P(I_1=1)=0.35+0.15=0.50,\qquad P(I_2=1)=0.35+0.15=0.50. $$

Thus each indicator has variance \(0.50(0.50)=0.25\). However, they are dependent: the probability that both alert, \(0.35\), is not the product of their marginal probabilities, \(0.50(0.50)=0.25\). Their covariance is:

$$ \operatorname{Cov}(I_1,I_2) =E[I_1I_2]-E[I_1]E[I_2] =0.35-(0.50)(0.50)=0.10. $$

Use the variance-of-a-sum formula, including the covariance term:

$$ \operatorname{Var}(X)=0.25+0.25+2(0.10)=0.70. $$

A direct check is possible from the count's distribution. The count is 0 with probability \(0.35\), 1 with probability \(0.30\), and 2 with probability \(0.35\). Therefore \(E[X]=0.30+2(0.35)=1.00\), \(E[X^2]=0.30+4(0.35)=1.70\), and \(\operatorname{Var}(X)=1.70-1.00^2=0.70\).

If independence were incorrectly assumed, the calculation would omit the covariance and give \(0.25+0.25=0.50\), which is too small. Check. The positive covariance increases the variance by \(2(0.10)=0.20\), giving \(0.50+0.20=0.70\). Common mistake avoided: applying the binomial variance formula just because there are two indicators with the same marginal probability. Equal probabilities do not establish independence.

Exam Traps and Interpretation

The most important diagnostic is to separate the individual variance calculation from the variance-of-a-sum calculation. For each Bernoulli indicator, \(p(1-p)\) follows from its two possible values and its marginal probability. For a sum, the general formula also contains covariance terms. They disappear only when the indicators are pairwise uncorrelated; independence is a standard sufficient condition.

  • Do not confuse mean and variance. For \(X\sim\operatorname{Bin}(n,p)\), the mean is \(np\), whereas the variance is \(np(1-p)\). The extra factor \(1-p\) is essential.
  • Do not assume equal probabilities imply independence. The two devices in the dependent example both had success probability \(0.50\), but their covariance was \(0.10\).
  • Do not discard covariance without checking the model. For dependent indicators, use the variance-of-a-sum formula and include the pairwise covariance contributions.
  • Keep variance and standard deviation distinct. Variance is measured in squared count units; standard deviation is its square root and is measured in count units.

For independent indicators with a common probability, \(np(1-p)\) provides a direct measure of the spread in the number of successes. When indicators tend to occur together, positive covariances increase the count's variance; when they tend to offset one another, negative covariances decrease it. The individual Bernoulli variances alone do not capture either effect.

Check Your Understanding

For each question, use the stated dependence assumptions rather than inferring independence from equal probabilities.

  1. Nine independent trials each have success probability \(1/3\). Find the variance of the success count. (Answer: \(2\))
  2. A hypothetical sensor has an independent probability of \(0.05\) of flagging on each of 24 checks. Find the variance of the number of flags. (Answer: \(1.14\))
  3. Fourteen independent indicators each have success probability \(0.40\). Find the variance and standard deviation of their sum; round the standard deviation to four decimals. (Answer: Variance \(3.36\); standard deviation \(1.8330\))
  4. Two dependent indicators each have success probability \(0.40\), and \(P(I_1=1,I_2=1)=0.22\). Find the variance of their sum. (Answer: \(0.60\))
  5. Three indicators each have variance \(0.16\). Every pair has covariance \(-0.02\). Find the variance of their sum using the general formula. (Answer: \(3(0.16)+2(3)(-0.02)=0.36\))
Clinical Biostats