An inspector examines four items and counts how many carry a flag. In one setting a process flags each item independently with probability . In the other, the four items are drawn without replacement from a batch of ten that contains exactly two flagged items. Both start from the same 20 percent, yet the chance of exactly two flagged items is in the first setting and in the second. This lesson builds the Bernoulli and binomial models for independent trials and the hypergeometric model for sampling a fixed batch, and it shows which conditions decide between them.
Key terms
Bernoulli distribution
Definition A Bernoulli trial is a single random experiment whose outcome falls in exactly one of two categories, called success and failure. Its indicator takes the value for a success and for a failure. If for a number with , then has the Bernoulli distribution with success probability , written , and
A variable that takes only the values and satisfies , so its second moment is . Subtracting the squared mean gives
In plain words Success is simply the outcome being counted, and it can be an unwelcome one such as a defective part or a missed deadline. The mean of a variable that takes only the values and is the probability of a . The variance is when is or , because the outcome is then certain, and it is largest, equal to , when .
Example Inspect one item and record if it is flagged, where an item is flagged with probability . Then , and . The mean is not a value that can take. It is the long-run average of over many independent repetitions, which is the long-run proportion of flagged items.
Binomial setting
Definition A binomial setting is a sequence of Bernoulli trials, where is a positive integer fixed in advance, such that the trials are independent and every trial has the same success probability . The binomial count is the number of successes,
where is the indicator of a success on trial .
In plain words The conditions describe how the data were produced, so they come from knowing the mechanism, not from the look of the data. A column of yes and no answers does not show that the answers are independent or that they share one success probability. Repeated outcomes from the same person are often related, and a process whose conditions drift does not keep a fixed . The number of trials also has to be set beforehand. Counting coin tosses until the first head, for example, does not give a binomial count, because the number of tosses is itself random.
Example Four items come off a process that flags each one independently with probability . This is a binomial setting with and . Now draw four items one at a time without replacement from a batch of ten that contains exactly two flagged items. Each draw on its own is flagged with probability , but the draws are dependent. The second draw is flagged with probability if the first was flagged and if it was not, so the independence condition fails and this is not a binomial setting.
Binomial distribution
Definition In a binomial setting with trials and success probability , the count of successes has the binomial distribution, written , with
for . By independence, any particular sequence of trials with successes and failures has probability . There are such sequences, one for each choice of the positions of the successes, and they are disjoint events, so their probabilities add. When every integer from to has positive probability. When the count is with probability , when it is with probability , and the formula still holds in both cases with the convention .
In plain words The binomial coefficient counts the ways to place the successes among the trials, and the powers give the probability of each placement. Every placement with the same number of successes has the same probability, which is why one product covers them all.
Example For , one sequence with two successes, such as success, success, failure, failure, has probability , and there are such sequences, so
The whole distribution is below, and its masses add to .
Binomial mean and variance
Definition If , then
Write the count as with each . Linearity of expectation gives the mean as a sum of copies of , and this step needs no independence. The variance of a sum of independent variables is the sum of their variances, which gives copies of .
In plain words On average the count equals the number of trials times the success probability. The mean need not be a possible count, and a mean below does not keep the count below . For a fixed the variance is largest when , and it is when is or .
Example For the mean is and the variance is , so the SD is . The table above confirms both. The sum of over all is , the sum of is , and . Although the mean is below , two or more flagged items occur with probability .
Hypergeometric distribution
Definition A population of items contains marked items, where . A sample of items, with , is drawn without replacement so that every subset of items has the same chance . The number of marked items in the sample has the hypergeometric distribution with parameters , and , and
for every integer with , while for every other . The numerator counts the samples made of of the marked items and of the unmarked ones. The mean is , and with and the variance is
In plain words Removing an item changes what is left, so the draws are dependent whenever the batch holds both marked and unmarked items, and only counts that the batch can actually supply are possible. The sample cannot hold more marked items than the batch has or than its own size allows, and a sample larger than the number of unmarked items must contain some marked ones. The factor equals when , lies below when , and equals when , since a sample of the whole batch gives for certain. This model treats the batch as fixed, and its only randomness is which items get drawn.
Example Draw four items from a batch of ten that contains two flagged items, so , and . The support runs from to . Exactly two flagged items means both flagged items and two of the eight others, so
The table compares this batch with the independent process of the earlier cards.
| Flagged count | |||||
|---|---|---|---|---|---|
| Binomial | |||||
| Hypergeometric |
Both models have mean , and the hypergeometric variance is , smaller than the binomial . The batch view and the process view answer different questions. If the ten items were not a known batch but ten outputs of a process that flags each item independently with probability , and the four were sampled without looking at the flags, the count in the sample would again follow .
Check yourself
- A process flags each item independently with probability , and five items are inspected. Find the probability that exactly one is flagged, and the mean and variance of the number flagged.
Show the answer
The five inspections form a binomial setting, so the count is and
The mean is and the variance is .
- Decide whether a binomial model is justified for each count. First, the number of sixes in 12 rolls of a fair die. Second, the number of days in one week on which a particular commuter arrives late. Third, the number of rolls of a fair die needed to get the first six.
Show the answer
The first count is binomial. The number of rolls is fixed at 12, the rolls are independent and each gives a six with probability , so the count is with mean .
The second count is made of yes and no outcomes, but nothing guarantees that the days are independent or share one probability of lateness. Late days can cluster, for example during a week of roadwork, and Mondays may differ from Fridays. A binomial model would need evidence for both conditions.
The third count is not binomial. The number of rolls is the random quantity being recorded, so there is no fixed number of trials whose successes are counted.
- A club roster lists 12 members, 4 of whom are volunteers. Three members are chosen without replacement, with every set of three equally likely. An analyst uses and reports the probability of choosing no volunteers as . Which condition fails, and what is the correct probability?
Show the answer
The draws are not independent. If the first member chosen is not a volunteer, the second is a volunteer with probability , not . The count is hypergeometric with , and . No volunteers means three of the eight other members, so
Both models give a mean of volunteer, but the hypergeometric variance is , smaller than the binomial .