Class DistLogNormal

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
DistLogNormalTrunc

public class DistLogNormal extends DistNormal
The LogNormal distribution. For more information on this distribution see https://mathworld.wolfram.com/LogNormalDistribution.html
The LogNormal distribution for random variable X is such that ln(X) ~ Normal(mu, sigma).

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://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Peter Jacobs , Alexander Verbraeck
See Also:
  • Constructor Details

    • DistLogNormal

      public DistLogNormal(StreamInterface stream, double normalMean, double normalStDev)
      Construct a new Lognormal distribution. The LogNormal distribution for random variable X is such that ln(X) ~ Normal(mu, sigma).
      Parameters:
      stream - StreamInterface; the random number stream
      normalMean - double; the mean (mu) for the underlying normal distribution
      normalStDev - double; the standard deviation (sigma) for the underlying normal distribution
      Throws:
      IllegalArgumentException - when normalStDev <= 0
  • Method Details

    • draw

      public double draw()
      draws the next stream value according to the probability of this this distribution.
      Overrides:
      draw in class DistNormal
      Returns:
      the next double value drawn.
    • getProbabilityDensity

      public double getProbabilityDensity(double x)
      returns the probability density value of a value x.
      Overrides:
      getProbabilityDensity in class DistNormal
      Parameters:
      x - double; the value for which the density function needs to be calculated
      Returns:
      double; the probability density for value x
    • getCumulativeProbability

      public double getCumulativeProbability(double x)
      returns the cumulative probability of the x-value.
      Overrides:
      getCumulativeProbability in class DistNormal
      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.
      Overrides:
      getInverseCumulativeProbability in class DistNormal
      Parameters:
      cumulativeProbability - double; reflects cum prob
      Returns:
      double the inverse cumulative probability
    • toString

      public String toString()
      Overrides:
      toString in class DistNormal