Class BivariateNormalDistribution
- java.lang.Object
-
- org.jquantlib.math.distributions.BivariateNormalDistribution
-
- All Implemented Interfaces:
- Ops.BinaryDoubleOp
public class BivariateNormalDistribution extends java.lang.Object implements Ops.BinaryDoubleOp
Cumulative bivariate normal distibution function (West 2004).The bivariate normal distribution is a distribution of a pair of variables whose conditional distributions are normal and that satisfy certain other technical conditions.
The implementation derives from the article "Better Approximations To Cumulative Normal Distibutions", Graeme West, Dec 2004 available at www.finmod.co.za. Also available in Wilmott Magazine, 2005, (May), 70-76, The main code is a port of the C++ code at www.finmod.co.za/cummnorm.zip.
The algorithm is based on the near double-precision algorithm described in "Numerical Computation of Rectangular Bivariate an Trivariate Normal and t Probabilities", Genz (2004), Statistics and Computing 14, 151-160. (available at www.math.wsu.edu/faculty/genz/papers/bvnt/bvnt.html)
The standard bivariate normal distribution function is given by
This implementation mainly differs from the original code in two regards;
- The implementation of the cumulative normal distribution is
CumulativeNormalDistribution - The arrays XX and W are zero-based
-
-
Constructor Summary
Constructors Constructor and Description BivariateNormalDistribution(double rho)Constructor of BivariateNormalDistribution to initialize the correlation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleop(double x, double y)Computes the Bivariate Normal Distribution of the two variablesxandywhich can be correlated in a particular manner.
-
-
-
Constructor Detail
-
BivariateNormalDistribution
public BivariateNormalDistribution(double rho)
Constructor of BivariateNormalDistribution to initialize the correlation. The correlationrhomust be >=-1.0 and <=1.0.- Parameters:
rho- correlation
-
-
Method Detail
-
op
public double op(double x, double y)Computes the Bivariate Normal Distribution of the two variablesxandywhich can be correlated in a particular manner.- Specified by:
opin interfaceOps.BinaryDoubleOp- Parameters:
x- First variabley- Second variable- Returns:
- BVN
-
-
DataMelt 3.0 © DataMelt by jWork.ORG