Documentation API of the 'org.apache.commons.math3.stat.correlation.PearsonsCorrelation' Java class
PearsonsCorrelation
org.apache.commons.math3.stat.correlation

Class PearsonsCorrelation



  • public class PearsonsCorrelationextends Object
    Computes Pearson's product-moment correlation coefficients for pairs of arrays or columns of a matrix.

    The constructors that take RealMatrix or double[][] arguments generate correlation matrices. The columns of the input matrices are assumed to represent variable values. Correlations are given by the formula

    cor(X, Y) = Σ[(xi - E(X))(yi - E(Y))] / [(n - 1)s(X)s(Y)] where E(X) is the mean of X, E(Y) is the mean of the Y values and s(X), s(Y) are standard deviations.

    To compute the correlation coefficient for a single pair of arrays, use PearsonsCorrelation() to construct an instance with no data and then correlation(double[], double[]). Correlation matrices can also be computed directly from an instance with no data using computeCorrelationMatrix(double[][]). In order to use getCorrelationMatrix(), getCorrelationPValues(), or getCorrelationStandardErrors(); however, one of the constructors supplying data or a covariance matrix must be used to create the instance.

Warning: You cannot see the full API documentation of this class since the access to the DatMelt documentation for third-party Java classes is denied. Guests can only view jhplot Java API. To view the complete description of this class and its methods, please request the full DataMelt membership.

If you are already a full member, please login to the DataMelt member area before visiting this documentation.