org.statcato.statistics.inferential.nonparametrics
Class SignTest
- java.lang.Object
-
- org.statcato.statistics.inferential.nonparametrics.SignTest
-
public class SignTest extends java.lang.ObjectSign test. Determines the likelihood of observing a specified number of observations above and below the hypothesized median.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field and Description static intGREATERAlternative hypothesis type: greater thanstatic intLESSAlternative hypothesis type: less thanstatic intNOTEQUALAlternative hypothesis type: not equal tostatic intTHRESHOLDSample size threshold for for normal approximation to binomial
-
Constructor Summary
Constructors Constructor and Description SignTest(int numPositive, int numNegative, double testMedian, int testType)Constructor, given summary data.SignTest(java.util.Vector<java.lang.Double> data, double testMedian, int testType)Constructor, given data values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublepValue()Returns the p-value.java.lang.StringtoString()
-
-
-
Field Detail
-
LESS
public static int LESS
Alternative hypothesis type: less than
-
GREATER
public static int GREATER
Alternative hypothesis type: greater than
-
NOTEQUAL
public static int NOTEQUAL
Alternative hypothesis type: not equal to
-
THRESHOLD
public static int THRESHOLD
Sample size threshold for for normal approximation to binomial
-
-
Constructor Detail
-
SignTest
public SignTest(int numPositive, int numNegative, double testMedian, int testType)Constructor, given summary data.- Parameters:
numPositive- number of positive signsnumNegative- number of negative signstestMedian- hypothesized mediantestType- type of alternative hypothesis
-
SignTest
public SignTest(java.util.Vector<java.lang.Double> data, double testMedian, int testType)Constructor, given data values.- Parameters:
data- vector of double data valuestestMedian- hypothesized mediantestType- type of alternative hypothesis
-
-
Method Detail
-
pValue
public double pValue()
Returns the p-value. Uses the exact binomial probabilities if if the sample size (excluding sample equal to the hypothesized median) is less than or equal to the sample size threshold; otherwise, uses normal approximation to binomial.- Returns:
- p-value
- See Also:
THRESHOLD
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG