Object Library > Applets > Coin Die Experiment

Coin Die Experiment


Description and Use

The coin die experiment consists of first tossing a coin, and then rolling a red die if the coin lands head or a green die if the coin lands tails. The coin score I (1 for heads and 0 for tails) and the die score X are recorded on each update. The probability distribution that governs the red die and the distribution that governs the green die can be specified separately by clicking on the die probability buttons; these buttons bring up the die probability dialog box. You can define your own distribution by typing probabilities into the text fields of the dialog box, or you can click on one of the buttons in the dialog box to specify one of the following special distributions:

The probability of heads p for the coin can be varied with a scroll bar. The density and moments of X are shown in blue in the graph and are recorded in the second table. On each update, the empirical density and moments of X are shown in red in the graph and are recorded in the second table.

This experiment illustrates the mixture of two probability distributions in a simple. Problems involving conditional probability and Bayes' theorem can also be illustrated. For a more detailed mathematical analysis, see

Instructions for Downloading and Installing

Click on the link below to download the Java archive file:

To add the applet to your web page, insert the following in the html file, at the point where you want the applet to appear:

<applet code="edu.uah.math.experiments.CoinDieExperiment.class" archive="CoinDieExperiment.jar" width="500" 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.


Metadata

Type

Keywords

Version

Browser Requirements

Authors

Copyright

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.

Related Resources

If you are interested in the Java source code or the Java documentation and object model for this applet, please visit CoinDieExperiment in the Object section of the Library.