public class ConvolutionDistribution extends Distribution implements java.io.Serializable
CONTINUOUS, DISCRETE, MIXED
Constructor and Description |
---|
ConvolutionDistribution()
This defalut constructor creates a new convolution distribution corrrepsonding to
the uniform distribution on (0,1), with convolution power 5.
|
ConvolutionDistribution(Distribution d,
int n)
This general constructor: creates a new convolution distribution corresponding
to a specified distribution and convolution power.
|
Modifier and Type | Method and Description |
---|---|
double |
getDensity(double x)
This method computes the probability density function.
|
Distribution |
getDistribution()
This method returns the distribution.
|
double |
getMean()
This method computes the mean of the convolution distribution in terms of the
mean of the given distribution and the convolution power.
|
double |
getMGF(double t)
This method computes the moment generating function of the convolution distribution
in terms of the moment generating function of the given distribution and the
convolution power.
|
int |
getPower()
This method returns the convolution power.
|
double |
getVariance()
This method computes the variance of the convolution distribution in terms of the
variance of the given distribution and the convolution power.
|
void |
setDistribution(Distribution d)
This method sets the distribution.
|
void |
setParameters(Distribution d,
int n)
This method sets the parameters: the distribution and convolution power.
|
void |
setPower(int n)
This method sets the convolution power.
|
double |
simulate()
This method simulates a value from the convolution distribution by computing a sum
of simulated values from the given distribuiton.
|
java.lang.String |
toString()
This method returns a string that gives the name of the distribution and the values of
the parameters.
|
getCDF, getDomain, getFailureRate, getMaxDensity, getMedian, getMoment, getMoment, getPGF, getQuantile, getSD, getType, setDomain, setDomain
public ConvolutionDistribution(Distribution d, int n)
d
- the distributionn
- the covolution powerpublic ConvolutionDistribution()
public void setParameters(Distribution d, int n)
d
- the distributionn
- the covolution powerpublic double getDensity(double x)
getDensity
in class Distribution
x
- a number in the domain of the distributionpublic double getMean()
getMean
in class Distribution
public double getVariance()
getVariance
in class Distribution
public double getMGF(double t)
getMGF
in class Distribution
t
- a real numberpublic double simulate()
simulate
in class Distribution
public void setPower(int n)
n
- the convolution powerpublic int getPower()
public void setDistribution(Distribution d)
d
- the distribution to be convolvedpublic Distribution getDistribution()
public java.lang.String toString()
toString
in class Distribution