Class Geometric

All Implemented Interfaces:
Serializable, Copyable

public class Geometric extends DiscreteDistribution implements Serializable
A Geometric distribution.
See Also:
  • Constructor Details

    • Geometric

      public Geometric(double probability)
  • Method Details

    • main

      public static void main(String[] args)
    • 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
    • evalPMF

      public double evalPMF(double t)
      Overrides:
      evalPMF in class DiscreteDistribution
    • evalLST

      public double evalLST(double s)
      Evaluates the Laplace-Stieltjes Transform at s. For Geometric(p), LST(s) = p*e^(-s) / (1 - (1-p)*e^(-s))
      Overrides:
      evalLST in class DiscreteDistribution
      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)
      Gets n samples from the distribution
      Specified by:
      sample in class Distribution
      Parameters:
      n - - the number of samples
      random - the random number generator to use
      Returns:
      - n samples from the distribution
    • getProcess

      public MatrixCell getProcess()