public final class GaussianStatistics extends Object
Modifier and Type | Method and Description |
---|---|
static double |
complementaryErrorFunction(double x)
Calculates the complement of
GaussianStatistics.errorFunction(double) . |
static double |
errorFunction(double x)
Calculates the error function for all values of x.
|
static double |
inverseComplementaryErrorFunction(double p)
Calculates the inverse of the complementary error function.
|
static double |
inverseErrorFunction(double p)
Calculates the inverse of the error function.
|
static double |
multiDimensionalConfidenceIntervals(int dimension,
double sigmas)
Calculates the fraction of the probability distribution of a specified dimension that lies within
the confidence interval described by the specified number of standard deviations.
|
static double |
multiDimensionalStandardDeviationFactor(int dimension,
double probability)
Calculates the number of standard deviations that describe the confidence interval which makes up
the given portion of the probability distribution.
|
public static double errorFunction(double x)
x
- The value to calculate the error function of.public static double complementaryErrorFunction(double x)
GaussianStatistics.errorFunction(double)
. By definition this complement plus the error function
are equal to one.x
- The value to use to calculate the complement of the error function.public static double inverseComplementaryErrorFunction(double p)
The GaussianStatistics.complementaryErrorFunction(double)
approaches its asymptote very quickly, at double precision its solutions
are rounded to 0.0 or 2.0 at an input of +-5.93. If this method returns negative or positive infinity and a finite value
must be used instead, anything outside of that range would make an acceptable substitute.
p
- The value to use to calculate the inverse of the complementary error function, from 0.0 to 2.0.public static double inverseErrorFunction(double p)
The GaussianStatistics.errorFunction(double)
approaches its asymptote very quickly, at double precision its solutions
are rounded to -1.0 or 1.0 at an input of +-5.93. If this method returns negative or positive infinity and a finite value
must be used instead, anything outside of that range would make an acceptable substitute.
p
- The value to use to calculate the inverse of the error function, from -1.0 to 1.0.public static double multiDimensionalConfidenceIntervals(int dimension, double sigmas)
dimension
- The dimension of the gaussian probability distribution.sigmas
- The width of the confidence interval in standard deviations.public static double multiDimensionalStandardDeviationFactor(int dimension, double probability)
dimension
- The dimension of the gaussian probability distribution.probability
- The desired probability that an event in the probability distribution
lies in the confidence interval described by the returned number of standard deviations, from 0.0 to 1.0;