The five main steps
- Set hypotheses: null
and alternative - Set level of significance
- Identify test statistic, distribution, and rejection criteria
- Compute observed test statistic value
- Conclude
Step 1: Set hypothesis
In general, the position of null hypothesis is adopted - it is typically the default assumption.
We usually let hypothesis that we want to prove be the alternative hypothesis.
Possible outcomes
Reject
or fail to reject
Type of test:
- one-sided
- two-sided
Step 2: Level of significance
Outcomes:
- Reject
, conclude - Do not reject
, conclude
Type II error
Not rejecting null hypothesis
when it is false Power
1 - \beta
, where
Type I error is considered a serious error.
Step 3: Test statistic, distribution, rejection
Select a suitable test statistic - it quantifies the likeliness of observing the sample, assuming null hypothesis holds.
The
Step 4 & 5: Calculation and Conclusion
Once sample is taken, we check whether the obtained value of the test statistic is within rejection region:
- if it is, sample too improbable assuming
holds, hence rejected. - if it is not, we failed to reject
We cannot prove
H_{0}
is true: use the term "fail to rejectH_{0}
"
Value approach to testing
p-value
The p-value is the probability of obtaining a test statistic at least as extreme (
or ) than the observed sample value, given is true. Also known as the observed level of significance.
For hypothesis tests, the
Hypothesis Test for the Mean
Known Variance
Conditions
- Population variance
is known - either
- underlying distribution is normal
is sufficiently large ( )
For the null hypothesis
- Rejection regions for test statistic:
or value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
Unknown Variance
Conditions
- Population variance
is known - underlying distribution is normal
For the null hypothesis
- Rejection regions for test statistic:
or value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
Confidence intervals for two-sided tests
The two-sided hypothesis test procedure is equivalent to finding a
100(1-\alpha)
confidence interval for\mu
.
Consider the hypothesis
The
If it contains
Based on the above inequality,
This means that when the confidence interval contains
\mu_0
,H_{0}
will not be rejected at level\alpha
.
Similarly, this also means that if it does not contain
Hypothesis Tests for Comparing Means
Independent Samples with Known Different Variances
Condition
- population variances
are known - either
- distributions are normal
are sufficiently large
For the null hypothesis
- Rejection regions for test statistic:
or value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
Independent Samples with Unknown Different Variances
Condition
- population variances
are unknown are sufficiently large
For the null hypothesis
- Rejection regions for test statistic:
or value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
Independent Samples with Equal Variances
Condition
- population variances
are unknown but equal - distributions are normal
are small
For the null hypothesis
- Rejection regions for test statistic:
or value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
- Rejection regions for test statistic:
value:
- Rejection regions for test statistic:
Dependent Samples
For paired data, define
For the null hypothesis
Depending on the sample size, the test statistic follows:
- small:
- large: