Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.statcato.statistics.inferential
Class HypothesisTest2Prop

    java.lang.Object
      org.statcato.statistics.inferential.HypothesisTest2Prop

    public class HypothesisTest2Prop

extends java.lang.Object

A hypothesis test for 2 population proportions.

Author:
  Margaret Yau

Constructor Summary
`HypothesisTest2Prop(int n1, int n2, int x1, int x2, double diff, double confidenceLevel, int testType, boolean pool)` Constructor

Method Summary
`java.lang.String` | `criticalValue()` Returns the critical value corresponding to the given confidence level and type of test.
`double` | `pValue()` Returns the p-value.
`double` | `testStatistics()` Returns the test statistics.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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 1
    `n2` - number of trials in population 2
    `x1` - number of events in population 1
    `x2` - number of events in population 2
    `diff` - hypothesized difference
    `confidenceLevel` - confidence level
    `testType` - test type (as defined in `HypothesisTest`)

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD