|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.statcato.statistics.inferential.HypothesisTest1Prop
public class HypothesisTest1Prop
A hypothesis test for 1 population proportion.
Constructor Summary | |
---|---|
HypothesisTest1Prop(int n,
double p,
double confidenceLevel,
int testType)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
criticalValue()
Returns the critical value corresponding to the given confidence level and type of test. |
double |
pValue(double pHat)
Returns the p-value corresponding to pHat in a z distribution. |
double |
testStatistics(double pHat)
Returns the test statistics for the given sample proportion pHat. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HypothesisTest1Prop(int n, double p, double confidenceLevel, int testType)
n
- sample sizep
- hypothesized proportionconfidenceLevel
- confidence leveltestType
- (as defined in HypothesisTest
)Method Detail |
---|
public double testStatistics(double pHat)
z = (pHat - p) / sqrt(p * (1-p) / n)
pHat
- hypothesized population proportion
public java.lang.String criticalValue()
HypothesisTest
public double pValue(double pHat)
pHat
- sample proportion
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |