public class BernoulliDistribution extends BinomialDistribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
double |
getMaxDensity()
This method returns the maximum value of the probability density function.
|
void |
setTrials(int n)
This method sets the number of trials, which is always 1.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
getCDF, getDensity, getFactorialMoment, getMean, getMGF, getPGF, getProbability, getTrials, getVariance, setParameters, setProbability, simulate
getDomain, getFailureRate, getMedian, getMoment, getMoment, getQuantile, getSD, getType, setDomain, setDomain
public BernoulliDistribution(double p)
p
- the probaiblity of 1public BernoulliDistribution()
public double getMaxDensity()
getMaxDensity
in class BinomialDistribution
public void setTrials(int n)
setTrials
in class BinomialDistribution
n
- the number of trials.public java.lang.String toString()
toString
in class BinomialDistribution