Package org.drip.measure.gaussian
Class R1UnivariateNormal
java.lang.Object
org.drip.measure.continuous.R1Univariate
org.drip.measure.gaussian.R1UnivariateNormal
- Direct Known Subclasses:
ConditionalPriceDistribution
,PriorDriftDistribution
,ShortfallIncrementDistribution
public class R1UnivariateNormal extends R1Univariate
R1UnivariateNormal implements the Univariate R1 Normal Distribution. It implements the
Incremental, the Cumulative, and the Inverse Cumulative Distribution Densities.
- Module = Computational Core Module
- Library = Numerical Analysis Library
- Project = Rd Continuous/Discrete Probability Measures
- Package = R1 Rd Covariant Gaussian Quadrature
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description R1UnivariateNormal(double dblMean, double dblSigma)
Construct a R1 Normal/Gaussian Distribution -
Method Summary
Modifier and Type Method Description double
confidence(double dblWidth)
Compute the Confidence given the Width around the Meandouble
confidenceInterval(double dblConfidence)
Compute the Width around the Mean given the Confidence Leveldouble
cumulative(double dblX)
Compute the cumulative under the distribution to the given valuedouble
density(double dblX)
Compute the Density under the Distribution at the given Variatedouble
errorFunction(double dblX)
Compute the Error Function Around an Absolute Width around the MeanArray2D
histogram()
Retrieve the Univariate Weighted Histogramdouble
incremental(double dblXLeft, double dblXRight)
Compute the Incremental under the Distribution between the 2 variatesdouble
invCumulative(double dblY)
Compute the inverse cumulative under the distribution corresponding to the given valuedouble
mean()
Retrieve the Mean of the Distributiondouble
median()
Retrieve the Median of the Distributiondouble
mode()
Retrieve the Mode of the Distributiondouble
random()
Generate a Random Variable corresponding to the Distributiondouble
sigma()
Retrieve the Sigmastatic R1UnivariateNormal
Standard()
Generate a N (0, 1) distributiondouble[]
support()
Lay out the Support of the PDF Rangedouble
variance()
Retrieve the Variance of the DistributionMethods inherited from class org.drip.measure.continuous.R1Univariate
bPOE, centralMoment, cvar, differentialEntropy, excessKurtosis, expectedShortfall, fisherInformation, iqr, kullbackLeiblerDivergence, momentGeneratingFunction, nonCentralMoment, populationCentralMeasures, probabilityGeneratingFunction, quantile, randomArray, skewness, supported, tukeyAnomaly, tukeyCriterion
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
R1UnivariateNormal
public R1UnivariateNormal(double dblMean, double dblSigma) throws java.lang.ExceptionConstruct a R1 Normal/Gaussian Distribution- Parameters:
dblMean
- Mean of the DistributiondblSigma
- Sigma of the Distribution- Throws:
java.lang.Exception
- Thrown if the inputs are invalid
-
-
Method Details
-
Standard
Generate a N (0, 1) distribution- Returns:
- The N (0, 1) distribution
-
sigma
public double sigma()Retrieve the Sigma- Returns:
- The Sigma
-
support
public double[] support()Description copied from class:R1Univariate
Lay out the Support of the PDF Range- Specified by:
support
in classR1Univariate
- Returns:
- Support of the PDF Range
-
cumulative
public double cumulative(double dblX) throws java.lang.ExceptionDescription copied from class:R1Univariate
Compute the cumulative under the distribution to the given value- Specified by:
cumulative
in classR1Univariate
- 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.ExceptionDescription copied from class:R1Univariate
Compute the Incremental under the Distribution between the 2 variates- Overrides:
incremental
in classR1Univariate
- Parameters:
dblXLeft
- Left Variate to which the cumulative is to be computeddblXRight
- 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 dblY) throws java.lang.ExceptionDescription copied from class:R1Univariate
Compute the inverse cumulative under the distribution corresponding to the given value- Overrides:
invCumulative
in classR1Univariate
- Parameters:
dblY
- 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
-
density
public double density(double dblX) throws java.lang.ExceptionDescription copied from class:R1Univariate
Compute the Density under the Distribution at the given Variate- Specified by:
density
in classR1Univariate
- Parameters:
dblX
- Variate at which the Density needs to be computed- Returns:
- The Density
- Throws:
java.lang.Exception
- Thrown if the input is invalid
-
mean
public double mean()Description copied from class:R1Univariate
Retrieve the Mean of the Distribution- Specified by:
mean
in classR1Univariate
- Returns:
- The Mean of the Distribution
-
median
public double median()Description copied from class:R1Univariate
Retrieve the Median of the Distribution- Overrides:
median
in classR1Univariate
- Returns:
- The Median of the Distribution
-
mode
public double mode()Description copied from class:R1Univariate
Retrieve the Mode of the Distribution- Overrides:
mode
in classR1Univariate
- Returns:
- The Mode of the Distribution
-
variance
public double variance()Description copied from class:R1Univariate
Retrieve the Variance of the Distribution- Specified by:
variance
in classR1Univariate
- Returns:
- The Variance of the Distribution
-
histogram
Description copied from class:R1Univariate
Retrieve the Univariate Weighted Histogram- Overrides:
histogram
in classR1Univariate
- Returns:
- The Univariate Weighted Histogram
-
random
public double random()Description copied from class:R1Univariate
Generate a Random Variable corresponding to the Distribution- Overrides:
random
in classR1Univariate
- Returns:
- Random Variable corresponding to the Distribution
-
errorFunction
public double errorFunction(double dblX) throws java.lang.ExceptionCompute the Error Function Around an Absolute Width around the Mean- Parameters:
dblX
- The Width- Returns:
- The Error Function Around an Absolute Width around the Mean
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
confidence
public double confidence(double dblWidth) throws java.lang.ExceptionCompute the Confidence given the Width around the Mean- Parameters:
dblWidth
- The Width- Returns:
- The Error Function Around an Absolute Width around the Mean
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
confidenceInterval
public double confidenceInterval(double dblConfidence) throws java.lang.ExceptionCompute the Width around the Mean given the Confidence Level- Parameters:
dblConfidence
- The Confidence Level- Returns:
- The Width around the Mean given the Confidence Level
- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-