|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.ucla.stat.SOCR.core.SOCRValueSettable edu.ucla.stat.SOCR.core.Distribution edu.ucla.stat.SOCR.distributions.BinomialRandomNDistribution
public class BinomialRandomNDistribution
The binomial distribution with a random number of trials
Field Summary |
---|
Fields inherited from class edu.ucla.stat.SOCR.core.Distribution |
---|
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name |
Constructor Summary | |
---|---|
BinomialRandomNDistribution()
This default constructor: creates a new randomized binomial distribution with probability of success 0.5 and the uniform distribution on {1, 2, 3, 4, 5, 6} for the number of trials |
|
BinomialRandomNDistribution(Distribution d,
double p)
This general constructor creates a new randomized binomial distribution with a specified probability of success and a specified distribution for the number of trials |
|
BinomialRandomNDistribution(double p)
Special constructor: creates a new randomized binomial distribution with a specified probability of success and the uniform distribution on {1, 2, 3, 4, 5, 6} for the number of trials |
Method Summary | |
---|---|
double |
getDensity(double x)
The getDensity method is abstract and must be overridden for any specific distribuiton |
double |
getMean()
This method returns a default approximate mean, based on the finite set of domain values. |
double |
getVariance()
This method returns a default approximate variance. |
void |
setParameters(Distribution d,
double p)
Set the parameters: the distribution for the number of trials and the probability of success |
double |
simulate()
This method computes a default simulation of a value from the distribution, as a random getQuantile. |
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 |
---|
public BinomialRandomNDistribution(Distribution d, double p)
public BinomialRandomNDistribution(double p)
public BinomialRandomNDistribution()
Method Detail |
---|
public void setParameters(Distribution d, double p)
public double getDensity(double x)
Distribution
getDensity
in class Distribution
public double getMean()
Distribution
getMean
in class Distribution
public double getVariance()
Distribution
getVariance
in class Distribution
public double simulate()
Distribution
simulate
in class Distribution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |