public class NonSymmetricalNormalDistribution extends Object implements Distribution
Constructor and Description |
---|
NonSymmetricalNormalDistribution(double mean,
double stdDown,
double stdUp)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getCumulativeProbabilityAt(double x,
MathContext mathContext)
Returns the cumulative density function value at a given position.
|
BigDecimal |
getDescendingCumulativeProbabilityAt(double x,
MathContext mathContext)
Returns the cumulative density function value at a given position when
starting from the high values.
|
BigDecimal |
getMaxValueForProbability(double p,
MathContext mathContext)
The value after which the density function will be smaller than p.
|
double |
getMean()
Returns the mean of the distribution.
|
BigDecimal |
getMinValueForProbability(double p,
MathContext mathContext)
The value before which the density function will be smaller than p.
|
BigDecimal |
getProbabilityAt(double x,
MathContext mathContext)
Returns the density function value at a given position.
|
static NonSymmetricalNormalDistribution |
getRobustNonSymmetricalNormalDistribution(ArrayList<Double> input)
Returns the non-symmetrical distribution of the input list of double
calibrated on the median, 15.9% and 84.1% percentiles.
|
static NonSymmetricalNormalDistribution |
getRobustNonSymmetricalNormalDistributionFromSortedList(ArrayList<Double> input)
Returns the non-symmetrical distribution of the input list of double
calibrated on the median, 15.9% and 84.1% percentiles.
|
double |
getStdDown()
Returns the standard deviation to the left of the distribution.
|
double |
getStdUp()
Returns the standard deviation to the right of the distribution.
|
BigDecimal |
getValueAtCumulativeProbability(double p,
MathContext mathContext)
The value after which the cumulative density function will be smaller
than p.
|
BigDecimal |
getValueAtDescendingCumulativeProbability(double p,
MathContext mathContext)
The value after which the cumulative density function will be smaller
than p when starting from high values.
|
public NonSymmetricalNormalDistribution(double mean, double stdDown, double stdUp)
mean
- the meanstdDown
- the standard deviation on the left of the meanstdUp
- the standard deviation on the right of the meanpublic double getStdUp()
public double getStdDown()
public double getMean()
public static NonSymmetricalNormalDistribution getRobustNonSymmetricalNormalDistribution(ArrayList<Double> input)
input
- the input listpublic static NonSymmetricalNormalDistribution getRobustNonSymmetricalNormalDistributionFromSortedList(ArrayList<Double> input)
input
- the input listpublic BigDecimal getProbabilityAt(double x, MathContext mathContext)
Distribution
getProbabilityAt
in interface Distribution
x
- the position of interestmathContext
- the math context to use for calculationpublic BigDecimal getCumulativeProbabilityAt(double x, MathContext mathContext) throws org.apache.commons.math.MathException
Distribution
getCumulativeProbabilityAt
in interface Distribution
x
- the position of interestmathContext
- the math context to use for calculationorg.apache.commons.math.MathException
- if a MathException occurspublic BigDecimal getMaxValueForProbability(double p, MathContext mathContext)
Distribution
getMaxValueForProbability
in interface Distribution
p
- the probability of interestmathContext
- the math context to use for calculationpublic BigDecimal getMinValueForProbability(double p, MathContext mathContext)
Distribution
getMinValueForProbability
in interface Distribution
p
- the probability of interestmathContext
- the math context to use for calculationpublic BigDecimal getValueAtCumulativeProbability(double p, MathContext mathContext) throws org.apache.commons.math.MathException
Distribution
getValueAtCumulativeProbability
in interface Distribution
p
- the probability of interestmathContext
- the math context to use for calculationorg.apache.commons.math.MathException
- if a MathException occurspublic BigDecimal getDescendingCumulativeProbabilityAt(double x, MathContext mathContext) throws org.apache.commons.math.MathException
Distribution
getDescendingCumulativeProbabilityAt
in interface Distribution
x
- the position of interestmathContext
- the math context to use for calculationorg.apache.commons.math.MathException
- if a MathException occurspublic BigDecimal getValueAtDescendingCumulativeProbability(double p, MathContext mathContext) throws org.apache.commons.math.MathException
Distribution
getValueAtDescendingCumulativeProbability
in interface Distribution
p
- the probability of interestmathContext
- the math context to use for calculationorg.apache.commons.math.MathException
- if a MathException occursCopyright © 2015. All rights reserved.