Class EmpiricalCDF

java.lang.Object
jline.lang.processes.Distribution
jline.lang.processes.EmpiricalCDF
All Implemented Interfaces:
Serializable, Copyable

public class EmpiricalCDF extends Distribution
Empirical CDF for a distribution
See Also:
  • Field Details

    • data

      protected Matrix data
  • Constructor Details

    • EmpiricalCDF

      public EmpiricalCDF(Matrix xdata)
      Creates an EmpiricalCDF with the given data
      Parameters:
      xdata - the data matrix with CDF and values
    • EmpiricalCDF

      public EmpiricalCDF(Matrix cdfdata, Matrix xdata)
      Creates an EmpiricalCDF with separate CDF and value data
      Parameters:
      cdfdata - the CDF values
      xdata - the corresponding x values
  • Method Details

    • 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
    • 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
    • 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
    • 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
    • getMoments

      public double[] getMoments()
      Calculate the first three moments, SCV, and skewness
      Returns:
      array containing [m1, m2, m3, SCV, skewness]
    • evalLST

      public double evalLST(double s)
      Evaluate the Laplace-Stieltjes Transform at s
      Specified by:
      evalLST in class Distribution
      Parameters:
      s - the point to evaluate
      Returns:
      LST value
    • getData

      public Matrix getData()
      Get the empirical data
      Returns:
      the data matrix