public class Statistics
extends java.lang.Object
Constructor and Description |
---|
Statistics() |
Modifier and Type | Method and Description |
---|---|
static void |
analyse(double[] v)
Prints the means and standard deviation of the data to the standard
output.
|
static void |
analyse(double[] v,
java.io.PrintStream s)
Prints the means and standard deviation of the data to the specified
PrintStream
|
static java.lang.String |
analysisString(double[] v) |
static double |
correlation(double[] v1,
double[] v2) |
static double |
correlation2(double[] v1,
double[] v2) |
static double |
covar(double[] v1,
double[] v2)
Returns the covariance of the paired arrays of double.
|
static double |
max(double[] v)
Returns the maximum value in the array.
|
static double |
mean(double[] v)
Returns the average of an array of double.
|
static double |
mean(int[] v) |
static double |
min(double[] v)
Returns the minimum value in the array.
|
static java.lang.String |
rmsString(double[] v)
Returns a string that compares the root mean square of the data with the
standard deviation of the data.
|
static double |
sdev(double[] v)
Returns the sample standard deviation of an array of double.
|
static double |
sqr(double x)
Calculates the square of a double.
|
static double |
stderr(double[] v)
Returns the standard error of an array of double, where this is defined
as the standard deviation of the sample divided by the square root of the
sample size.
|
static double[] |
v2a(java.util.Vector v)
Converts a vector of Numbers into an array of double.
|
static double |
variance(double[] v)
Returns the variance of the array of double.
|
public static double[] v2a(java.util.Vector v)
public static double sqr(double x)
public static double mean(double[] v)
public static double mean(int[] v)
v
- - samplepublic static double sdev(double[] v)
public static double stderr(double[] v)
public static double variance(double[] v)
public static double covar(double[] v1, double[] v2)
public static double correlation(double[] v1, double[] v2)
public static double correlation2(double[] v1, double[] v2)
public static double max(double[] v)
public static double min(double[] v)
public static void analyse(double[] v)
public static void analyse(double[] v, java.io.PrintStream s)
v
- contains the datas
- is the corresponding PrintStreampublic static java.lang.String analysisString(double[] v)
v
- contains the datapublic static java.lang.String rmsString(double[] v)
v
- contains the data