edu.ucla.stat.SOCR.distributions
Class BernoulliDistribution

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.BinomialDistribution
              extended by edu.ucla.stat.SOCR.distributions.BernoulliDistribution
All Implemented Interfaces:
IValueSettable, Pluginable, java.util.Observer

public class BernoulliDistribution
extends BinomialDistribution

The Bernoulli distribution with parameter p http://mathworld.wolfram.com/BernoulliDistribution.html .


Field Summary
 
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name
 
Constructor Summary
BernoulliDistribution()
          This default constructor creates a new Bernoulli distribution with parameter p = 0.5
BernoulliDistribution(double p)
          This general constructor creates a new Bernoulli distribution with a specified parameter
 
Method Summary
 double getMaxDensity()
          This method returns the maximum value of the getDensity function
 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 setTrials(int n)
          This method overrides the corresponding method in BinomialDistribution so that the number of trials 1 cannot be changed
 void valueChanged()
           
 
Methods inherited from class edu.ucla.stat.SOCR.distributions.BinomialDistribution
getCDF, getDensity, getMean, getMGF, getMode, getPGF, getProbability, getSD, getTrials, getVariance, inverseCDF, paramEstimate, setParameters, setProbability, simulate
 
Methods inherited from class edu.ucla.stat.SOCR.core.Distribution
addObserver, betaCDF, comb, factorial, findGFRoot, findRoot, gamma, gammaCDF, getDisplayPane, getDomain, getFailureRate, getGFDerivative, getGFSecondDerivative, getInstance, getLocalHelp, getMean, getMedian, getMgfDomain, getName, getPGFDomain, getQuantile, getSampleMoment, getSOCRDistributionFunctors, getSOCRDistributions, getType, getVariance, logGamma, perm, sampleMean, sampleVar, setApplet, setDomain, setDomain, setMGFDomain, setMGFDomain, setMGFParameters, setMGFParameters, setMGFParameters, setMGFParameters, setParameters, setPGFDomain, setPGFDomain, setPGFParameters, setPGFParameters, setPGFParameters, setPGFParameters, update, valueChanged
 
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
 

Constructor Detail

BernoulliDistribution

public BernoulliDistribution()
This default constructor creates a new Bernoulli distribution with parameter p = 0.5


BernoulliDistribution

public BernoulliDistribution(double p)
This general constructor creates a new Bernoulli distribution with a specified parameter

Method Detail

initialize

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

Overrides:
initialize in class BinomialDistribution

valueChanged

public void valueChanged()
Overrides:
valueChanged in class BinomialDistribution

setTrials

public void setTrials(int n)
This method overrides the corresponding method in BinomialDistribution so that the number of trials 1 cannot be changed

Overrides:
setTrials in class BinomialDistribution

getMaxDensity

public double getMaxDensity()
This method returns the maximum value of the getDensity function

Overrides:
getMaxDensity in class BinomialDistribution

getOnlineDescription

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

Overrides:
getOnlineDescription in class BinomialDistribution