public class TestingOnValue extends Object
| Constructor and Description |
|---|
TestingOnValue() |
| Modifier and Type | Method and Description |
|---|---|
String |
getSummary() |
void |
report() |
void |
run(double xHat,
double s,
int n,
double xNull)
The method computes the p-value for both one-tail and two-tails testing on the mean of a numerical variable for a population
|
void |
run(double xHat,
double s,
int n,
double xNull,
double significanceLevel)
The method computes the p-value for both one-tail and two-tails testing
|
String |
toString() |
boolean |
willRejectH0(double significanceLevel,
boolean twoTails)
The method reject null hypothesis if the p-value calculated from the sample is smaller than the significance level
|
public void run(double xHat,
double s,
int n,
double xNull)
xHat - the point estimate of the sample means - the point estimate of the sample standard deviationn - the sample sizexNull - the null value for the mean of the population under null hypothesispublic void run(double xHat,
double s,
int n,
double xNull,
double significanceLevel)
xHat - the point estimate of the sample means - the point estimate of the sample standard deviationn - the sample sizexNull - the null value for the mean of the population under null hypothesissignificanceLevel - the default significance level includedpublic boolean willRejectH0(double significanceLevel,
boolean twoTails)
significanceLevel - the significance level, usually about 0.05twoTails - true if the testing is two tails; false otherwisepublic String getSummary()
public void report()
Copyright © 2017. All rights reserved.