|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.distribution.DistributionFactory
This factory provids the means to create common statistical distributions. The following distributions are supported:
DistributionFactory factory = DistributionFactory.newInstance(); // create a Chi-Square distribution with 5 degrees of freedom. ChiSquaredDistribution chi = factory.createChiSquareDistribution(5.0);
Constructor Summary | |
protected |
DistributionFactory()
Default constructor. |
Method Summary | |
abstract BinomialDistribution |
createBinomialDistribution(int numberOfTrials,
double probabilityOfSuccess)
Create a binomial distribution with the given number of trials and probability of success. |
abstract ChiSquaredDistribution |
createChiSquareDistribution(double degreesOfFreedom)
Create a new chi-square distribution with the given degrees of freedom. |
abstract ExponentialDistribution |
createExponentialDistribution(double mean)
Create a new exponential distribution with the given degrees of freedom. |
abstract FDistribution |
createFDistribution(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom)
Create a new F-distribution with the given degrees of freedom. |
abstract GammaDistribution |
createGammaDistribution(double alpha,
double beta)
Create a new gamma distribution with the given alpha and beta values. |
abstract HypergeometricDistribution |
createHypergeometricDistribution(int populationSize,
int numberOfSuccesses,
int sampleSize)
Create a new hypergeometric distribution with the given the population size, the number of successes in the population, and the sample size. |
abstract TDistribution |
createTDistribution(double degreesOfFreedom)
Create a new t distribution with the given degrees of freedom. |
static DistributionFactory |
newInstance()
Create an instance of a DistributionFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected DistributionFactory()
Method Detail |
public static DistributionFactory newInstance()
DistributionFactory
public abstract BinomialDistribution createBinomialDistribution(int numberOfTrials, double probabilityOfSuccess)
numberOfTrials
- the number of trials.probabilityOfSuccess
- the probability of success.
public abstract ChiSquaredDistribution createChiSquareDistribution(double degreesOfFreedom)
degreesOfFreedom
- degrees of freedom.
public abstract ExponentialDistribution createExponentialDistribution(double mean)
mean
- mean.
public abstract FDistribution createFDistribution(double numeratorDegreesOfFreedom, double denominatorDegreesOfFreedom)
numeratorDegreesOfFreedom
- numerator degrees of freedom.denominatorDegreesOfFreedom
- denominator degrees of freedom.
public abstract GammaDistribution createGammaDistribution(double alpha, double beta)
alpha
- the shape parameter.beta
- the scale parameter.
public abstract TDistribution createTDistribution(double degreesOfFreedom)
degreesOfFreedom
- degrees of freedom.
public abstract HypergeometricDistribution createHypergeometricDistribution(int populationSize, int numberOfSuccesses, int sampleSize)
populationSize
- the population size.numberOfSuccesses
- number of successes in the population.sampleSize
- the sample size.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |