|
|||||||||||
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. |
CauchyDistribution |
createCauchyDistribution(double median,
double scale)
Create a new cauchy distribution with the given median and scale. |
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 shape and scale parameters. |
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 NormalDistribution |
createNormalDistribution()
Create a new normal distribution with mean zero and standard deviation one. |
abstract NormalDistribution |
createNormalDistribution(double mean,
double sd)
Create a new normal distribution with the given mean and standard deviation. |
abstract PoissonDistribution |
createPoissonDistribution(double lambda)
Create a new Poisson distribution with poisson parameter lambda. |
abstract TDistribution |
createTDistribution(double degreesOfFreedom)
Create a new t distribution with the given degrees of freedom. |
WeibullDistribution |
createWeibullDistribution(double alpha,
double beta)
Create a new Weibull distribution with the given shape and scale parameters. |
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 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 |