|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.akutan.utilities.Statistics
public class Statistics
Class that wraps the colt descriptive statistics class and provides a few extras along the same vein.
| Constructor Summary | |
|---|---|
Statistics()
|
|
| Method Summary | |
|---|---|
static double |
annualizeMean(double mean)
Return the simple compounded annualization of the mean monthly return and convert from a decimal to a percent. |
static double |
annualizeStdDev(double sigma)
Annualize the monthly standard deviation and convert from a decimal to a percent. |
static double |
beta(cern.colt.list.DoubleArrayList l1,
cern.colt.list.DoubleArrayList l2)
Called to compute the beta of series 1 with respect to series 2. |
static double |
chiSquared(double n,
double x)
Returns the probability density function for the chi squared distribution for n degrees of freedom at x. |
static double |
correlation(cern.colt.list.DoubleArrayList l1,
cern.colt.list.DoubleArrayList l2)
Compute the correlation of the series in the two lists |
static double |
erfinv(double y)
Inverse error function from the Scilab source code |
static double |
kendallsTau(cern.colt.list.DoubleArrayList l1,
cern.colt.list.DoubleArrayList l2)
Compute kendall's tau for the two seriesthe sample covariance. |
static double |
makePercent(double decimal)
Converts a decimal to a percent. |
static double |
mean(cern.colt.list.DoubleArrayList l)
Compute the arithmetic mean of a list |
static double |
mean(int num,
double sumx)
Compute the mean from a sum of the values and the count. |
static double |
stddev(cern.colt.list.DoubleArrayList list)
Compute the standard deviation using the code in colt |
static double |
stddev(int num,
double sumx,
double sumx2)
Compute the standard deviation given the number of values, the sum of the values and the sum of the values squared. |
static double |
variance(int num,
double sumx,
double sumx2)
Compute the variance of a sequence of values from the number of values, the sum of the values and the sum of the values squared. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Statistics()
| Method Detail |
|---|
public static double erfinv(double y)
y -
public static double makePercent(double decimal)
decimal - input
public static double annualizeMean(double mean)
mean - Monthly mean return as a decimal
public static double annualizeStdDev(double sigma)
sigma - Monthly standard deviation as a decimal
public static double correlation(cern.colt.list.DoubleArrayList l1,
cern.colt.list.DoubleArrayList l2)
l1 - List of time series pointsl2 - List of time series points
public static double kendallsTau(cern.colt.list.DoubleArrayList l1,
cern.colt.list.DoubleArrayList l2)
l1 - List of time series pointsl2 - List of time series points
java.lang.IllegalArgumentException - if the lengths of the two series are different
public static double beta(cern.colt.list.DoubleArrayList l1,
cern.colt.list.DoubleArrayList l2)
l1 - List of dependent series pointsl2 - List of independent series points
public static double mean(cern.colt.list.DoubleArrayList l)
l - List of time series points
public static double mean(int num,
double sumx)
num - Number of valuessumx - Sum of values
public static double stddev(int num,
double sumx,
double sumx2)
num - Number of valuessumx - Sum of valuessumx2 - Sum of squared values
public static double variance(int num,
double sumx,
double sumx2)
num - Number of valuessumx - Sum of valuessumx2 - Sum of squared values
public static double stddev(cern.colt.list.DoubleArrayList list)
list - List of values
public static double chiSquared(double n,
double x)
n - Number of degrees of freedomx - Point on the distribution
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||