Binomial DistributionVSHypergeometric Distribution
Binomial Distribution
To understand binomial distributions and binomial probability, it is good to understand binomial experiments and some associated notation; so we cover those topics first.
Binomial Experiment
A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties:
- The experiment consists of n repeated trials.
- Each trial can result in just two possible outcomes. We call one of these outcomes a success and the other, a failure.
- The probability of success, denoted by P, is the same on every trial.
- The trials are independent; that is, the outcome on one trial does not affect the outcome on other trials.
Consider the following statistical experiment. You flip a coin 2 times and count the number of times the coin lands on heads. This is a binomial experiment because:
- The experiment consists of repeated trials. We flip a coin 2 times.
- Each trial can result in just two possible outcomes - heads or tails.
- The probability of success is constant - 0.5 on every trial.
- The trials are independent; that is, getting heads on one trial does not affect whether we get heads on other trials.
Notation
The following notation is helpful, when we talk about binomial probability.
- x: The number of successes that result from the binomial experiment.
- n: The number of trials in the binomial experiment.
- P: The probability of success on an individual trial.
- Q: The probability of failure on an individual trial. (This is equal to 1 - P.)
- b(x; n, P): Binomial probability - the probability that an n-trial binomial experiment results in exactly x successes, when the probability of success on an individual trial is P.
- nCr: The number of combinations of n things, taken r at a time.
Binomial Distribution
A binomial random variable is the number of successes x in n repeated trials of a binomial experiment. The probability distribution of a binomial random variable is called a binomial distribution (also known as a Bernoulli distribution).
Suppose we flip a coin two times and count the number of heads (successes). The binomial random variable is the number of heads, which can take on values of 0-head, 1-head, or 2-heads. The binomial distribution is presented below.
Number of heads / Probability0 / 0.25
1 / 0.50
2 / 0.25
The binomial distribution has the following properties:
- The mean of the distribution (μx) is equal to n * P.
- The variance (σ2x) is n * P * ( 1 - P ).
- The standard deviation (σx) is sqrt[ n * P * ( 1 - P ) ].
Binomial Probability
The binomial probability refers to the probability that a binomial experiment results in exactly x successes. For example, in the above table, we see that the binomial probability of getting exactly one head in two coin flips is 0.50.
Given x, n, and P, we can compute the binomial probability based on the following formula:
Binomial Formula. Suppose a binomial experiment consists of n trials and results in x successes. If the probability of success on an individual trial is P, then the binomial probability is:
b(x; n, P) = nCx * Px * (1 - P)n - x
Example 1
Suppose a die is tossed 5 times. What is the probability of getting exactly 2 fours?
Solution: This is a binomial experiment in which the number of trials is equal to 5, the number of successes is equal to 2, and the probability of success on a single trial is 1/6 or about 0.167. Therefore, the binomial probability is:
b(2; 5, 0.167) = 5C2 * (0.167)2 * (0.833)3
b(2; 5, 0.167) = 0.161
Hypergeometric Distribution
This lesson covers hypergeometric experiments, hypergeometric distributions, and hypergeometric probability.
Hypergeometric Experiments
A hypergeometric experiment is a statistical experiment that has the following properties:
- A sample of size n is randomly selected without replacement from a population of N items.
- In the population, k items can be classified as successes, and N - k items can be classified as failures.
Consider the following statistical experiment. You have an urn of 10 marbles - 5 red and 5 green. You randomly select 2 marbles without replacement and count the number of red marbles you have selected. This would be a hypergeometric experiment.
Note that it would not be a binomial experiment. A binomial experiment requires that the probability of success be constant on every trial. With the above experiment, the probability of a success changes on every trial. In the beginning, the probability of selecting a red marble is 5/10. If you select a red marble on the first trial, the probability of selecting a red marble on the second trial is 4/9. And if you select a green marble on the first trial, the probability of selecting a red marble on the second trial is 5/9.
Note further that if you selected the marbles with replacement, the probability of success would not change. It would be 5/10 on every trial. Then, this would be a binomial experiment.
Notation
The following notation is helpful, when we talk about hypergeometric distributions and hypergeometric probability.
N: The number of items in the population.
k: The number of items in the population that are classified as successes.
n: The number of items in the sample.
x: The number of items in the sample that are classified as successes.
kCx: The number of combinations of k things, taken x at a time.
h(x; N, n, k): hypergeometric probability - the probability that an n-trial hypergeometric experiment results in exactly x successes, when the population consists of N items, k of which are classified as successes.
Hypergeometric Distribution
A hypergeometric random variable is the number of successes that result from a hypergeometric experiment. The probability distribution of a hypergeometric random variable is called a hypergeometric distribution.
Given x, N, n, and k, we can compute the hypergeometric probability based on the following formula:
Hypergeometric Formula. Suppose a population consists of N items, k of which are successes. And a random sample drawn from that population consists of n items, x of which are successes. Then the hypergeometric probability is:
h(x; N, n, k) = [ kCx ] [ N-kCn-x ] / [ NCn ]
The hypergeometric distribution has the following properties:
- The mean of the distribution is equal to n * k / N .
- The variance is n * k * ( N - k ) * ( N - n ) / [ N2 * ( N - 1 ) ] .
Example 1:
Suppose we randomly select 5 cards without replacement from an ordinary deck of playing cards. What is the probability of getting exactly 2 red cards (i.e., hearts or diamonds)?
Solution: This is a hypergeometric experiment in which we know the following:
N = 52; since there are 52 cards in a deck.
k = 26; since there are 26 red cards in a deck.
n = 5; since we randomly select 5 cards from the deck.
x = 2; since 2 of the cards we select are red.
We plug these values into the hypergeometric formula as follows:
h(x; N, n, k) = [ kCx ] [ N-kCn-x ] / [ NCn ]
h(2; 52, 5, 26) = [ 26C2 ] [ 26C3 ] / [ 52C5 ]
h(2; 52, 5, 26) = [ 325 ] [ 2600 ] / [ 2,598,960 ] = 0.32513
Thus, the probability of randomly selecting 2 red cards is 0.32513.
+ + +
The relationship between binomial and hypergeometric distribution
(The Binomial Approximation to the Hypergeometric)
(Another example) Suppose we still have the population of size N with M units labeled as ``success'' and N-M labeled as ``failure,'' but now we take a sample of size n is drawn with replacement. Then, with each draw, the units remaining to be drawn look the same: still M ``successes'' and N-M ``failures.'' Thus, the probability of drawing a ``success'' on each single draw is
and this doesn't change. When we were drawing without replacement, the proportions of successes would change, depending on the result of previous draws. For example, if we were to obtain a ``success'' on the first draw, then the proportion of ``successes'' for the second draw would be (M-1)/(N-1), whereas if we were to obtain a ``failure'' on the first draw the proportion of successes for the second draw would be M/(N-1). In practice, this means that we can approximate the hypergeometric probabilities with binomial probabilities, provided.
As a rule of thumb, if the population size is more than 20 times the sample size (N > 20 n), then we may use binomial probabilities in place of hypergeometric probabilities.