Class NormalDistribution
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.math.statistics.distributions.NormalDistribution
- All Implemented Interfaces:
Distribution
,Serializable
public class NormalDistribution extends ExperimentObject implements Distribution
This class represents a normal distribution. A dirac distribution if the
standard deviation is null.
- Author:
- Marc Vaudel
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description NormalDistribution()
Empty default constructorNormalDistribution(double mean, double std)
Constructor. -
Method Summary
Modifier and Type Method Description double
getCumulativeProbabilityAt(double x)
Returns the cumulative density function value at a given position.double
getDescendingCumulativeProbabilityAt(double x)
Returns the cumulative density function value at a given position when starting from the high values.double
getMaxValueForProbability(double p)
The value after which the density function will be smaller than p.double
getMinValueForProbability(double p)
The value before which the density function will be smaller than p.static NormalDistribution
getNormalDistribution(ArrayList<Double> input)
Returns the normal distribution corresponding to a given list of double calibrated on mean and standard deviation.double
getProbabilityAt(double x)
Returns the density function value at a given position.static NormalDistribution
getRobustNormalDistribution(ArrayList<Double> input)
Returns the normal distribution corresponding to a given list of double calibrated on median and 34.1% percentile to median distancedouble
getSmallestCumulativeProbabilityAt(double x)
Returns the cumulative density function value at a given position, starting from the low values if before the median, from the high otherwise.double
getValueAtCumulativeProbability(double p)
The value after which the cumulative density function will be smaller than p.double
getValueAtDescendingCumulativeProbability(double p)
The value after which the cumulative density function will be smaller than p when starting from high values.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
NormalDistribution
public NormalDistribution()Empty default constructor -
NormalDistribution
public NormalDistribution(double mean, double std)Constructor.- Parameters:
mean
- the meanstd
- the standard deviation
-
-
Method Details
-
getNormalDistribution
Returns the normal distribution corresponding to a given list of double calibrated on mean and standard deviation.- Parameters:
input
- the input as a list of double- Returns:
- the normal distribution calibrated on the mean and standard deviation
-
getRobustNormalDistribution
Returns the normal distribution corresponding to a given list of double calibrated on median and 34.1% percentile to median distance- Parameters:
input
- the input as list of double- Returns:
- a normal distribution calibrated on median and 34.1% percentile to median distance
-
getProbabilityAt
public double getProbabilityAt(double x)Description copied from interface:Distribution
Returns the density function value at a given position.- Specified by:
getProbabilityAt
in interfaceDistribution
- Parameters:
x
- the position of interest- Returns:
- the value of the density function at the give position
-
getMaxValueForProbability
public double getMaxValueForProbability(double p)Description copied from interface:Distribution
The value after which the density function will be smaller than p.- Specified by:
getMaxValueForProbability
in interfaceDistribution
- Parameters:
p
- the probability of interest- Returns:
- the value after which the density function will be smaller than p
-
getMinValueForProbability
public double getMinValueForProbability(double p)Description copied from interface:Distribution
The value before which the density function will be smaller than p.- Specified by:
getMinValueForProbability
in interfaceDistribution
- Parameters:
p
- the probability of interest- Returns:
- the value before which the density function will be smaller than p
-
getCumulativeProbabilityAt
public double getCumulativeProbabilityAt(double x)Description copied from interface:Distribution
Returns the cumulative density function value at a given position.- Specified by:
getCumulativeProbabilityAt
in interfaceDistribution
- Parameters:
x
- the position of interest- Returns:
- the value of the density function at the give position
-
getValueAtCumulativeProbability
public double getValueAtCumulativeProbability(double p)Description copied from interface:Distribution
The value after which the cumulative density function will be smaller than p.- Specified by:
getValueAtCumulativeProbability
in interfaceDistribution
- Parameters:
p
- the probability of interest- Returns:
- the value after which the cumulative density function will be smaller than p
-
getDescendingCumulativeProbabilityAt
public double getDescendingCumulativeProbabilityAt(double x)Description copied from interface:Distribution
Returns the cumulative density function value at a given position when starting from the high values.- Specified by:
getDescendingCumulativeProbabilityAt
in interfaceDistribution
- Parameters:
x
- the position of interest- Returns:
- the value of the density function at the give position
-
getSmallestCumulativeProbabilityAt
public double getSmallestCumulativeProbabilityAt(double x)Description copied from interface:Distribution
Returns the cumulative density function value at a given position, starting from the low values if before the median, from the high otherwise.- Specified by:
getSmallestCumulativeProbabilityAt
in interfaceDistribution
- Parameters:
x
- the position of interest- Returns:
- the value of the density function at the give position
-
getValueAtDescendingCumulativeProbability
public double getValueAtDescendingCumulativeProbability(double p)Description copied from interface:Distribution
The value after which the cumulative density function will be smaller than p when starting from high values.- Specified by:
getValueAtDescendingCumulativeProbability
in interfaceDistribution
- Parameters:
p
- the probability of interest- Returns:
- the value after which the cumulative density function will be smaller than p
-