Class DistNormalTrunc

    • Field Summary

      • Fields inherited from class nl.tudelft.simulation.jstats.distributions.Dist

        stream
    • Constructor Summary

      Constructors 
      Constructor Description
      DistNormalTrunc​(StreamInterface stream, double min, double max)
      constructs a normal distribution with mu=0 and sigma=1.
      DistNormalTrunc​(StreamInterface stream, double mu, double sigma, double min, double max)
      constructs a normal distribution with mu and sigma.
    • Constructor Detail

      • DistNormalTrunc

        public DistNormalTrunc​(StreamInterface stream,
                               double min,
                               double max)
        constructs a normal distribution with mu=0 and sigma=1. Errors of various types, e.g., in the impact point of a bomb; quantities that are the sum of a large number of other quantities by the virtue of the central limit theorem.
        Parameters:
        stream - StreamInterface; the numberstream
        min - double; minimum x-value of the distribution
        max - double; maximum x-value of the distribution
      • DistNormalTrunc

        public DistNormalTrunc​(StreamInterface stream,
                               double mu,
                               double sigma,
                               double min,
                               double max)
        constructs a normal distribution with mu and sigma.
        Parameters:
        stream - StreamInterface; the numberstream
        mu - double; the medium
        sigma - double; the standard deviation
        min - double; minimum x-value of the distribution
        max - double; maximum x-value of the distribution
    • Method Detail

      • getCumulativeProbability

        public double getCumulativeProbability​(double x)
        returns the cumulative probability of the x-value.
        Parameters:
        x - double; the observation x
        Returns:
        double the cumulative probability
      • getInverseCumulativeProbability

        public double getInverseCumulativeProbability​(double cumulativeProbability)
        returns the x-value of the given cumulativePropability.
        Parameters:
        cumulativeProbability - double; reflects cum prob
        Returns:
        double the inverse cumulative probability
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • main

        public static void main​(java.lang.String[] args)
        Test.
        Parameters:
        args - String[]; args