|
||||||||||
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.DiscreteArcsineDistribution
public class DiscreteArcsineDistribution
This class models the discrete arcsine distribution. The distribution governs the last zero in a symmetric random walk on an interval.
Field Summary |
---|
Fields inherited from class edu.uah.math.distributions.Distribution |
---|
CONTINUOUS, DISCRETE, MIXED |
Constructor Summary | |
---|---|
DiscreteArcsineDistribution()
This default constructor creates a new discrete arcsine distribution with 10 steps. |
|
DiscreteArcsineDistribution(int n)
This general constructor creates a new discrete arcsine distribution with a specified number of steps. |
Method Summary | |
---|---|
double |
getDensity(double x)
This method computes the probability density function. |
double |
getMaxDensity()
This method computes the maximum value of the density function. |
double |
getMean()
This method computes the mean of the distribution. |
int |
getSteps()
This method gets the steps, the number of steps. |
void |
setSteps(int n)
This method sets the steps, the number of steps, and then defines the default domain. |
double |
simulate()
This method simulates a value from the distribution, by simulating a random walk on the interval and computing the time of the last zero. |
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.Distribution |
---|
getCDF, getDomain, getFailureRate, getMedian, getMGF, getMoment, getMoment, getPGF, getQuantile, getSD, getType, getVariance, setDomain, setDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DiscreteArcsineDistribution(int n)
n
- the number of stepspublic DiscreteArcsineDistribution()
Method Detail |
---|
public void setSteps(int n)
n
- the number of stepspublic double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distribution
public double getMaxDensity()
getMaxDensity
in class Distribution
public int getSteps()
public double getMean()
getMean
in class Distribution
public double simulate()
simulate
in class Distribution
public java.lang.String toString()
toString
in class Distribution
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |