Sub topic 5
Making the decision: critical values and p-values
This chapter assumes you can state a null and alternative hypothesis, compute a test statistic, and read a normal or t table. It also assumes you know what Type I error and the significance level mean. Here you turn a test statistic into a reject or fail-to-reject decision, using either of two equivalent methods.
The decision is a comparison
A hypothesis test gives you a test statistic, such as z or t. You then ask whether that statistic is far enough from what the null hypothesis predicts to be unlikely if the null were true. "Unlikely" is fixed beforehand by the significance level, written α. It is the probability of a Type I error, which means rejecting a true null.
There are two ways to make the comparison:
- Critical value method. Find the cutoff on the test statistic's distribution that leaves probability α in the rejection region. Reject if the statistic falls beyond the cutoff.
- p-value method. Find the probability, assuming the null is true, of a statistic at least as extreme as the one you observed. Reject if that probability is below α.
Both methods always give the same decision for the same α and the same test.
Critical values
A critical value depends on three things: the distribution (z or t), the significance level, and whether the test is one-tailed or two-tailed.
- In a two-tailed test (Ha: μ ≠ μ0), α is split between both tails, with α/2 in each. You reject if the statistic is below the negative cutoff or above the positive one.
- In a right-tailed test (Ha: μ > μ0), all of α sits in the upper tail.
- In a left-tailed test (Ha: μ < μ0), all of α sits in the lower tail.
For a t-test the cutoff also depends on the degrees of freedom (df). For a single mean, df = n − 1. Fewer degrees of freedom mean fatter tails and a larger cutoff.
| Test | α = 0.10 | α = 0.05 | α = 0.01 |
|---|---|---|---|
| z, two-tailed (±) | 1.645 | 1.960 | 2.576 |
| z, one-tailed | 1.282 | 1.645 | 2.326 |
| t, two-tailed, df = 9 | 1.833 | 2.262 | 3.250 |
| t, two-tailed, df = 30 | 1.697 | 2.042 | 2.750 |
Read the table by column and row. The two-tailed z cutoff at 5% (1.960) equals the one-tailed cutoff at 2.5%. That is why a two-tailed test at α is harder to pass than a one-tailed test at the same α. As df grows, the t cutoffs approach the z cutoffs.
p-values
The p-value is the smallest significance level at which you could reject the null with the data you have. Equivalently, it is the probability of getting a test statistic at least as extreme as the observed one if the null is true.
For a two-tailed test, "at least as extreme" means either direction, so you double the one-tail probability:
- Right-tailed: p = P(Z ≥ z)
- Left-tailed: p = P(Z ≤ z)
- Two-tailed: p = 2 × P(Z ≥ |z|)
The rule is simple: reject H0 if p < α.
Worked example: same statistic, different tests
Suppose a fund manager claims a positive mean excess return. You test H0: μ ≤ 0 against Ha: μ > 0 and, using a large sample with a known standard error, obtain z = 1.80. Use α = 0.05.
Critical value method. The right-tailed cutoff is 1.645. Since 1.80 > 1.645, reject H0.
p-value method. P(Z ≥ 1.80) = 1 − 0.9641 = 0.0359. Since 0.0359 < 0.05, reject H0. The two methods agree.
Now suppose the question had been "does the mean differ from zero?" That is a two-tailed test, with H0: μ = 0 and Ha: μ ≠ 0. The cutoff becomes ±1.960, and 1.80 < 1.960, so you fail to reject. The p-value is 2 × 0.0359 = 0.0719, which exceeds 0.05. The data are the same, but the decision changes, because the alternative hypothesis you chose before looking at the data determines the test.
Doing it in code
The following script computes both decisions for a z-statistic and a t-statistic, and shows that they agree.
from scipy import stats
def decide(stat, dist, alpha, tails, df=None):
"""Return (critical value, p-value, decision) for a z or t test."""
d = stats.norm if dist == "z" else stats.t
args = () if dist == "z" else (df,)
if tails == "two":
crit = d.ppf(1 - alpha / 2, *args)
p = 2 * d.sf(abs(stat), *args)
reject_crit = abs(stat) > crit
elif tails == "right":
crit = d.ppf(1 - alpha, *args)
p = d.sf(stat, *args)
reject_crit = stat > crit
else: # left
crit = d.ppf(alpha, *args)
p = d.cdf(stat, *args)
reject_crit = stat < crit
reject_p = p < alpha
assert reject_crit == reject_p # the two methods must agree
return crit, p, "Reject H0" if reject_p else "Fail to reject H0"
print(decide(1.80, "z", 0.05, "right"))
print(decide(1.80, "z", 0.05, "two"))
print(decide(2.50, "t", 0.05, "two", df=9))The function sf is the survival function, which equals 1 − cdf and gives the upper-tail probability directly. The assertion checks that the critical value and p-value methods never disagree.
Statistical significance versus economic significance
Rejecting the null tells you the result is unlikely to come from chance alone. It does not tell you the effect is large enough to matter. With a large sample, even a tiny difference gives a very small p-value. A strategy with a statistically significant mean excess return of 0.02% per month may disappear once you subtract transaction costs and taxes. Always ask whether the estimated effect is meaningful in money terms, and consider risk as well as average return.
Common errors
- Reading p as the probability that H0 is true. The p-value is calculated assuming H0 is true. It is the probability of the data given the null, not the probability of the null given the data.
- Saying "accept H0". A failure to reject means the evidence was not strong enough. It does not prove the null.
- Forgetting to double for two tails. Software often reports a two-tailed p-value by default. If your test is one-tailed in the direction of the estimate, halve it. If the estimate has the opposite sign from Ha, the one-tailed p-value is above 0.5 and you cannot reject.
- Using z when you should use t. If the population variance is unknown and you estimate it from the sample, use t with n − 1 degrees of freedom. The z-cutoff is too small for small samples and would reject too often.
- Wrong α for the tail. Splitting α in a one-tailed test, or not splitting it in a two-tailed one, gives the wrong cutoff.
Confidence intervals as a third route
For a two-tailed test of H0: μ = μ0 at level α, you can build a (1 − α) confidence interval for the mean. If μ0 lies outside the interval, reject H0. If μ0 lies inside, fail to reject. This produces the same decision as the other two methods. It also shows the plausible range of values, which a bare "reject" does not.
Quick summary of the rules
- Reject H0 when the statistic lies in the rejection region, or equivalently when p < α.
- A smaller α makes the cutoff larger and makes rejection harder, which lowers the Type I error rate and raises the Type II error rate.
- The same data can give different decisions under one-tailed and two-tailed alternatives.
Exercise
You test H0: μ = 0 against Ha: μ ≠ 0 using a sample of 25 monthly returns. The t-statistic is 2.20. The two-tailed 5% critical value for df = 24 is 2.064, and the two-tailed 1% critical value is 2.797. (a) What is your decision at 5% and at 1%? (b) The software reports a two-tailed p-value of 0.038. Is that consistent with part (a)? (c) What would the p-value be for a right-tailed test, and what is the decision at 5%?
Show answer
(a) df = n − 1 = 24. At 5%, 2.20 > 2.064, so reject H0. At 1%, 2.20 < 2.797, so fail to reject. (b) Yes. 0.038 is below 0.05, so reject at 5%, and above 0.01, so fail to reject at 1%, which matches the critical value results. (c) The statistic is positive, so it lies in the direction of Ha. The right-tailed p-value is half the two-tailed value, 0.038 / 2 = 0.019. Since 0.019 < 0.05, reject H0 at 5%. The decision at 1% would be fail to reject, since 0.019 > 0.01.
Exercise
A researcher computes z = −1.50 for a left-tailed test of H0: μ ≥ μ0 at α = 0.05. The left-tail cutoff is −1.645 and P(Z ≤ −1.50) = 0.0668. State the decision using both methods, and explain why the two methods cannot disagree.
Show answer
Critical value method: −1.50 is not less than −1.645, so it is not in the rejection region. Fail to reject H0. p-value method: 0.0668 > 0.05, so fail to reject H0. The methods cannot disagree because the cutoff is defined as the statistic value whose tail probability equals α. A statistic beyond the cutoff has a tail probability smaller than α, and a statistic short of it has a larger one.