# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.descriptive.correlation

## Class CorrelationMatrix

• ### Constructor Summary

Constructors
Constructor and Description
CorrelationMatrix(Matrix cov)
Construct a correlation matrix from a covariance matrix.
• ### Method Summary

All Methods
Modifier and Type Method and Description
Vector stdev()
Gets the standard deviations of the elements.
double stdev(int i)
Gets the standard deviation of the i-th element.
Vector var()
Gets the variance of the elements.
double var(int i)
Gets the variance of the i-th element.
• ### Methods inherited from class com.numericalmethod.suanshu.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix

add, deepCopy, equals, get, getColumn, getColumn, getRow, getRow, hashCode, minus, multiply, multiply, nCols, nRows, ONE, opposite, scaled, set, setColumn, setRow, t, toDense, toString, ZERO
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Constructor Detail

• #### CorrelationMatrix

public CorrelationMatrix(Matrix cov)
Construct a correlation matrix from a covariance matrix.
Parameters:
cov - a covariance matrix
• ### Method Detail

• #### var

public Vector var()
Gets the variance of the elements.
Returns:
the variance of the elements
• #### stdev

public Vector stdev()
Gets the standard deviations of the elements.
Returns:
the standard deviations of the elements
• #### var

public double var(int i)
Gets the variance of the i-th element.
Parameters:
i - the index, counting from 1
Returns:
the variance of the i-th element
• #### stdev

public double stdev(int i)
Gets the standard deviation of the i-th element.
Parameters:
i - the index, counting from 1
Returns:
the standard deviation of the i-th element