An online calculator to calculate the hypergeometric probability distribution and the probabilities of "at least" and "at most" associated to the hypergeometric probabilities, is presented.
A working example is solved manually below and then the values used in this example are the default values (when you first open this page) used in the calculator below to check the answers.
Working Example
There are 12 balls in a box with 7 of which are red and the remaining ones are black. Five balls are selected at random from the box.
a) What is the probability that 3 of the 5 balls selected are red?
b) What is the probability that at least 3 of the 5 balls selected are red?
c) What is the probability that 3 at most of the 5 balls selected are red?
Solution to Example
a) Given Total population has size: \( N = 12 \) , we may consider a red ball as a success, hence \( R = 7 \) and the number of selected balls from the whole population is: \( n = 5 \)
\( P(X = 3) = \dfrac{ \displaystyle {7 \choose 3} \displaystyle {12 - 7 \choose 5 - 3} }{ \displaystyle {12 \choose 5} } \)
\( = \dfrac{ \displaystyle {7 \choose 3} \displaystyle {5 \choose 2} }{ \displaystyle {12 \choose 5} } = 175 /396 \approx 0.4419 \)
b)
At least 3 red means \( x \) is either \( 3, 4,\; \text{or} \; 5\) or \( x \ge 3 \)
\( P(\text{at least 3}) = P(X \ge 3) = P( X = 3 \; or \; X = 4 \; or \; X = 5 ) \)
Using the addition formula
\( P(X \ge 3) = P(X = 3) + P(X = 4) + P(X = 5 ) \)
Using the hypergeometric formula, the above probability may be written as
\( = \dfrac{ {7 \choose 3} {12 - 7 \choose 5 - 3} }{ {12 \choose 5} } + \dfrac{ {7 \choose 4} {12 - 7 \choose 5 - 4} }{ {12 \choose 5} } + \dfrac{ {7 \choose 5} {12 - 7 \choose 5 - 5} }{ {12 \choose 5} } \)
\( = \dfrac{ {7 \choose 3} {5 \choose 2} }{ {12 \choose 5} } + \dfrac{ {7 \choose 4} {5 \choose 1} }{ {12 \choose 5} } + \dfrac{ {7 \choose 5} {5 \choose 0} }{ {12 \choose 5} } = 91/132 \approx 0.6894\)
c)
At most 3 red means \( x \) is either \( 0, 1, 2 \; \text{or} \; 3\) or \( x \le 3 \)
\( P(\text{at most 3}) = P(X \le 3) = P( X = 0 \; or \; X = 1 \; or \; X = 2 \; or \; X = 3 ) \)
Using the addition formula
\( P(X \le 3) = P(X = 0) + P(X = 1) + P(X = 2 ) + P(X = 3 ) = \)
Using the hypergeometric formula, the above probability may be written as
\( = \dfrac{ {7 \choose 0} {12 - 7 \choose 5 - 0} }{ {12 \choose 5} } + \dfrac{ {7 \choose 1} {12 - 7 \choose 5 - 1} }{ {12 \choose 5} } + \dfrac{ {7 \choose 2} {12 - 7 \choose 5 - 2} }{ {12 \choose 5} } + \dfrac{ {7 \choose 3} {12 - 7 \choose 5-3} }{ {12 \choose 5} } \)
\( = \dfrac{ {7 \choose 0} {5 \choose 5} }{ {12 \choose 5} } + \dfrac{ {7 \choose 1} {5 \choose 4} }{ {12 \choose 5} } + \dfrac{ {7 \choose 2} {5 \choose 3} }{ {12 \choose 5} } + \dfrac{ {7 \choose 3} {5 \choose 2} }{ {12 \choose 5} } = 149/198 \approx 0.7525\)
More on statistics tutorials.