17.3.1.2 Algorithms (One-Sample T-Test)tTest-OneSample-Algorithm
A one sample t-test can be employed to test whether or not the true mean of a population, , is equal to or different than a specified test mean, ,. The test can either be one- or two-tailed, and the hypotheses take the form:
: vs :, two tailed
: vs :, upper tailed
: vs :, lower tailed
Test Statistics
Let be the input dataset, the statistic t-value has a Student's t-distribution with (n-1) degrees of freedom, which computed as:
Where and
For a given significance level, , we will reject the null hypothesis , when:
, for two tailed test
, for upper tailed test
, for lower tailed test
where is the critical value from t distribution indexed at level by degrees of freedom. For a better way to express the probability of hypothesis, the P-Value is also reported. And we can reject the null hypothesis if . The P-value for t-statistic is associated with the incomplete beta function:
where
Confidence Intervals
For the specified significance level, the confidence interval for the sample mean is:
Null Hypothesis
|
Confidence Interval
|
|
|
|
|
|
|
Power Analysis
The power of a one sample t-test is a measurement of its sensitivity. In terms of the null and alternative hypotheses, power is the probability that the test statistic T will be extreme enough to allow the rejection of the null hypothesis when it should in fact be rejected (i.e. given the null hypothesis is not true). For each of the three different null hypotheses, power is mathematically defined below:
where T is a random variable having a t-distribution with degrees of freedom. The computation for hypothetical power is the same as for actual power except that the test statistic t , the critical value and degree of freedom are recomputed using hypothetical sample sizes instead of the actual sample size.
|