|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math.distribution.DistributionFactory
public abstract class 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()
Deprecated. Default constructor. |
Method Summary | |
---|---|
abstract BinomialDistribution |
createBinomialDistribution(int numberOfTrials,
double probabilityOfSuccess)
Deprecated. Create a binomial distribution with the given number of trials and probability of success. |
CauchyDistribution |
createCauchyDistribution(double median,
double scale)
Deprecated. Create a new cauchy distribution with the given median and scale. |
abstract ChiSquaredDistribution |
createChiSquareDistribution(double degreesOfFreedom)
Deprecated. Create a new chi-square distribution with the given degrees of freedom. |
abstract ExponentialDistribution |
createExponentialDistribution(double mean)
Deprecated. Create a new exponential distribution with the given degrees of freedom. |
abstract FDistribution |
createFDistribution(double numeratorDegreesOfFreedom,
double denominatorDegreesOfFreedom)
Deprecated. Create a new F-distribution with the given degrees of freedom. |
abstract GammaDistribution |
createGammaDistribution(double alpha,
double beta)
Deprecated. Create a new gamma distribution with the given shape and scale parameters. |
abstract HypergeometricDistribution |
createHypergeometricDistribution(int populationSize,
int numberOfSuccesses,
int sampleSize)
Deprecated. Create a new hypergeometric distribution with the given the population size, the number of successes in the population, and the sample size. |
abstract NormalDistribution |
createNormalDistribution()
Deprecated. Create a new normal distribution with mean zero and standard deviation one. |
abstract NormalDistribution |
createNormalDistribution(double mean,
double sd)
Deprecated. Create a new normal distribution with the given mean and standard deviation. |
PascalDistribution |
createPascalDistribution(int numberOfSuccesses,
double probabilityOfSuccess)
Deprecated. Create a Pascal distribution with the given number of successes and probability of success. |
abstract PoissonDistribution |
createPoissonDistribution(double lambda)
Deprecated. Create a new Poisson distribution with poisson parameter lambda. |
abstract TDistribution |
createTDistribution(double degreesOfFreedom)
Deprecated. Create a new t distribution with the given degrees of freedom. |
WeibullDistribution |
createWeibullDistribution(double alpha,
double beta)
Deprecated. Create a new Weibull distribution with the given shape and scale parameters. |
static DistributionFactory |
newInstance()
Deprecated. 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 PascalDistribution createPascalDistribution(int numberOfSuccesses, double probabilityOfSuccess)
numberOfSuccesses
- the number of successes.probabilityOfSuccess
- the probability of success
public CauchyDistribution createCauchyDistribution(double median, double scale)
median
- the median of the distributionscale
- the scale
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 freedomdenominatorDegreesOfFreedom
- denominator degrees of freedom
public abstract GammaDistribution createGammaDistribution(double alpha, double beta)
alpha
- the shape parameterbeta
- 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 sizenumberOfSuccesses
- number of successes in the populationsampleSize
- the sample size
public abstract NormalDistribution createNormalDistribution(double mean, double sd)
mean
- the mean of the distributionsd
- standard deviation
public abstract NormalDistribution createNormalDistribution()
public abstract PoissonDistribution createPoissonDistribution(double lambda)
lambda
- poisson parameter
public WeibullDistribution createWeibullDistribution(double alpha, double beta)
alpha
- the shape parameter.beta
- the scale parameter.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |