Sub topic 5
Making the Decision: Critical Values and p-Values
Assume you know sample means, standard deviations, z-scores, and the difference between a null hypothesis and an alternative hypothesis. This chapter shows how to turn a test statistic into a decision.
Critical-value approach
A critical value is a boundary that separates results considered unusual under the null hypothesis from results that are not unusual. The boundary depends on:
- The significance level, \(\alpha\), such as 5%.
- Whether the test is one-tailed or two-tailed.
- The reference distribution, such as the standard normal or t-distribution.
- The degrees of freedom for a t-test.
For a two-tailed test with \(\alpha = 5\%\), the total rejection probability is split between both tails. Using the standard normal distribution, the critical values are approximately \(-1.96\) and \(+1.96\).
The decision rule is:
- Reject \(H_0\) if the test statistic is below the lower critical value or above the upper critical value.
- Fail to reject \(H_0\) otherwise.
| Test type | 5% critical value rule | Column | Column |
|---|---|---|---|
| Two-tailed z-test | Reject if \( | z | > 1.96\) |
| Upper-tailed z-test | Reject if \(z > 1.645\) | ||
| Lower-tailed z-test | Reject if \(z < -1.645\) |
The phrase fail to reject is preferred to “accept.” A nonsignificant result does not prove that the null hypothesis is true. It means the sample did not provide enough evidence against it.
p-value approach
A p-value is the probability, assuming the null hypothesis is true, of observing a test statistic at least as extreme as the one calculated. For a two-tailed test, “at least as extreme” includes both directions.
Compare the p-value with \(\alpha\):
- If \(p\text{-value} < \alpha\), reject \(H_0\).
- If \(p\text{-value} \geq \alpha\), fail to reject \(H_0\).
The two approaches give the same decision when they use the same distribution, tail structure, and significance level. A p-value also communicates the strength of evidence more precisely. However, it does not measure the probability that the null hypothesis is true.
from scipy import stats
t_stat = 2.18
degrees_of_freedom = 19
alpha = 0.05
p_value = 2 * stats.t.sf(abs(t_stat), degrees_of_freedom)
if p_value < alpha:
decision = "Reject H0"
else:
decision = "Fail to reject H0"
print(f"p-value: {p_value:.4f}")
print(decision)Worked decision
Suppose a two-tailed t-test produces \(t = 2.18\) with 19 degrees of freedom. At the 5% level, the critical values are approximately \(\pm 2.093\). Because \(2.18 > 2.093\), reject \(H_0\). Equivalently, the p-value is below 0.05.
Exercise
A two-tailed test has z = -2.40 and alpha = 5%. What is the decision?
Show answer
Reject H0 because |-2.40| = 2.40 is greater than the critical value 1.96.