Class Exponential

All Implemented Interfaces:
Comparable<RandomNumber>, DoubleSupplier, Supplier<Double>, BasicFunction, NullaryFunction<Double>, PrimitiveFunction.Nullary, ContinuousDistribution, Distribution, AccessScalar<Double>, ComparableNumber<RandomNumber>, NumberDefinition

public class Exponential extends AbstractContinuous
Distribution of length of life when no aging. Describes the time between events in a Poisson process, i.e. a process in which events occur continuously and independently at a constant average rate. It is the continuous analogue of the geometric distribution.
  • Field Details

    • myRate

      private final double myRate
  • Constructor Details

    • Exponential

      public Exponential()
    • Exponential

      public Exponential(double rate)
  • Method Details

    • of

      public static Exponential of(double rate)
    • getDensity

      public double getDensity(double value)
      Description copied from interface: ContinuousDistribution
      In probability theory, a probability density function (pdf), or density of a continuous random variable is a function that describes the relative likelihood for this random variable to occur at a given point. The probability for the random variable to fall within a particular region is given by the integral of this variable's density over the region. The probability density function is nonnegative everywhere, and its integral over the entire space is equal to one. WikipediA
      Parameters:
      value - x
      Returns:
      P(x)
    • getDistribution

      public double getDistribution(double value)
      Description copied from interface: ContinuousDistribution
      In probability theory and statistics, the cumulative distribution function (CDF), or just distribution function, describes the probability that a real-valued random variable X with a given probability distribution will be found at a value less than or equal to x. Intuitively, it is the "area so far" function of the probability distribution. Cumulative distribution functions are also used to specify the distribution of multivariate random variables. WikipediA
      Parameters:
      value - x
      Returns:
      P(≤x)
    • getExpected

      public double getExpected()
    • getQuantile

      public double getQuantile(double probability)
      Description copied from interface: ContinuousDistribution
      The quantile function, for any distribution, is defined for real variables between zero and one and is mathematically the inverse of the cumulative distribution function. WikipediA The input probability absolutely has to be [0.0, 1.0], but values close to 0.0 and 1.0 may be problematic
      Parameters:
      probability - P(<=x)
      Returns:
      x
    • getStandardDeviation

      public double getStandardDeviation()
      Description copied from class: RandomNumber
      Subclasses must override either getStandardDeviation() or getVariance()!
      Specified by:
      getStandardDeviation in interface Distribution
      Overrides:
      getStandardDeviation in class RandomNumber
      See Also:
    • generate

      protected double generate()
      Overrides:
      generate in class AbstractContinuous