|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.ucla.stat.SOCR.core.SOCRValueSettable
edu.ucla.stat.SOCR.core.Distribution
edu.ucla.stat.SOCR.distributions.BinomialDistribution
public class BinomialDistribution
The binomial distribution with specified parameters: the number of trials (n) and the probability of success (p) http://mathworld.wolfram.com/BinomialDistribution.html .
| Field Summary |
|---|
| Fields inherited from class edu.ucla.stat.SOCR.core.Distribution |
|---|
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name |
| Constructor Summary | |
|---|---|
BinomialDistribution()
Default constructor: creates the binomial distribution with 10 trials and probability of success 1/2 |
|
BinomialDistribution(double[] distData)
|
|
BinomialDistribution(float[] distData)
|
|
BinomialDistribution(int n,
double p)
General constructor: creates the binomial distribution with specified parameters |
|
| Method Summary | |
|---|---|
double |
getCDF(double x)
Specify the CDF in terms of the beta CDF |
double |
getDensity(double x)
Define the binomial getDensity function |
double |
getMaxDensity()
Specify the maximum getDensity |
double |
getMean()
Give the mean in closed form |
double |
getMGF(double t)
Computes the moment generating function in closed form for a parameter t which lies in the domain of the distribution. |
double |
getMode()
Give the Mode in closed form |
java.lang.String |
getOnlineDescription()
This method returns an online description of this distribution. |
double |
getPGF(double t)
Computes the probability generating function in closed form for a parameter t which lies in the domain of the distribution. |
double |
getProbability()
Get the probability of success |
double |
getSD()
Specify the SD in close form |
int |
getTrials()
Get the number of trials |
double |
getVariance()
Specify the variance in close form |
void |
initialize()
used for some subclass to initialize before being used |
double |
inverseCDF(double probability)
Inverse of the cumulative Poisson distribution function. |
void |
paramEstimate(double[] distData)
overwrites the method in Distribution for estimating parameters |
void |
setParameters(int n,
double p)
Set the parameters |
void |
setProbability(double p)
Set the probability of success |
void |
setTrials(int n)
Set the number of trails |
double |
simulate()
Simulate the binomial distribution as the number of successes in n trials |
void |
valueChanged()
|
| 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 |
|---|
public BinomialDistribution()
public BinomialDistribution(int n,
double p)
public BinomialDistribution(double[] distData)
public BinomialDistribution(float[] distData)
| Method Detail |
|---|
public void initialize()
Distribution
initialize in class Distributionpublic void valueChanged()
valueChanged in class Distribution
public void setParameters(int n,
double p)
public void setTrials(int n)
public int getTrials()
public void setProbability(double p)
public double getProbability()
public double getDensity(double x)
getDensity in class Distributionpublic double getMaxDensity()
getMaxDensity in class Distributionpublic double getMean()
getMean in class Distributionpublic double getMode()
public double getVariance()
getVariance in class Distributionpublic double getSD()
getSD in class Distributionpublic double getMGF(double t)
getMGF in class Distributionpublic double getPGF(double t)
getPGF in class Distributionpublic double getCDF(double x)
getCDF in class Distributionpublic double inverseCDF(double probability)
inverseCDF in class Distributionprobability - - a probability value in [0, 1]
public double simulate()
simulate in class Distributionpublic void paramEstimate(double[] distData)
paramEstimate in class DistributiondistData - array of raw datapublic java.lang.String getOnlineDescription()
getOnlineDescription in class Distribution
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||