Class EmpiricalCdf

java.lang.Object
edu.cmu.tetrad.sem.EmpiricalCdf
All Implemented Interfaces:
org.apache.commons.math3.distribution.RealDistribution

public class EmpiricalCdf extends Object implements org.apache.commons.math3.distribution.RealDistribution
Only the cumulativeProbability, density, setShift methods are implemented.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • EmpiricalCdf

      public EmpiricalCdf(List<Double> data)

      Constructor for EmpiricalCdf.

      Parameters:
      data - a List object
  • Method Details

    • cumulativeProbability

      public double cumulativeProbability(double x)
      Calculates the cumulative probability of a given value in the empirical cumulative distribution function (CDF).
      Specified by:
      cumulativeProbability in interface org.apache.commons.math3.distribution.RealDistribution
      Parameters:
      x - the point at which the CDF is evaluated
      Returns:
      the cumulative probability of the given value in the empirical CDF
    • probability

      public double probability(double v)
      Calculates the probability mass function (PMF) at a given value in the empirical cumulative distribution function (CDF).
      Specified by:
      probability in interface org.apache.commons.math3.distribution.RealDistribution
      Parameters:
      v - the point at which the PMF is evaluated
      Returns:
      the probability mass function at the given value in the empirical CDF
    • density

      public double density(double v)
      Specified by:
      density in interface org.apache.commons.math3.distribution.RealDistribution
    • cumulativeProbability

      @Deprecated public double cumulativeProbability(double v, double v1) throws org.apache.commons.math3.exception.NumberIsTooLargeException
      Deprecated.
      Specified by:
      cumulativeProbability in interface org.apache.commons.math3.distribution.RealDistribution
      Throws:
      org.apache.commons.math3.exception.NumberIsTooLargeException
    • inverseCumulativeProbability

      public double inverseCumulativeProbability(double v) throws org.apache.commons.math3.exception.OutOfRangeException
      Specified by:
      inverseCumulativeProbability in interface org.apache.commons.math3.distribution.RealDistribution
      Throws:
      org.apache.commons.math3.exception.OutOfRangeException
    • getNumericalMean

      public double getNumericalMean()
      Specified by:
      getNumericalMean in interface org.apache.commons.math3.distribution.RealDistribution
    • getNumericalVariance

      public double getNumericalVariance()
      Specified by:
      getNumericalVariance in interface org.apache.commons.math3.distribution.RealDistribution
    • getSupportLowerBound

      public double getSupportLowerBound()
      Specified by:
      getSupportLowerBound in interface org.apache.commons.math3.distribution.RealDistribution
    • getSupportUpperBound

      public double getSupportUpperBound()
      Specified by:
      getSupportUpperBound in interface org.apache.commons.math3.distribution.RealDistribution
    • isSupportLowerBoundInclusive

      @Deprecated public boolean isSupportLowerBoundInclusive()
      Deprecated.
      Specified by:
      isSupportLowerBoundInclusive in interface org.apache.commons.math3.distribution.RealDistribution
    • isSupportUpperBoundInclusive

      @Deprecated public boolean isSupportUpperBoundInclusive()
      Deprecated.
      Specified by:
      isSupportUpperBoundInclusive in interface org.apache.commons.math3.distribution.RealDistribution
    • isSupportConnected

      public boolean isSupportConnected()
      Specified by:
      isSupportConnected in interface org.apache.commons.math3.distribution.RealDistribution
    • reseedRandomGenerator

      public void reseedRandomGenerator(long l)
      Specified by:
      reseedRandomGenerator in interface org.apache.commons.math3.distribution.RealDistribution
    • sample

      public double sample()
      Specified by:
      sample in interface org.apache.commons.math3.distribution.RealDistribution
    • sample

      public double[] sample(int i)
      Specified by:
      sample in interface org.apache.commons.math3.distribution.RealDistribution