Object Library > Applets > Birthday Experiment
The birthday experiment is to draw a random sample of size n with replacement from a population of size m. In the applet, the population consists of m balls numbered from 1 to m. The random variables of interest are V, the number of distinct values in the sample, and I, the indicatoar variable that indicates at least one duplication in the sample. On each update, the sample of balls is shown in the urn graph; a ball that duplicates a previously chosen ball is shown in red, and otherwise is shown in green. The values of V and I are recorded on each update in the record table. The probability density function of the selected variable is shown in blue in the distribution graph and is recorded in the distribution table. On each update, the empirical density funciton of the selected variable is shown in red in the distribution graph and is recorded in the distribution table. The parameters m and n can be varied with scroll bars.
The birthday problem is a famous and conceptually simple. This experiment can be used to illustrate the concept of an event, the law of large numbers, and sampling with replacement. For more information on the mathematical analysis, see
Click on the link below to download the Java archive file:
To add the applet to your web page, insert the following to the html file at the point where you want the applet to appear:
<applet code="edu.uah.math.experiments.BirthdayExperiment.class"
archive="BirthdayExperiment.jar" width="600" height="400"></applet>
The jar file and the html file must be in the same folder.
This width and height dimensions are simply suggestions and can be varied. Generally, components such as graphs and tables expand and contract proportionally, while components such as buttons, scrollbars, dice, and coins are fixed in size.
Copyright © 2001-2003, Kyle Siegrist, Dawn Duehring
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.
If you are interested in the Java source code or the Java documentation and object model for this applet, please visit BirthdayExperiment in the Object section of the Library.