Class DistPearson5

All Implemented Interfaces:
Serializable

public class DistPearson5 extends DistContinuous
The Pearson5 distribution with a shape parameter α and a scale parameter β. The distribution is sometimes called the inverse gamma distribution, because if X ~ PT5(α, β) if and only if Y = 1 / X ~ gamma(α, 1/β). For more information on this distribution see https://en.wikipedia.org/wiki/Inverse-gamma_distribution

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:
  • Field Summary

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

    stream
  • Constructor Summary

    Constructors
    Constructor
    Description
    DistPearson5(StreamInterface stream, double alpha, double beta)
    constructs a new Pearson5 distribution.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    draws the next stream value according to the probability of this this distribution.
    double
    Return the shape parameter α of the distribution.
    double
    Return the scale parameter β of the distribution.
    double
    returns the probability density value of a value x.
    void
    Replace the random number stream.

    Methods inherited from class nl.tudelft.simulation.jstats.distributions.Dist

    getStream

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • DistPearson5

      public DistPearson5(StreamInterface stream, double alpha, double beta)
      constructs a new Pearson5 distribution.
      Parameters:
      stream - StreamInterface; the random number stream
      alpha - double; the shape parameter α of the distribution
      beta - double; the scale parameter β of the distribution
      Throws:
      IllegalArgumentException - when alpha <= 0 or beta <= 0
  • Method Details

    • draw

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

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

      public double getAlpha()
      Return the shape parameter α of the distribution.
      Returns:
      double; the shape parameter α of the distribution
    • getBeta

      public double getBeta()
      Return the scale parameter β of the distribution.
      Returns:
      double; the scale parameter β of the distribution
    • setStream

      public void setStream(StreamInterface stream)
      Replace the random number stream.
      Overrides:
      setStream in class Dist
      Parameters:
      stream - StreamInterface; the new random number stream
    • toString

      public String toString()
      Overrides:
      toString in class Object