Measuring Spread in Binomial Distributions | Free Discrete Mathematics Lesson (4 College Credits) | UPI Study

UPI Study › Courses › Discrete Mathematics › Free lessons › Lesson 8.6 Free with a free account

Measuring Spread in Binomial Distributions

Discrete Mathematics · Chapter 8: Binomial Probability, Recurrence Relations, and Generating FunctionsSection 8.6 · lesson 51 of 878 min · free with a free account

← Finding the Mean of a Binomial DistributionNext lesson: Applied Binomial Experiment Problems →

Earn 4 college credits for Discrete MathematicsRecommended for credit by NCCRS · Math 230 · self-paced · one payment, lifetime access

In this lesson

Variance npq and standard deviation - built one trial at a time.

  • Find the variance of a single Bernoulli trial
  • Prove variances add for independent variables
  • Compute the variance and standard deviation of a binomial
  • Explain why spread peaks at p = 1/2

Transcript

Everything said in the video, section by section (1,162 words). Read along, or search it.

Binomial Probability, Recurrence Relations, and Generating Functions

Measuring Spread in Binomial Distributions

Section eight point five found the center of a binomial distribution, its mean. This section measures its spread. It builds two related numbers, the variance and the standard deviation, using exactly the same strategy as before. Write the count as a sum of simple pieces, find what each piece contributes, and add the contributions.

The Opening Problem

Nobody Sees an Average Day

Consider a moderation classifier that wrongly flags compliant posts with an illustrative probability of zero point two. Take a batch of twenty-five posts. By the formula from section eight point five, the mean number of wrongly flagged posts is twenty-five times zero point two, which is five. That's useful for planning an average day. But an operations team rarely sees an average day. It sees a specific batch. Some batches will show two flagged posts, and others eight. Knowing the long-run average is five says nothing about how far a typical batch drifts from it. A staffing plan built on the mean alone risks being badly under-resourced on a high day, or wasteful on a low one. What's missing is a measure of spread. How much X typically varies around its mean.

8.6.1 The Same Strategy as 8.5

A Sum of Simple Pieces

As in section eight point five, write X as a sum of indicator variables, one per trial. Each is one if that trial succeeds, and zero if it fails. Each indicator is one with probability p, and zero with probability q, which is one minus p. And the indicators are mutually independent. For the batch, that's twenty-five indicators, each equal to one with probability zero point two. The plan mirrors the mean exactly. Find the variance contributed by one piece. Then work out how the contributions of independent pieces combine.

Worked Example 8.6.B

1 Trial: Variance pq

The variance of a random variable is the expected squared distance from its mean. Equivalently, the expected value of its square, minus the square of its expected value. For one indicator, the mean is one times p plus zero times q, which is p. Now notice that squaring an indicator changes nothing. Zero squared is zero, and one squared is one. So the expected value of its square is also p. That makes the variance p, minus p squared, which is p times one minus p. That's p q. For the batch, each post contributes zero point two times zero point eight, which is zero point one six.

Theorem 8.6.1

Why Variances Add

Now, how do variances combine? Expand the variance of a sum, Y plus Z, using the definition and linearity of expectation. After regrouping, it's the variance of Y, plus the variance of Z, plus twice a leftover cross term. The expected value of Y Z, minus the product of their expected values. That cross term is called the covariance of Y and Z. If Y and Z are independent, their joint probabilities factor, so the expected value of the product equals the product of the expected values. The covariance is zero. So for independent variables, variances add.

Formula 8.6

n Trials, n Identical Terms

Apply that repeatedly across all n independent trials, formally by induction on n. The variance of X is the sum of the n trial variances. Each one is p q. So the sum collapses to n identical terms, n p q. That's the variance of a binomial distribution. The standard deviation, sigma, is its square root, the square root of n p q. Taking the square root restores the original units of X, which squaring had changed.

Worked Example 8.6.D

The 25-Post Batch

For the moderation batch, the variance is twenty-five times zero point two times zero point eight, which is four. So the standard deviation is the square root of four, which is two. Together with the mean, that says the batch is expected to have five wrongly flagged posts on average, typically varying from that by about two in either direction.

8.6.4 When Is Spread Largest?

Complete the Square

Sigma only becomes useful when you read it against p. How does spread change as p changes? Complete the square. p times one minus p equals minus, p minus one half, squared, plus one quarter. The squared term is never negative, so p times one minus p is at most one quarter. And it equals one quarter only when p is exactly one half. Multiplying by n, the variance is at most n over four, with equality only at p equal to one half. In words, for a fixed batch size, spread is greatest when each trial is a coin flip's worth of uncertainty. It shrinks toward zero as p approaches zero or one, where trials become nearly certain.

Table 8.6.1

Spread Across p, n = 25

This table shows that directly, for batches of twenty-five. The standard deviation is one and a half at p zero point one, two at zero point two, and peaks at two and a half at zero point five. And it's identical for p and one minus p. Compare zero point one with zero point nine, or zero point two with zero point eight. Swapping p and q leaves n p q unchanged. The mean isn't symmetric this way. It simply tracks p.

Worked Example 8.6.E

A Hypothetical p = 0.5 Classifier

Consider a second, purely hypothetical classifier on the same batch size, with p equal to zero point five. It's no more likely to pass a compliant post than to flag it. Its variance is twenty-five times zero point five times zero point five, which is six point two five. So its standard deviation is two and a half. Compared with the original classifier's two, its count swings about half a post further from its own mean. That's a direct, numeric confirmation that p of one half produces the widest spread for a fixed n.

Figure 8.6.1

Within 1 SD of the Mean

Here's the full distribution for the original batch. The gold bars, three through seven, are the outcomes within one standard deviation of the mean. Adding their exact probabilities gives about zero point seven nine three. So roughly seventy-nine percent of batches land within one sigma of the mean, for this distribution specifically. That means about one batch in five still falls outside three to seven. So reporting the mean and sigma together turns about five on average into a usable planning range. Build capacity for roughly the mean plus or minus sigma, with a separate reserve for the days further out. And a classifier nearer p of one half needs a wider reserve, purely because of how spread depends on p.

Takeaways

Center Plus Spread

To summarize. Writing X as a sum of independent indicators turns the variance into one trial's variance, combined across trials. Each trial contributes p q, because an indicator squared is itself. Variances add across independent, or more precisely uncorrelated, variables. So the binomial variance is n p q, and sigma is its square root, largest at p equal to one half. The mean describes the center, and sigma describes the typical drift. Realistic planning needs both. Here's something to think about. The proof used independence only once, to conclude that the covariance is zero. So independence is sufficient. But is it necessary? Could two variables that aren't independent still have variances that add? What property, precisely, would they need to share for that key step to go through?

About Discrete Mathematics at UPI Study

Discrete Mathematics (Math 230) is a self-paced online course of 87 video lessons in 13 chapters, from logic and proof to counting, probability, graph theory and trees. It carries a NCCRS credit recommendation for 4 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Why take it here

Why students take Discrete Mathematics with UPI Study

The math behind computer scienceDiscrete Mathematics is the mathematics of computer science: logic, proofs, sets, counting, probability and graphs underpin algorithms, data structures, cryptography and databases. Completing it now lets you qualify for those courses at your university.
Credit at a fraction of the priceThe same 4 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Discrete Mathematics carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Measuring Spread in Binomial Distributions

What is the variance of a single Bernoulli trial?
The variance of one Bernoulli trial with success probability p is pq = p(1-p). The mean is E[I]=p. Since I^2=I when I is 0 or 1, E[I^2]=p as well. So \text{Var}(I)=E[I^2]-(E[I])^2=p-p^2=p(1-p).
Why do variances add for independent random variables?
Variances add for independent variables because the cross term in the expansion vanishes. Expanding gives \text{Var}(Y+Z)=\text{Var}(Y)+\text{Var}(Z)+2\,\text{Cov}(Y,Z), where \text{Cov}(Y,Z)=E[YZ]-E[Y]E[Z]. Independence makes E[YZ]=E[Y]E[Z], so the covariance is 0 and \text{Var}(Y+Z)=\text{Var}(Y)+\text{Var}(Z).
How do you find the variance and standard deviation of a binomial distribution?
For a binomial with n trials and success probability p, the variance is npq, where q=1-p, and the standard deviation is \sigma=\sqrt{npq}. Example: with n=25 and p=0.2, the variance is 25(0.2)(0.8)=4, so \sigma=2. This means counts typically fall about 2 away from the mean of 5.
Why is the spread of a binomial distribution largest when p = 1/2?
For a fixed n, spread is largest at p=1/2 because p(1-p) is maximized there. Completing the square gives p(1-p)=-(p-\tfrac12)^2+\tfrac14, which is at most \tfrac14, with equality only at p=\tfrac12. So the variance is at most n/4. For n=25, \sigma peaks at 2.5.

About the Discrete Mathematics course

How many college credits is Discrete Mathematics?
Discrete Mathematics (Math 230) carries a NCCRS credit recommendation for 4 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Discrete Mathematics cost and what is included?
$250, paid once, with lifetime access: all 87 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Discrete Mathematics take?
It is self-paced with no deadlines. The 87 lessons total about 13 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 4 credits in Discrete Mathematics.

87 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Discrete Mathematics
4 credits · NCCRS
Enroll →