Class EmpiricalCDF

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class EmpiricalCDF
    extends Distribution
                        

    Empirical CDF for a distribution

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      EmpiricalCDF(Matrix xdata) Creates an EmpiricalCDF with the given data
      EmpiricalCDF(Matrix cdfdata, Matrix xdata) Creates an EmpiricalCDF with separate CDF and value data
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Array<double> sample(int n, Random random) Generates random samples from this distribution using the specified random generator.
      double evalCDF(double t) Evaluates the cumulative distribution function (CDF) at the given point.
      double getMean() Gets the mean (expected value) of this distribution.
      double getSCV() Gets the squared coefficient of variation (SCV) of this distribution.
      double getSkewness() Gets the skewness of this distribution.
      Array<double> getMoments() Calculate the first three moments, SCV, and skewness
      double evalLST(double s) Evaluate the Laplace-Stieltjes Transform at s
      Matrix getData() Get the empirical data
      • Methods inherited from class jline.lang.processes.Distribution

        evalProbInterval, getName, getNumParams, getParam, getRate, getSupport, getVar, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, mean, name, numParams, param, rate, sample, scv, setNumParams, setParam, skewness, support, var
      • Methods inherited from class jline.lang.Copyable

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmpiricalCDF

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

        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 Detail

      • sample

         Array<double> sample(int n, Random random)

        Generates random samples from this distribution using the specified random generator.

        Parameters:
        n - the number of samples to generate
        random - the random number generator to use
        Returns:

        array of random samples

      • evalCDF

         double evalCDF(double t)

        Evaluates the cumulative distribution function (CDF) at the given point.

        Parameters:
        t - the point at which to evaluate the CDF
        Returns:

        the CDF value at point t

      • getMean

         double getMean()

        Gets the mean (expected value) of this distribution.

        Returns:

        the mean value

      • getSCV

         double getSCV()

        Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.

        Returns:

        the squared coefficient of variation

      • getSkewness

         double getSkewness()

        Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.

        Returns:

        the skewness value

      • getMoments

         Array<double> getMoments()

        Calculate the first three moments, SCV, and skewness

        Returns:

        array containing [m1, m2, m3, SCV, skewness]

      • evalLST

         double evalLST(double s)

        Evaluate the Laplace-Stieltjes Transform at s

        Parameters:
        s - the point to evaluate
        Returns:

        LST value

      • getData

         Matrix getData()

        Get the empirical data

        Returns:

        the data matrix