edu.ucla.stat.SOCR.distributions
Class DieDistribution

java.lang.Object
  extended by edu.ucla.stat.SOCR.core.SOCRValueSettable
      extended by edu.ucla.stat.SOCR.core.Distribution
          extended by edu.ucla.stat.SOCR.distributions.FiniteDistribution
              extended by edu.ucla.stat.SOCR.distributions.DieDistribution
All Implemented Interfaces:
IValueSettable, Pluginable, java.util.Observer

public class DieDistribution
extends FiniteDistribution

Distribution for a standard 6-sided die


Field Summary
static int FAIR
           
static int FLAT16
           
static int FLAT25
           
static int FLAT34
           
static int LEFT
           
static int RIGHT
           
 
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
 
Constructor Summary
DieDistribution()
          Default constructor: creates a new fair die distribution
DieDistribution(double[] p)
          General Constructor: creates a new die distribution with specified probabilities
DieDistribution(int n)
          Special constructor: creates a new die distribution of a special type
 
Method Summary
 java.lang.String getOnlineDescription()
          This method returns an online description of this distribution.
 void initialize()
          used for some subclass to initialize before being used
 void setProbabilities(int n)
          Specify probabilities of a special type
 void valueChanged()
           
 void valueChanged(java.util.Observable o, java.lang.Object arg)
           
 
Methods inherited from class edu.ucla.stat.SOCR.distributions.FiniteDistribution
getDensity, getProbabilities, getProbability, setParameters, setProbabilities
 
Methods inherited from class edu.ucla.stat.SOCR.core.Distribution
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMaxDensity, getMean, getMean, getMedian, getMGF, getMgfDomain, getName, getPGF, getPGFDomain, getQuantile, getSampleMoment, getSD, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, getVariance, inverseCDF, logGamma, paramEstimate, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, simulate, update
 
Methods inherited from class edu.ucla.stat.SOCR.core.SOCRValueSettable
createComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FAIR

public static final int FAIR
See Also:
Constant Field Values

FLAT16

public static final int FLAT16
See Also:
Constant Field Values

FLAT25

public static final int FLAT25
See Also:
Constant Field Values

FLAT34

public static final int FLAT34
See Also:
Constant Field Values

LEFT

public static final int LEFT
See Also:
Constant Field Values

RIGHT

public static final int RIGHT
See Also:
Constant Field Values
Constructor Detail

DieDistribution

public DieDistribution(double[] p)
General Constructor: creates a new die distribution with specified probabilities


DieDistribution

public DieDistribution(int n)
Special constructor: creates a new die distribution of a special type


DieDistribution

public DieDistribution()
Default constructor: creates a new fair die distribution

Method Detail

initialize

public void initialize()
Description copied from class: Distribution
used for some subclass to initialize before being used

Overrides:
initialize in class FiniteDistribution

valueChanged

public void valueChanged()
Overrides:
valueChanged in class Distribution

valueChanged

public void valueChanged(java.util.Observable o,
                         java.lang.Object arg)
Overrides:
valueChanged in class FiniteDistribution

setProbabilities

public void setProbabilities(int n)
Specify probabilities of a special type


getOnlineDescription

public java.lang.String getOnlineDescription()
This method returns an online description of this distribution.

Overrides:
getOnlineDescription in class Distribution