|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uah.math.distributions.Distribution edu.uah.math.distributions.BinomialDistribution edu.uah.math.distributions.BernoulliDistribution
public class BernoulliDistribution
This class models the Bernoulli distribution with a specified parameter. This is the distribution of an indicator random variable (taking values 0 and 1).
Field Summary |
---|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
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 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. |
Methods inherited from class edu.uah.math.distributions.BinomialDistribution |
---|
getCDF, getDensity, getFactorialMoment, getMean, getMGF, getPGF, getProbability, getTrials, getVariance, setParameters, setProbability, simulate |
Methods inherited from class edu.uah.math.distributions.Distribution |
---|
getDomain, getFailureRate, getMedian, getMoment, getMoment, getQuantile, getSD, getType, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BernoulliDistribution(double p)
p
- the probaiblity of 1public BernoulliDistribution()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |