The Hypergeometric Distribution
The hypergeometric distribution arises when a random selection (without repetition) is made among objects of two distinct types. Typical examples:- Choose a team of 8 from a group of 10 boys and 7 girls
- Choose a committee of five from the legislature consisting of 52 Democrats and 48 Republicans
f(x) = C(R,x)*C(N-R, k-x) / C(N,k) for x=max(0,k+R-N)..min(R,k)
where C(n,k) is the binomial coeffiecient.
To Play:
Choose numbers by clicking on the cells. These numbers will be indicated by magenta backgrounds. Hit the "play" button and the computer will choose the winning numbers (indicated by red backgrounds). The random variable X is the number of matches between your choices, indicated by gold backgrounds.
NOTE: This applet should work with the java 1.4 plugin.
The applet will appear in a separate window.
Source Code
This applet uses the Danby package in additon to the following java files:- LottoApplet.java
- LottoBoard.java
- LottoModel.java
- LottoSquare.java
- RoundGradientContext.java
- RoundGradientPaint.java
Other Java Programs for Probability and Statistics
Other applets related to probability and statistics.The Calico Stat java programs for statistics
This applet was written by Charles Stanton