DiceSample

This applet illustrates the central limit theorem by repeatedly rolling sets of dice. The example below rolls sets of three dice. Click on the "1 Roll" button several times to observe what is happening for a single roll. Then speed up the sampling by clicking on the "10 Rolls" and then the "1000 Rolls" buttons.

Larger Sample Size

An applet <param> specifies the number of dice in a roll. With a larger sample size (n = 12) in the applet below, the fit to the normal distribution is better and the standard deviation (standard error of the mean) is smaller.

Skewed Distributions

Similarly, the frequency distribuiton for the dice can have a skewed distribution as in the example below. The first applet rolls a single die so that you may observe the skewed distribution. The second applet rolls sets of 12 dice and again approaches a normal distribution, despite the underlying skewed distribution.

Rolling One Die with Skewed Distribution



Rolling 3 Dice with Skewed Distributions



Rolling 12 Dice with Skewed Distribution

HTML and Param tags

Below is sample code to place this applet on an html page. The codebase is specified relative to the html file and does not need to be "../../lib" as below.

  <applet code="com.bolderstats.wackerly.samplingDist.DiceSampleW.class"
    width="500" height="400" 
	codebase="../../lib" 
    archive="bolderstats_obf.jar,jmsl_obf.jar">
	<param name="DICE" value="12" />
	<param name="NORMAL" value="TRUE" />
	<param name="FREQ" value="6 5 4 3 2 1" />
	<param name="STATS" value="TRUE" />
   </applet>
 
DICE
number of dice to be rolled in one set. Default DICE = 2.
NORMAL
Indicates whether the comparison normal curve is displayed (TRUE) or not (FALSE, default).
FREQ
Relative frequency for the six faces, separated by spaces or commas. The relative frequencies need not be normalized. Default is equal frequency or "1 1 1 1 1 1".
STATS
Indicates whether the mean and the standard deviation for the sample are displayed (TRUE) or not (FALSE, default).