org.knime.base.util.math

## Class StatisticUtils

• ```public final class StatisticUtils
extends Object```
Implements basic statistical functions.
Author:
Christoph Sieb, University of Konstanz
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static double[][]` `covariance(double[][] dataMatrix)`
Calculates the covariance matrix for the given input matrix.
`static double[]` `mean(double[][] matrix)`
Calculates the mean for each column of the given input matrix.
`static double[]` `standardDeviation(double[][] matrix)`
Calculates the standard deviation for each column of the given input matrix.
`static double[]` `variance(double[][] matrix)`
Calculates the variance for each column of the given input matrix.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Method Detail

• #### covariance

`public static double[][] covariance(double[][] dataMatrix)`
Calculates the covariance matrix for the given input matrix.
Parameters:
`dataMatrix` - The input data matrix. The first dimension represents data rows, the second dimension the columns (attributes).
Returns:
the square covariance matrix
• #### standardDeviation

`public static double[] standardDeviation(double[][] matrix)`
Calculates the standard deviation for each column of the given input matrix.
Parameters:
`matrix` - the input matrix
Returns:
an array with the standard deviation for each column
• #### variance

`public static double[] variance(double[][] matrix)`
Calculates the variance for each column of the given input matrix.
Parameters:
`matrix` - the input matrix
Returns:
an array with the variance for each column
• #### mean

`public static double[] mean(double[][] matrix)`
Calculates the mean for each column of the given input matrix.
Parameters:
`matrix` - the input matrix
Returns:
an array with the mean for each column