edu.uah.math.distributions
Class FiniteOrderStatisticDistribution

java.lang.Object
  extended by edu.uah.math.distributions.Distribution
      extended by edu.uah.math.distributions.FiniteOrderStatisticDistribution
All Implemented Interfaces:
java.io.Serializable

public class FiniteOrderStatisticDistribution
extends Distribution
implements java.io.Serializable

This class models the distribution of an order statistic for a sample chosen without replacement from {1, 2..., N} .

Version:
August, 2003
Author:
Kyle Siegrist, Dawn Duehring
See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.uah.math.distributions.Distribution
CONTINUOUS, DISCRETE, MIXED
 
Constructor Summary
FiniteOrderStatisticDistribution()
          This default constructor creates a new finite order statistic distribution with population size 50, sample size 10, and order 5.
FiniteOrderStatisticDistribution(int N, int n, int k)
          This general constructor creates a new finite order statistic distribution with specified population and sample sizes, and specified order.
 
Method Summary
 double getDensity(double x)
          This method computes the probability density function.
 double getMean()
          This method computes the mean of the distribution.
 int getOrder()
          This method returns the order.
 int getPopulationSize()
          This method returns the population size.
 int getSampleSize()
          This method returns the sample size.
 double getVariance()
          This method computes the variance of the distribution.
 void setOrder(int k)
          This method sets the order.
 void setParameters(int N, int n, int k)
          This method sets the parameters: the sample size, population size, and order.
 void setPopulationSize(int N)
          This method sets the population size.
 void setSampleSize(int n)
          This method sets the sample size.
 double simulate()
          This method simulates a value from the distribution.
 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, getMaxDensity, getMedian, getMGF, getMoment, getMoment, getPGF, getQuantile, getSD, getType, setDomain, setDomain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FiniteOrderStatisticDistribution

public FiniteOrderStatisticDistribution(int N,
                                        int n,
                                        int k)
This general constructor creates a new finite order statistic distribution with specified population and sample sizes, and specified order.

Parameters:
N - the population size
n - the sample size
k - the order

FiniteOrderStatisticDistribution

public FiniteOrderStatisticDistribution()
This default constructor creates a new finite order statistic distribution with population size 50, sample size 10, and order 5.

Method Detail

setParameters

public void setParameters(int N,
                          int n,
                          int k)
This method sets the parameters: the sample size, population size, and order. The default domain is also computed.

Parameters:
N - the population size
n - the sample size
k - the order

getDensity

public double getDensity(double x)
This method computes the probability density function.

Specified by:
getDensity in class Distribution
Parameters:
x - a number in the domain of the distribution
Returns:
the probability density at x

getMean

public double getMean()
This method computes the mean of the distribution.

Overrides:
getMean in class Distribution
Returns:
the mean

getVariance

public double getVariance()
This method computes the variance of the distribution.

Overrides:
getVariance in class Distribution
Returns:
the variance

simulate

public double simulate()
This method simulates a value from the distribution.

Overrides:
simulate in class Distribution
Returns:
a simulated value

setPopulationSize

public void setPopulationSize(int N)
This method sets the population size.

Parameters:
N - the population size

getPopulationSize

public int getPopulationSize()
This method returns the population size.

Returns:
the population size

setSampleSize

public void setSampleSize(int n)
This method sets the sample size.

Parameters:
n - the sample size

getSampleSize

public int getSampleSize()
This method returns the sample size.

Returns:
the sample size

setOrder

public void setOrder(int k)
This method sets the order.

Parameters:
k - the order

getOrder

public int getOrder()
This method returns the order.

Returns:
the order

toString

public java.lang.String toString()
This method returns a string that gives the name of the distribution and the values of the parameters.

Overrides:
toString in class Distribution
Returns:
a string giving the name of the distribution and the values of the parameters