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

PolyaDistribution

Description

This class models the Pólya urn expeirment with specified parameter values. A sample of size n chosen according from an urn that initially has a red and b green balls. In Pólya's scheme, each time a ball is chosen, it is replaced in the urn along with s new balls of the same color. The class has methods for getting and setting the parameters and for computing the probability density function. The class inherits methods from the parent Distribution class for computing the 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 Pólya's urn 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.