Class Gamma

All Implemented Interfaces:
Serializable, Copyable

public class Gamma extends ContinuousDistribution implements Serializable
A Gamma distribution.
See Also:
  • Constructor Details

    • Gamma

      public Gamma(double shape, double scale)
  • Method Details

    • fitMeanAndSCV

      public static Gamma fitMeanAndSCV(double mean, double scv)
    • evalCDF

      public double evalCDF(double t)
      Description copied from class: Distribution
      Evaluates the cumulative distribution function (CDF) at the given point.
      Specified by:
      evalCDF in class Distribution
      Parameters:
      t - the point at which to evaluate the CDF
      Returns:
      the CDF value at point t
    • evalPDF

      public double evalPDF(double t)
      Evaluates the probability density function (PDF) at the given point.
      Parameters:
      t - the point at which to evaluate the PDF
      Returns:
      the PDF value at point t
    • evalLST

      public double evalLST(double s)
      Description copied from class: Distribution
      Evaluate the Laplace-Stieltjes Transform at s
      Specified by:
      evalLST in class ContinuousDistribution
      Parameters:
      s - the Laplace domain variable
      Returns:
      the LST value at s
    • getMean

      public double getMean()
      Description copied from class: Distribution
      Gets the mean (expected value) of this distribution.
      Specified by:
      getMean in class Distribution
      Returns:
      the mean value
    • getRate

      public double getRate()
      Description copied from class: Distribution
      Gets the rate of this distribution (inverse of mean).
      Overrides:
      getRate in class Distribution
      Returns:
      the rate value (1/mean)
    • getSCV

      public double getSCV()
      Description copied from class: Distribution
      Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.
      Specified by:
      getSCV in class Distribution
      Returns:
      the squared coefficient of variation
    • getSkewness

      public double getSkewness()
      Description copied from class: Distribution
      Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.
      Specified by:
      getSkewness in class Distribution
      Returns:
      the skewness value
    • getVar

      public double getVar()
      Description copied from class: Distribution
      Gets the variance of this distribution. Computed as SCV * mean^2.
      Overrides:
      getVar in class Distribution
      Returns:
      the variance
    • sample

      public double[] sample(int n, Random random)
      Description copied from class: Distribution
      Generates random samples from this distribution using the specified random generator.
      Specified by:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      random - the random number generator to use
      Returns:
      array of random samples
    • sample

      public double[] sample(int n)
      Description copied from class: Distribution
      Generates random samples from this distribution using default random generator.
      Overrides:
      sample in class Distribution
      Parameters:
      n - the number of samples to generate
      Returns:
      array of random samples
    • getProcess

      public MatrixCell getProcess()
      Description copied from class: ContinuousDistribution
      Gets the process representation with actual distribution parameters. Returns a MatrixCell containing the distribution parameters.
      Specified by:
      getProcess in class ContinuousDistribution
      Returns:
      MatrixCell with distribution-specific parameters
    • process

      public MatrixCell process()
      Kotlin-style property alias for getProcess()
    • mean

      public double mean()
      Kotlin-style property alias for getMean()
      Overrides:
      mean in class Distribution
    • rate

      public double rate()
      Kotlin-style property alias for getRate()
      Overrides:
      rate in class Distribution
    • scv

      public double scv()
      Kotlin-style property alias for getSCV()
      Overrides:
      scv in class Distribution
    • skewness

      public double skewness()
      Kotlin-style property alias for getSkewness()
      Overrides:
      skewness in class Distribution
    • var

      public double var()
      Kotlin-style property alias for getVar()
      Overrides:
      var in class Distribution