Class R1Univariate

java.lang.Object
org.drip.measure.continuous.R1Univariate
Direct Known Subclasses:
BoundedUniformIntegerDistribution, PoissonDistribution, R1Central, R1CentralCLTProxy, R1CentralFisherProxy, R1NonCentral, R1ParetoDistribution, R1PowerLawDistribution, R1RateDistribution, R1ScaledDistribution, R1ShapeScaleDistribution, R1Uniform, R1UnivariateNormal, R1UnivariateUniform, R1WilsonHilferty, TwoIIDSum

public abstract class R1Univariate
extends java.lang.Object
R1Univariate exposes the Base Abstract Class behind Univariate R1 Distributions. It exports the Methods for incremental, cumulative, and inverse cumulative distribution densities.

Author:
Lakshmi Krishnamurthy
  • Constructor Summary

    Constructors
    Constructor Description
    R1Univariate()  
  • Method Summary

    Modifier and Type Method Description
    double bPOE​(double x)
    Retrieve the Buffered Probability of Existence
    double centralMoment​(int n)
    Retrieve the nth Central Moment
    abstract double cumulative​(double dblX)
    Compute the cumulative under the distribution to the given value
    double cvar​(double p)
    Retrieve the Quantile CVaR (Conditional Value-at-Risk) of the Distribution
    abstract double density​(double dblX)
    Compute the Density under the Distribution at the given Variate
    double differentialEntropy()
    Retrieve the Differential Entropy of the Distribution
    double excessKurtosis()
    Retrieve the Excess Kurtosis of the Distribution
    double expectedShortfall​(double p)
    Retrieve the Quantile ES (Expected Shortfall) of the Distribution
    double fisherInformation()
    Retrieve the Fisher Information of the Distribution
    Array2D histogram()
    Retrieve the Univariate Weighted Histogram
    double incremental​(double dblXLeft, double dblXRight)
    Compute the Incremental under the Distribution between the 2 variates
    double invCumulative​(double p)
    Compute the inverse cumulative under the distribution corresponding to the given value
    double iqr()
    Retrieve the Inter-quantile Range (IQR) of the Distribution
    double kullbackLeiblerDivergence​(R1Univariate r1UnivariateOther)
    Compute the Kullback-Leibler Divergence against the other R1 Distribution
    abstract double mean()
    Retrieve the Mean of the Distribution
    double median()
    Retrieve the Median of the Distribution
    double mode()
    Retrieve the Mode of the Distribution
    R1ToR1 momentGeneratingFunction()
    Construct the Moment Generating Function
    double nonCentralMoment​(int n)
    Retrieve the nth Non-central Moment
    PopulationCentralMeasures populationCentralMeasures()
    Retrieve the Population Central Measures
    R1ToR1 probabilityGeneratingFunction()
    Construct the Probability Generating Function
    double quantile​(double p)
    Retrieve the Quantile Variate of the Distribution
    double random()
    Generate a Random Variable corresponding to the Distribution
    double[] randomArray​(int arrayCount)
    Retrieve the Array of Generated Random Variables
    double skewness()
    Retrieve the Skewness of the Distribution
    abstract double[] support()
    Lay out the Support of the PDF Range
    boolean supported​(double x)
    Indicate if x is inside the Supported Range
    double tukeyAnomaly()
    Retrieve the Tukey Anomaly of the Distribution
    double tukeyCriterion()
    Retrieve the Tukey Criterion of the Distribution
    abstract double variance()
    Retrieve the Variance of the Distribution

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • R1Univariate

      public R1Univariate()
  • Method Details

    • support

      public abstract double[] support()
      Lay out the Support of the PDF Range
      Returns:
      Support of the PDF Range
    • supported

      public boolean supported​(double x)
      Indicate if x is inside the Supported Range
      Parameters:
      x - X
      Returns:
      TRUE - x is inside of the Supported Range
    • density

      public abstract double density​(double dblX) throws java.lang.Exception
      Compute the Density under the Distribution at the given Variate
      Parameters:
      dblX - Variate at which the Density needs to be computed
      Returns:
      The Density
      Throws:
      java.lang.Exception - Thrown if the input is invalid
    • cumulative

      public abstract double cumulative​(double dblX) throws java.lang.Exception
      Compute the cumulative under the distribution to the given value
      Parameters:
      dblX - Variate to which the cumulative is to be computed
      Returns:
      The cumulative
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
    • incremental

      public double incremental​(double dblXLeft, double dblXRight) throws java.lang.Exception
      Compute the Incremental under the Distribution between the 2 variates
      Parameters:
      dblXLeft - Left Variate to which the cumulative is to be computed
      dblXRight - Right Variate to which the cumulative is to be computed
      Returns:
      The Incremental under the Distribution between the 2 variates
      Throws:
      java.lang.Exception - Thrown if the inputs are invalid
    • invCumulative

      public double invCumulative​(double p) throws java.lang.Exception
      Compute the inverse cumulative under the distribution corresponding to the given value
      Parameters:
      p - Value corresponding to which the inverse cumulative is to be computed
      Returns:
      The inverse cumulative
      Throws:
      java.lang.Exception - Thrown if the Input is invalid
    • mean

      public abstract double mean() throws java.lang.Exception
      Retrieve the Mean of the Distribution
      Returns:
      The Mean of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Mean cannot be estimated
    • median

      public double median() throws java.lang.Exception
      Retrieve the Median of the Distribution
      Returns:
      The Median of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Median cannot be estimated
    • quantile

      public double quantile​(double p) throws java.lang.Exception
      Retrieve the Quantile Variate of the Distribution
      Parameters:
      p - The Quantile Fraction
      Returns:
      The Quantile Variate of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Quantile Variate cannot be estimated
    • mode

      public double mode() throws java.lang.Exception
      Retrieve the Mode of the Distribution
      Returns:
      The Mode of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Mode cannot be estimated
    • variance

      public abstract double variance() throws java.lang.Exception
      Retrieve the Variance of the Distribution
      Returns:
      The Variance of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Variance cannot be estimated
    • skewness

      public double skewness() throws java.lang.Exception
      Retrieve the Skewness of the Distribution
      Returns:
      The Skewness of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Skewness cannot be estimated
    • excessKurtosis

      public double excessKurtosis() throws java.lang.Exception
      Retrieve the Excess Kurtosis of the Distribution
      Returns:
      The Excess Kurtosis of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Skewness cannot be estimated
    • differentialEntropy

      public double differentialEntropy() throws java.lang.Exception
      Retrieve the Differential Entropy of the Distribution
      Returns:
      The Differential Entropy of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Entropy cannot be estimated
    • momentGeneratingFunction

      public R1ToR1 momentGeneratingFunction()
      Construct the Moment Generating Function
      Returns:
      The Moment Generating Function
    • probabilityGeneratingFunction

      public R1ToR1 probabilityGeneratingFunction()
      Construct the Probability Generating Function
      Returns:
      The Probability Generating Function
    • fisherInformation

      public double fisherInformation() throws java.lang.Exception
      Retrieve the Fisher Information of the Distribution
      Returns:
      The Fisher Information of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Fisher Information cannot be estimated
    • kullbackLeiblerDivergence

      public double kullbackLeiblerDivergence​(R1Univariate r1UnivariateOther) throws java.lang.Exception
      Compute the Kullback-Leibler Divergence against the other R1 Distribution
      Parameters:
      r1UnivariateOther - Other R1 Distribution
      Returns:
      Kullback-Leibler Divergence against the other R1 Distribution
      Throws:
      java.lang.Exception - Thrown if the Kullback-Leibler Divergence cannot be estimated
    • cvar

      public double cvar​(double p) throws java.lang.Exception
      Retrieve the Quantile CVaR (Conditional Value-at-Risk) of the Distribution
      Parameters:
      p - The Quantile
      Returns:
      The Quantile CVaR of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Quantile CVaR cannot be estimated
    • expectedShortfall

      public double expectedShortfall​(double p) throws java.lang.Exception
      Retrieve the Quantile ES (Expected Shortfall) of the Distribution
      Parameters:
      p - The Quantile
      Returns:
      The Quantile ES of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Quantile ES cannot be estimated
    • bPOE

      public double bPOE​(double x) throws java.lang.Exception
      Retrieve the Buffered Probability of Existence
      Parameters:
      x - The Variate
      Returns:
      The Buffered Probability of Existence
      Throws:
      java.lang.Exception - Thrown if the Buffered Probability of Existence cannot be estimated
    • nonCentralMoment

      public double nonCentralMoment​(int n) throws java.lang.Exception
      Retrieve the nth Non-central Moment
      Parameters:
      n - Moment Number
      Returns:
      The nth Non-central Moment
      Throws:
      java.lang.Exception - Thrown if the nth Non-central Moment cannot be estimated
    • centralMoment

      public double centralMoment​(int n) throws java.lang.Exception
      Retrieve the nth Central Moment
      Parameters:
      n - Moment Number
      Returns:
      The nth Central Moment
      Throws:
      java.lang.Exception - Thrown if the nth Central Moment cannot be estimated
    • iqr

      public double iqr() throws java.lang.Exception
      Retrieve the Inter-quantile Range (IQR) of the Distribution
      Returns:
      The Inter-quantile Range of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Inter-quantile Range cannot be estimated
    • tukeyCriterion

      public double tukeyCriterion() throws java.lang.Exception
      Retrieve the Tukey Criterion of the Distribution
      Returns:
      The Tukey Criterion of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Tukey Criterion cannot be estimated
    • tukeyAnomaly

      public double tukeyAnomaly() throws java.lang.Exception
      Retrieve the Tukey Anomaly of the Distribution
      Returns:
      The Tukey Anomaly of the Distribution
      Throws:
      java.lang.Exception - Thrown if the Tukey Anomaly cannot be estimated
    • random

      public double random() throws java.lang.Exception
      Generate a Random Variable corresponding to the Distribution
      Returns:
      Random Variable corresponding to the Distribution
      Throws:
      java.lang.Exception - Thrown if the Random Instance cannot be estimated
    • randomArray

      public double[] randomArray​(int arrayCount)
      Retrieve the Array of Generated Random Variables
      Parameters:
      arrayCount - Number of Elements
      Returns:
      Array of Generated Random Variables
    • populationCentralMeasures

      public PopulationCentralMeasures populationCentralMeasures()
      Retrieve the Population Central Measures
      Returns:
      The Population Central Measures
    • histogram

      public Array2D histogram()
      Retrieve the Univariate Weighted Histogram
      Returns:
      The Univariate Weighted Histogram