|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.statcato.statistics.inferential.nonparametrics.RunsTest
public class RunsTest
Runs test for randomness. A nonparametic test that the number of runs (sequence of data having the same characteristic) in a sequence of sample data to test for randomness in the order of the data.
Constructor Summary | |
---|---|
RunsTest(int n1,
int n2,
int G,
double significance)
Constructor, given summarized data. |
|
RunsTest(java.util.Vector<Cell> vector,
java.lang.String cat1,
java.lang.String cat2,
double significance)
Constructor, given a vector of Cell containing data of two categories, the two categories, and significance level. |
|
RunsTest(java.util.Vector<java.lang.Double> vector,
double separator,
double significance)
Constructor, given a vector containing numerical data, a separator value, and the significance. |
Method Summary | |
---|---|
double |
criticalValue()
|
double |
mu()
Returns the mean of the distribution of runs, mu = 2 * n1 * n2 / (n1 + n2) + 1. |
double |
pValue()
Returns the p-value. |
double |
sigma()
Returns the standard deviation of the distribution of runs, sigma = [(2 * n1 * n2)(2 * n1 * n2 - n1 - n2) / (n1 + n2)^2 / (n1 + n2 - 1)]^0.5 |
double |
testStatistic()
Returns the test statistic z = (G - mu) / sigma, where G is the number of runs, mu the mean of the distribution of runs, and sigma the standard deviatioin of the distribution of runs. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RunsTest(int n1, int n2, int G, double significance)
n1
- number of category 1n2
- number of category 2G
- number of runssignificance
- significance levelpublic RunsTest(java.util.Vector<Cell> vector, java.lang.String cat1, java.lang.String cat2, double significance)
vector
- vector of Cellcat1
- string representing category 1cat2
- string representing category 2significance
- significance levelpublic RunsTest(java.util.Vector<java.lang.Double> vector, double separator, double significance)
vector
- vector of double valuesseparator
- double value separating the two groupssignificance
- significance levelMethod Detail |
---|
public double testStatistic()
public double mu()
public double sigma()
public double pValue()
public double criticalValue()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |