Package org.djutils.stats
Class DistNormalTable
java.lang.Object
org.djutils.stats.DistNormalTable
The Normal distribution. For more information on this distribution see
http://mathworld.wolfram.com/NormalDistribution.html
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
for project information https://simulation.tudelft.nl. The DSOL
project is distributed under a three-clause BSD-style license, which can be found at
https://simulation.tudelft.nl/dsol/3.0/license.html.
- Author:
- Peter Jacobs , Alexander Verbraeck
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double[]
CUMULATIVE_NORMAL_PROBABILITIES represents the NORMAL DISTRIBUTION FUNCTION TABLE.static final double
CUMULATIVE_NORMAL_PROBABILITIES table runs from 0 * sigma to CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE * sigma. -
Method Summary
Modifier and TypeMethodDescriptionstatic double
getCumulativeProbability
(double mu, double sigma, double x) Returns the cumulative probability of the x-value.static double
getInverseCumulativeProbability
(double mu, double sigma, double cumulativeProbability) Returns the x-value of the given cumulativePropability.
-
Field Details
-
CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE
public static final double CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGECUMULATIVE_NORMAL_PROBABILITIES table runs from 0 * sigma to CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE * sigma.- See Also:
-
CUMULATIVE_NORMAL_PROBABILITIES
public static final double[] CUMULATIVE_NORMAL_PROBABILITIESCUMULATIVE_NORMAL_PROBABILITIES represents the NORMAL DISTRIBUTION FUNCTION TABLE. In order to keep this table as fast as possible no x values are stored. The range of the table is {0.00,0.01,0.02,...,CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE}, but accuracy is severely lacking after 6.00
-
-
Method Details
-
getCumulativeProbability
public static double getCumulativeProbability(double mu, double sigma, double x) Returns the cumulative probability of the x-value.- Parameters:
mu
- double; mean valuesigma
- double; standard deviationx
- double; the observation x- Returns:
- double the cumulative probability
- Throws:
IllegalArgumentException
- when sigma less than 0
-
getInverseCumulativeProbability
public static double getInverseCumulativeProbability(double mu, double sigma, double cumulativeProbability) Returns the x-value of the given cumulativePropability. Result range is limited to approximately 6 sigma.- Parameters:
mu
- double; mean valuesigma
- double; standard deviationcumulativeProbability
- double; the cumulative probability- Returns:
- double the x-value that corresponds closely to the given cumulative probability
- Throws:
IllegalArgumentException
- when sigma less than 0, or when cumulative probability not between 0 and 1 (inclusive)
-