1. Virtual Laboratories
  2. Object Library
  3. Distributions
  4. DieDistribution

DieDistribution

Description

This class models the distribution for a standard 6-sided die. The class has methods for getting and setting the probabilities and for specifying several pre-defined distributions, corresponding to a fair die, a 1-6 flat die, a 2-5 flat die, a 3-4 flat die, a distribution skewed left, and a distribution skewed right. The class inherits methods from the parent FiniteDistribution and Distribution class for computing the probability density function, mean, variance, moments, distribution function, quantile function, generating function, and simulated value. Some of these methods are overridden to implement closed formulas or better algorithms. This object is used, for example, in the basic dice experiment.

Class Hierarchy

Code

The text area below gives the code for this object, so that you can browse the constructors, methods, and properties of the object. Of course, this source file is part of distributions.zip, which contains the source and resource files for all objects in the distributions class.