public class BinomialDistribution extends Distribution
applet, CONTINUOUS, DISCRETE, MAXMGFXVAL, MAXMGFYVAL, MINMGFXVAL, MIXED, name| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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() |
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, valueChangedcreateComponentSetter, createValueSetter, createValueSetter, createValueSetter, createValueSetter, getComponentSetter, getComponentSetters, getValueSetter, getValueSetterspublic BinomialDistribution()
public BinomialDistribution(int n,
double p)
public BinomialDistribution(double[] distData)
public BinomialDistribution(float[] distData)
public void initialize()
Distributioninitialize in class Distributionpublic void valueChanged()
valueChanged in class Distributionpublic 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