Package org.drip.measure.gaussian
Class R1UnivariateNormal
java.lang.Object
org.drip.measure.distribution.R1Continuous
org.drip.measure.gaussian.R1UnivariateNormal
- Direct Known Subclasses:
ConditionalPriceDistribution,PriorDriftDistribution,ShortfallIncrementDistribution
public class R1UnivariateNormal extends R1Continuous
R1UnivariateNormal implements the Univariate R1 Normal Distribution. It implements the
Incremental, the Cumulative, and the Inverse Cumulative Distribution Densities. It provides the following
Functionality:
- Generate a N (0, 1) distribution
- Construct a R1 Normal/Gaussian Distribution
- Retrieve the Sigma
- Lay out the Support of the PDF Range
- Compute the cumulative under the distribution to the given value
- Compute the Incremental under the Distribution between the 2 variates
- Compute the inverse cumulative under the distribution corresponding to the given value
- Compute the Density under the Distribution at the given Variate
- Retrieve the Mean of the Distribution
- Retrieve the Median of the Distribution
- Retrieve the Mode of the Distribution
- Retrieve the Variance of the Distribution
- Retrieve the Univariate Weighted Histogram
- Generate a Random Variable corresponding to the Distribution
- Compute the Error Function Around an Absolute Width around the Mean
- Compute the Confidence given the Width around the Mean
- Compute the Width around the Mean given the Confidence Level
| Module | Computational Core Module |
| Library | Numerical Analysis Library |
| Project | Rd Continuous/Discrete Probability Measures |
| Package | R1 Covariant Gaussian Quadrature |
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description R1UnivariateNormal(double mean, double sigma)Construct a R1 Normal/Gaussian Distribution -
Method Summary
Modifier and Type Method Description doubleconfidence(double width)Compute the Confidence given the Width around the MeandoubleconfidenceInterval(double confidence)Compute the Width around the Mean given the Confidence Leveldoublecumulative(double x)Compute the cumulative under the distribution to the given valuedoubledensity(double x)Compute the Density under the Distribution at the given VariatedoubleerrorFunction(double x)Compute the Error Function Around an Absolute Width around the MeanArray2Dhistogram()Retrieve the Univariate Weighted Histogramdoubleincremental(double xLeft, double xRight)Compute the Incremental under the Distribution between the 2 variatesdoubleinvCumulative(double y)Compute the inverse cumulative under the distribution corresponding to the given valuedoublemean()Retrieve the Mean of the Distributiondoublemedian()Retrieve the Median of the Distributiondoublemode()Retrieve the Mode of the Distributiondoublerandom()Generate a Random Variable corresponding to the Distributiondoublesigma()Retrieve the Sigmastatic R1UnivariateNormalStandard()Generate a N (0, 1) distributiondouble[]support()Lay out the Support of the PDF Rangedoublevariance()Retrieve the Variance of the DistributionMethods inherited from class org.drip.measure.distribution.R1Continuous
bPOE, centralMoment, cvar, differentialEntropy, excessKurtosis, expectedShortfall, fisherInformation, iqr, kullbackLeiblerDivergence, nonCentralMoment, populationCentralMeasures, probabilityGeneratingFunction, quadratureEstimator, quantile, randomArray, skewness, supported, tukeyAnomaly, tukeyCriterionMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
R1UnivariateNormal
public R1UnivariateNormal(double mean, double sigma) throws java.lang.ExceptionConstruct a R1 Normal/Gaussian Distribution- Parameters:
mean- Mean of the Distributionsigma- 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()Lay out the Support of the PDF Range- Specified by:
supportin classR1Continuous- Returns:
- Support of the PDF Range
-
cumulative
public double cumulative(double x) throws java.lang.ExceptionCompute the cumulative under the distribution to the given value- Overrides:
cumulativein classR1Continuous- Parameters:
x- 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 xLeft, double xRight) throws java.lang.ExceptionCompute the Incremental under the Distribution between the 2 variates- Overrides:
incrementalin classR1Continuous- Parameters:
xLeft- Left Variate to which the cumulative is to be computedxRight- 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 y) throws java.lang.ExceptionCompute the inverse cumulative under the distribution corresponding to the given value- Overrides:
invCumulativein classR1Continuous- Parameters:
y- 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 x) throws java.lang.ExceptionCompute the Density under the Distribution at the given Variate- Specified by:
densityin classR1Continuous- Parameters:
x- 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()Retrieve the Mean of the Distribution- Overrides:
meanin classR1Continuous- Returns:
- The Mean of the Distribution
- Throws:
java.lang.Exception- Thrown if the Mean cannot be estimated
-
median
public double median()Retrieve the Median of the Distribution- Overrides:
medianin classR1Continuous- Returns:
- The Median of the Distribution
- Throws:
java.lang.Exception- Thrown if the Median cannot be estimated
-
mode
public double mode()Retrieve the Mode of the Distribution- Overrides:
modein classR1Continuous- Returns:
- The Mode of the Distribution
- Throws:
java.lang.Exception- Thrown if the Mode cannot be estimated
-
variance
public double variance()Retrieve the Variance of the Distribution- Overrides:
variancein classR1Continuous- Returns:
- The Variance of the Distribution
- Throws:
java.lang.Exception- Thrown if the Variance cannot be estimated
-
histogram
Retrieve the Univariate Weighted Histogram- Overrides:
histogramin classR1Continuous- Returns:
- The Univariate Weighted Histogram
-
random
public double random()Generate a Random Variable corresponding to the Distribution- Overrides:
randomin classR1Continuous- Returns:
- Random Variable corresponding to the Distribution
- Throws:
java.lang.Exception- Thrown if the Random Instance cannot be estimated
-
errorFunction
public double errorFunction(double x) throws java.lang.ExceptionCompute the Error Function Around an Absolute Width around the Mean- Parameters:
x- 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 width) throws java.lang.ExceptionCompute the Confidence given the Width around the Mean- Parameters:
width- 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 confidence) throws java.lang.ExceptionCompute the Width around the Mean given the Confidence Level- Parameters:
confidence- The Confidence Level- Returns:
- The Width around the Mean given the Confidence Level
- Throws:
java.lang.Exception- Thrown if the Inputs are Invalid
-