org.statcato.statistics.inferential
Class HypothesisTest2Prop
- java.lang.Object
-
- org.statcato.statistics.inferential.HypothesisTest2Prop
-
public class HypothesisTest2Prop extends java.lang.ObjectA hypothesis test for 2 population proportions.
-
-
Constructor Summary
Constructors Constructor and Description HypothesisTest2Prop(int n1, int n2, int x1, int x2, double diff, double confidenceLevel, int testType, boolean pool)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringcriticalValue()Returns the critical value corresponding to the given confidence level and type of test.doublepValue()Returns the p-value.doubletestStatistics()Returns the test statistics.
-
-
-
Constructor Detail
-
HypothesisTest2Prop
public HypothesisTest2Prop(int n1, int n2, int x1, int x2, double diff, double confidenceLevel, int testType, boolean pool)Constructor- Parameters:
n1- number of trials in population 1n2- number of trials in population 2x1- number of events in population 1x2- number of events in population 2diff- hypothesized differenceconfidenceLevel- confidence leveltestType- test type (as defined inHypothesisTest)
-
-
Method Detail
-
testStatistics
public double testStatistics()
Returns the test statistics.- Returns:
- test statistic z score
-
criticalValue
public java.lang.String criticalValue()
Returns the critical value corresponding to the given confidence level and type of test. Uses the z distribution.- Returns:
- critical value
- See Also:
HypothesisTest
-
pValue
public double pValue()
Returns the p-value.- Returns:
- p-value
-
-
DMelt 3.0 © DataMelt by jWork.ORG