Tutorials › Statistical Theory I - Probability and Distribution Theory › Choosing a Count Distribution from a Sampling Story

Geometric and Count Distributions · Tutorial 146 of 994

Choosing a Count Distribution from a Sampling Story

Use what is fixed, what is random, and how sampling proceeds to choose an appropriate count distribution.

Beginner 9 min read

What You'll Learn

  • Distinguish fixed numbers of trials from sampling until a target number of successes.
  • Identify when independent Bernoulli trials justify a binomial model.
  • Recognize finite-population sampling without replacement as hypergeometric.
  • Use a Poisson model for counts over fixed exposure under a constant-rate event mechanism.
  • Tell geometric and negative-binomial waiting counts apart by the target number of successes.
  • Derive probabilities from the sampling mechanism rather than from a variable’s name.

Start with the Sampling Mechanism

A count variable may take nonnegative integer values, but that fact alone does not determine its distribution. The decisive questions are about how the data are generated: Is the number of opportunities fixed? Are outcomes independent? Is sampling from a finite population without replacement? Or does observation continue until a target number of successes occurs? Different answers lead to different count models, even when the variable is simply described as “the number of successes.”

This tutorial organizes five standard models around those questions. The goal is not to choose a distribution because a data set looks familiar, but to match the story’s mechanism and assumptions to the model.

Definition: A count is a random variable recording how many events of a specified kind occur. A count model is appropriate only when its assumptions describe how the count is generated, including what is fixed, what is random, and whether outcomes or events are independent.

Five Mechanisms and Their Models

Let \(p\) be the probability of success on a Bernoulli trial, and write \(q=1-p\). In the waiting-time models below, the count is the number of failures before the specified success occurs. This convention gives a geometric count beginning at zero and a negative-binomial count that also begins at zero.

Sampling storyWhat is fixed?Model for the count
A fixed number \(n\) of independent trials, each with success probability \(p\)Number of trialsBinomial
A sample of size \(m\) drawn without replacement from \(N\) objects, \(K\) of them successesPopulation and sample sizeHypergeometric
Events counted over fixed exposure under a constant-rate Poisson processExposure intervalPoisson
Independent Bernoulli trials continue until the first successTarget number of successes: oneGeometric
Independent Bernoulli trials continue until the \(r\)th successTarget number of successes: \(r\)Negative binomial

The binomial and hypergeometric models both count successes in a sample of fixed size. Their key difference is how the sample is generated. Independent trials with a stable success probability lead to a binomial model. A fixed-size sample from a finite population, drawn without replacement, leads to a hypergeometric model.

The Poisson model concerns the number of events in a fixed amount of exposure, such as calls per hour or defects per metre. A constant rate is part of the story, but a Poisson count also requires an appropriate event mechanism: counts in disjoint intervals are independent, and the event rate is stable over the exposure being modeled. A rate alone does not make every observed count Poisson.

For the geometric and negative-binomial models, the number of trials is not fixed in advance. Trials continue until the target number of successes is reached. The geometric model is the special waiting-time case with target \(r=1\).

Deriving Probabilities from the Story

The probability formulas make the mechanism visible. For a binomial count, exactly \(x\) successes can occupy any \(x\) of the \(n\) trial positions. Each such arrangement has probability \(p^xq^{n-x}\). For a hypergeometric count, a sample with \(x\) successes contains \(x\) of the \(K\) marked objects and \(m-x\) of the \(N-K\) other objects.

Theorem: If \(X\) counts successes in \(n\) independent Bernoulli trials with the same success probability \(p\), then $$ P(X=x)=\binom{n}{x}p^x(1-p)^{n-x},\qquad x=0,1,\ldots,n. $$ If instead a simple random sample of size \(m\) is drawn without replacement from \(N\) objects, of which \(K\) are successes, and \(X\) counts sampled successes, then $$ P(X=x)=\frac{\binom{K}{x}\binom{N-K}{m-x}}{\binom{N}{m}}, $$ for integer \(x\) such that \(0\leq x\leq K\) and \(0\leq m-x\leq N-K\).

Proof. For the binomial case, fix any particular arrangement of \(x\) successes and \(n-x\) failures. Independence gives that arrangement probability \(p^x(1-p)^{n-x}\). There are \(\binom{n}{x}\) arrangements, and they are disjoint, so adding their probabilities gives the stated formula.

For the hypergeometric case, every subset of \(m\) objects is equally likely, and there are \(\binom{N}{m}\) possible subsets. A subset with exactly \(x\) successes can be formed by choosing \(x\) of the \(K\) successes and \(m-x\) of the \(N-K\) non-successes. The number of such subsets is \(\binom{K}{x}\binom{N-K}{m-x}\). Dividing favorable subsets by all subsets gives the formula. The stated restrictions are exactly the conditions for both choices to be possible. \(\square\)

For a waiting-time count, the target success must occur on the last trial. If there are \(k\) failures before the \(r\)th success, the final trial is a success, and among the preceding \(r+k-1\) trials there must be \(r-1\) successes and \(k\) failures. This gives the negative-binomial formula.

Theorem: Suppose successive trials are independent, each with success probability \(p\), where \(0<p\leq1\). If \(Y\) counts the failures before the \(r\)th success, for a positive integer \(r\), then $$ P(Y=k)=\binom{k+r-1}{r-1}p^r(1-p)^k,\qquad k=0,1,2,\ldots. $$ For \(r=1\), this is the geometric probability \(P(Y=k)=p(1-p)^k\).

Proof. If there are \(k\) failures before the \(r\)th success, the final trial is a success. Among the first \(k+r-1\) trials, choose the \(r-1\) positions occupied by successes; the remaining \(k\) positions are failures. There are \(\binom{k+r-1}{r-1}\) such arrangements. Each arrangement, including the final success, has probability \(p^r(1-p)^k\) by independence. These arrangements are disjoint, so their probabilities add to the displayed expression. Setting \(r=1\) gives \(\binom{k}{0}p(1-p)^k=p(1-p)^k\). \(\square\)

Worked Examples: Match the Story, Then Calculate

Worked Example: Fixed Independent Trials

A diagnostic test is applied to 10 independent samples. Each sample has probability \(0.2\) of testing positive. Let \(X\) be the number of positive results. Find the probability of exactly two positives.

The number of trials is fixed at \(n=10\), each trial has the same success probability \(p=0.2\), and the trials are independent. Thus \(X\) is binomial. Substituting \(x=2\) and \(1-p=0.8\),

$$ \begin{aligned} P(X=2) &=\binom{10}{2}(0.2)^2(0.8)^8\\ &=45(0.04)(0.16777216)\\ &=0.301989888. \end{aligned} $$

The probability is approximately \(0.3020\). The model follows from the fixed number of independent tests, not merely from the fact that the outcome is a count.

Worked Example: Sampling Without Replacement

A box contains 20 components, 6 of which are defective. Four components are selected uniformly at random without replacement. Let \(X\) be the number of defective components selected. Find the probability that exactly two are defective.

The population size and sample size are fixed, and selection is without replacement, so \(X\) is hypergeometric with \(N=20\), \(K=6\), and \(m=4\). There are \(\binom{20}{4}\) possible samples. For exactly two defectives, choose two from the six defective components and two from the 14 good components:

$$ \begin{aligned} P(X=2) &=\frac{\binom{6}{2}\binom{14}{2}}{\binom{20}{4}}\\ &=\frac{15\cdot91}{4845}\\ &=\frac{1365}{4845} =\frac{91}{323} \approx 0.2817. \end{aligned} $$

The denominator counts every possible sample of four, and the numerator counts exactly those with two defective components. Treating the four selections as independent would ignore the changing composition of the box after each draw.

Worked Example: Waiting for the Third Success

A machine produces an acceptable part with probability \(p=0.4\) on each independent production attempt. Let \(Y\) be the number of unacceptable parts produced before the third acceptable part. Find the probability that \(Y=4\).

The target is three successes, and the count records failures before that target, so \(Y\) is negative binomial with \(r=3\). The third success must occur on the seventh attempt. Among the first six attempts, two must be successes and four failures. Therefore,

$$ \begin{aligned} P(Y=4) &=\binom{4+3-1}{3-1}(0.4)^3(0.6)^4\\ &=\binom{6}{2}(0.064)(0.1296)\\ &=15(0.0082944)\\ &=0.124416. \end{aligned} $$

If the story instead asked for the number of failures before the first acceptable part, the target would be one success and the model would be geometric. The stopping rule, not the type of object being counted, distinguishes the two.

Worked Example: Events in a Fixed Exposure Interval

Calls arrive at a support desk according to a constant-rate Poisson process averaging 3 calls per hour. Find the probability of at least two calls in the next 30 minutes.

The exposure is half an hour. The Poisson mean over this interval is the rate multiplied by exposure, \(\lambda=3(0.5)=1.5\). If \(X\) is the number of calls in the interval, then \(X\sim\operatorname{Poisson}(1.5)\). It is simpler to subtract the probabilities of zero and one call from one:

$$ \begin{aligned} P(X\geq2) &=1-P(X=0)-P(X=1)\\ &=1-e^{-1.5}-e^{-1.5}(1.5)\\ &=1-2.5e^{-1.5}\\ &\approx 1-2.5(0.22313)\\ &\approx 0.4422. \end{aligned} $$

The half-hour mean is \(1.5\), not \(3\), because the stated rate is per hour. The Poisson model also depends on the constant-rate event assumptions in the story.

A Practical Selection Process

When a word problem does not name a distribution, identify the mechanism before writing a probability formula. The following sequence keeps the most important distinctions in view.

1
Ask whether the number of opportunities is fixed.
If there are \(n\) trials and the question counts successes, investigate a binomial model when the trials are independent with a common success probability. For a fixed-size sample from a finite population without replacement, investigate a hypergeometric model.
2
If exposure is fixed, identify the event process.
Counts over time, distance, or another exposure can be Poisson when events follow a stable-rate Poisson process. Convert the rate to the specified exposure before calculating.
3
If the number of trials is random, identify the stopping rule.
Independent Bernoulli trials stopped at the first success give a geometric failure count. Stopping at the \(r\)th success gives a negative-binomial failure count.
4
Check that the variable matches the model’s count.
Confirm whether the question asks for successes, failures before a success, or the number of events in an exposure interval. Then use the appropriate support and probability formula.

Why Similar Stories Can Require Different Models

Suppose a quality-control study counts defective items in a group of four. If the four items are independent production outcomes with a stable defect probability, the binomial mechanism may apply. If four items are drawn without replacement from a specified batch containing a fixed number of defectives, the hypergeometric mechanism applies. The observed variable has the same description in both cases, but the sampling design is different.

Likewise, a fixed number of trials and a fixed target number of successes are not interchangeable. In the binomial setting, the number of trials is set first and the number of successes varies. In the waiting-time setting, the number of successes is set first and the number of trials varies. A problem that says “until” often signals a stopping rule, but the target must still be identified.

Common Mistakes

  • Choosing from the variable’s name alone. “Number of successes” does not automatically mean binomial. Check whether sampling is independent or without replacement.
  • Using a hypergeometric model for independent trials. A finite source does not by itself imply hypergeometric sampling; the sample must be drawn from that finite population without replacement.
  • Using a Poisson model because the count is small or rare. A Poisson count is grounded in a fixed exposure and an appropriate rate-based event mechanism. Rarity alone does not establish that mechanism.
  • Confusing a fixed trial count with a stopping rule. A binomial count fixes the number of trials; geometric and negative-binomial counts fix the target number of successes.
  • Forgetting what a waiting-time variable counts. Here geometric and negative-binomial variables count failures before the target success. The number of trials would instead be the failure count plus the number of successes required.
Key takeaway: Choose a count distribution by reading the sampling mechanism: fixed independent trials suggest binomial, finite sampling without replacement suggests hypergeometric, fixed exposure under a Poisson process suggests Poisson, and Bernoulli trials stopped at a success target suggest geometric or negative binomial.

Check Your Understanding

For each story, identify the most appropriate model and state the mechanism that supports your choice.

  1. A fair die is rolled 12 times, and the number of rolls showing six is recorded.
  2. Five cards are selected without replacement from a standard deck, and the number of hearts is counted.
  3. A laboratory records the number of contamination events in one hour under a stable-rate Poisson process.
  4. Independent Bernoulli trials continue until the first success. What does the geometric variable count under the convention used here?
  5. Independent trials continue until the fourth success. Explain which quantity is fixed and which quantity is random in the negative-binomial model.