|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uah.math.distributions.Distribution
edu.uah.math.distributions.LocationScaleDistribution
public class LocationScaleDistribution
This class applies a location-scale tranformation to a given distribution. In terms of the corresponding random variable X, the transformation is Y = a + bX.
| Field Summary |
|---|
| Fields inherited from class edu.uah.math.distributions.Distribution |
|---|
CONTINUOUS, DISCRETE, MIXED |
| Constructor Summary | |
|---|---|
LocationScaleDistribution()
This default constructor creates a new location-scale distribution on the normal distribution with location parameter 0 and scale parameter 1. |
|
LocationScaleDistribution(Distribution d,
double a,
double b)
This general constructor creates a new location-scale transformation on a given distribuiton with given location and scale parameters. |
|
| Method Summary | |
|---|---|
double |
getCDF(double x)
This method returns the cumulative distribution function of the location- scale distribution in terms of the CDF of the given distribution and the location and scale parameters. |
double |
getDensity(double x)
This method computes the probability density function of the location-scale distribution in terms of the location and scale parameters and the density function of the given distribution. |
Distribution |
getDistribution()
This method gets the underlying distribution that is being moved and scaled. |
double |
getLocation()
This method returns the location parameter. |
double |
getMaxDensity()
This method returns the maximum value of the probability density function of the location-scale distribution, which is the same as the maximum value of the probability density function of the given distribution. |
double |
getMean()
This mtehod computes the mean of the location-scale distribution in terms of the mean of the given distribution and the location and scale parameters. |
double |
getQuantile(double p)
This method returns the quantile function of the location-scale distribution in terms of the quantile function of the given distribution and the location and scale parameters. |
double |
getScale()
This method gets the scale parameter |
double |
getVariance()
This method returns the variance of the location-scale distribution in terms of the given distribution and the location and scale parameters. |
void |
setDistribution(Distribution d)
This method sets the distribution to be moved and scaled. |
void |
setLocation(double a)
This method sets the location parameter. |
void |
setParameters(Distribution d,
double a,
double b)
This method sets the parameters, the distribution and the location and scale parameters, and sets up the domain. |
void |
setScale(double b)
This method sets the scale parameter. |
double |
simulate()
This method returns a simulated value from the location-scale distribution in terms of the given distribution and the location and scale parameters. |
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 |
|---|
getDomain, getFailureRate, getMedian, getMGF, getMoment, getMoment, getPGF, getSD, getType, setDomain, setDomain |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocationScaleDistribution(Distribution d,
double a,
double b)
d - the distributiona - the location parameterb - the scale parameterpublic LocationScaleDistribution()
| Method Detail |
|---|
public void setParameters(Distribution d,
double a,
double b)
d - the distributiona - the location parameterb - the scale parameterpublic double getDensity(double x)
getDensity in class Distributionx - a number in the domain of the distribution
public double getMaxDensity()
getMaxDensity in class Distributionpublic double getMean()
getMean in class Distributionpublic double getVariance()
getVariance in class Distributionpublic double simulate()
simulate in class Distributionpublic double getCDF(double x)
getCDF in class Distributionx - a number in the domain of the distribution
public double getQuantile(double p)
getQuantile in class Distributionp - a probability in (0, 1)
public void setLocation(double a)
a - the location parameterpublic double getLocation()
public void setScale(double b)
b - the scale parameterpublic double getScale()
public void setDistribution(Distribution d)
d - the distributionpublic Distribution getDistribution()
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 | |||||||||