Class DistNormalTable

    • Field Detail

      • CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE

        public static final double CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE
        CUMULATIVE_NORMAL_PROBABILITIES table runs from 0 * sigma to CUMULATIVE_NORMAL_PROBABILITIES_TABLE_RANGE * sigma.
        See Also:
        Constant Field Values
      • CUMULATIVE_NORMAL_PROBABILITIES

        public static final double[] CUMULATIVE_NORMAL_PROBABILITIES
        CUMULATIVE_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 Detail

      • getCumulativeProbability

        public static double getCumulativeProbability​(double mu,
                                                      double sigma,
                                                      double x)
        Returns the cumulative probability of the x-value.
        Parameters:
        mu - double; mean value
        sigma - double; standard deviation
        x - 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 value
        sigma - double; standard deviation
        cumulativeProbability - 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)