|
Java Statistical Classes | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--jsc.onesample.Ztest
This class represents a z-test for the mean of a distribution. It performs a significance test of the mean when the population standard deviation, sigma, is known. This procedure is based on the normal distribution. From the Central Limit Theorem, this test can be used if the sample is large (say > 30), substituting the sample standard deviation for sigma. Note that the corresponding confidence interval is provided by class LargeSampleMeanCI.
| Constructor Summary | |
Ztest(double[] x,
double mu)
Create significance test results. |
|
Ztest(double[] x,
double mu,
double sigma)
Create significance test results. |
|
Ztest(double[] x,
double mu,
double sigma,
H1 alternative)
Create significance test results. |
|
Ztest(double[] x,
double mu,
H1 alternative)
Create significance test results. |
|
| Method Summary | |
double |
getMean()
Returns sample mean. |
double |
getSd()
Returns sample standard deviation. |
double |
getSP()
Returns the value of the significance probability. |
static double |
getSP(double z,
H1 alternative)
Calculate the significance probability. |
double |
getTestStatistic()
Returns value of test statistic. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Ztest(double[] x,
double mu,
double sigma,
H1 alternative)
x - the sample data.mu - the value of the mean under the null hypothesis.sigma - the standard deviation of the population.alternative - code indicating the alternative hypothesis: LESS_THAN, NOT_EQUAL, or GREATER_THAN.
public Ztest(double[] x,
double mu,
double sigma)
x - the sample data.mu - the value of the mean under the null hypothesis.sigma - the standard deviation of the population.
public Ztest(double[] x,
double mu,
H1 alternative)
x - the sample data.mu - the value of the mean under the null hypothesis.alternative - code indicating the alternative hypothesis: LESS_THAN, NOT_EQUAL, or GREATER_THAN.
public Ztest(double[] x,
double mu)
x - the sample data.mu - the value of the mean under the null hypothesis.| Method Detail |
public double getMean()
public double getSd()
public double getSP()
SignificanceTest
getSP in interface SignificanceTest
public static double getSP(double z,
H1 alternative)
z - the z-test statistic.alternative - code indicating the alternative hypothesis: LESS_THAN, NOT_EQUAL, or GREATER_THAN.
public double getTestStatistic()
getTestStatistic in interface SignificanceTest
|
Java Statistical Classes | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||