Package org.drip.measure.statistics
Class MultivariateMoments
java.lang.Object
org.drip.measure.statistics.MultivariateMoments
public class MultivariateMoments
extends java.lang.Object
MultivariateMoments generates and holds the Specified Multivariate Series Mean, Co-variance, and
other selected Moments. It provides the following Functionality:
- Generate the MultivariateMoments Instance from the Series Realizations provided
- Generate the MultivariateMoments Instance from the Specified Mean and Co-variance Inputs
- Retrieve the Number of Variates in the Distribution
- Retrieve the Variates for which the Metrics are available
- Add the Mean for the Named Variate
- Retrieve the Mean of the Named Variate
- Add the Co-variance for the Named Variate Pair
- Retrieve the Variance of the Named Variate
- Retrieve the Co-variance of the Named Variate Pair
- Retrieve the Correlation between the Named Variate Pair
| Module | Computational Core Module |
| Library | Numerical Analysis Library |
| Project | Rd Continuous/Discrete Probability Measures |
| Package | R1 Rd Thin Thick Moments |
- Author:
- Lakshmi Krishnamurthy
-
Method Summary
Modifier and Type Method Description booleanaddCovariance(java.lang.String variate1Name, java.lang.String variate2Name, double covariance)Add the Co-variance for the Named Variate PairbooleanaddMean(java.lang.String variateName, double mean)Add the Mean for the Named Variatedoublecorrelation(java.lang.String variate1Name, java.lang.String variate2Name)Retrieve the Correlation between the Named Variate Pairdoublecovariance(java.lang.String variate1Name, java.lang.String variate2Name)Retrieve the Co-variance of the Named Variate Pairdoublemean(java.lang.String variateName)Retrieve the Mean of the Named VariateintnumVariate()Retrieve the Number of Variates in the Distributionstatic MultivariateMomentsStandard(java.lang.String[] variateNameArray, double[][] multiVariateArray)Generate the MultivariateMoments Instance from the Series Realizations providedstatic MultivariateMomentsStandard(java.lang.String[] variateNameArray, double[] meanArray, double[][] covarianceMatrix)Generate the MultivariateMoments Instance from the Specified Mean and Co-variance Inputsdoublevariance(java.lang.String variateName)Retrieve the Variance of the Named Variatejava.util.Set<java.lang.String>variateList()Retrieve the Variates for which the Metrics are availableMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
Standard
public static final MultivariateMoments Standard(java.lang.String[] variateNameArray, double[][] multiVariateArray)Generate the MultivariateMoments Instance from the Series Realizations provided- Parameters:
variateNameArray- Array of Variate Name HeadersmultiVariateArray- Array of Variate Realization Arrays- Returns:
- The MultivariateMoments Instance
-
Standard
public static final MultivariateMoments Standard(java.lang.String[] variateNameArray, double[] meanArray, double[][] covarianceMatrix)Generate the MultivariateMoments Instance from the Specified Mean and Co-variance Inputs- Parameters:
variateNameArray- Array of Variate Name HeadersmeanArray- Array of Variate MeanscovarianceMatrix- Double Array of the Variate Co-variance- Returns:
- The MultivariateMoments Instance
-
numVariate
public int numVariate()Retrieve the Number of Variates in the Distribution- Returns:
- The Number of Variates in the Distribution
-
variateList
public java.util.Set<java.lang.String> variateList()Retrieve the Variates for which the Metrics are available- Returns:
- The Set of Variates
-
addMean
public boolean addMean(java.lang.String variateName, double mean)Add the Mean for the Named Variate- Parameters:
variateName- The Named Variatemean- The Variate Mean- Returns:
- TRUE - The Variate Mean successfully added
-
mean
public double mean(java.lang.String variateName) throws java.lang.ExceptionRetrieve the Mean of the Named Variate- Parameters:
variateName- The Named Variate- Returns:
- Mean of the Named Variate
- Throws:
java.lang.Exception- Thrown if the Named Variate Mean cannot be retrieved
-
addCovariance
public boolean addCovariance(java.lang.String variate1Name, java.lang.String variate2Name, double covariance)Add the Co-variance for the Named Variate Pair- Parameters:
variate1Name- The Named Variate #1variate2Name- The Named Variate #2covariance- The Variate-Pair Covariance- Returns:
- TRUE - The Variate Pair Co-variance successfully added
-
variance
public double variance(java.lang.String variateName) throws java.lang.ExceptionRetrieve the Variance of the Named Variate- Parameters:
variateName- The Named Variate- Returns:
- Variance of the Named Variate
- Throws:
java.lang.Exception- Thrown if the Named Variate Variance cannot be retrieved
-
covariance
public double covariance(java.lang.String variate1Name, java.lang.String variate2Name) throws java.lang.ExceptionRetrieve the Co-variance of the Named Variate Pair- Parameters:
variate1Name- The Named Variate #1variate2Name- The Named Variate #2- Returns:
- Co-variance of the Named Variate Pair
- Throws:
java.lang.Exception- Thrown if the Named Variate Co-variance cannot be retrieved
-
correlation
public double correlation(java.lang.String variate1Name, java.lang.String variate2Name) throws java.lang.ExceptionRetrieve the Correlation between the Named Variate Pair- Parameters:
variate1Name- The Named Variate #1variate2Name- The Named Variate #2- Returns:
- Correlation between the Named Variate Pair
- Throws:
java.lang.Exception- Thrown if the Named Variate Correlation cannot be retrieved
-