Critical Value Method

The Critical Value Method is one of the two standard approaches to hypothesis testing. It works by comparing your test statistic to a threshold value - the critical value - to decide whether to reject the null hypothesis.

How It Works

  1. Choose a significance level (commonly 0.05, or 5%)
  2. Determine the critical value from the relevant distribution (e.g. Normal or t-distribution) based on that significance level
  3. Calculate the test statistic from your sample data
  4. Compare the test statistic to the critical value

Making the Decision

If the test statistic falls beyond the critical value (in the "rejection region"), you reject the null hypothesis. Otherwise, you fail to reject it.

A Simple Example

from scipy import stats

# For a 95% confidence, two-tailed test, the critical Z-value is approximately:
critical_value = stats.norm.ppf(0.975)
print(critical_value)   # approximately 1.96

test_statistic = 2.3   # calculated from your sample

if abs(test_statistic) > critical_value:
    print("Reject the null hypothesis")
else:
    print("Fail to reject the null hypothesis")
The critical value acts like a fixed line drawn before you even look at your results - deciding it in advance, based only on your chosen significance level, keeps the test objective and prevents the threshold from being adjusted after seeing the data.

Coming Up Next

Next, you'll learn the P Value Method - the second major approach to hypothesis testing, and the one used most often in modern practice.

Worked Example: Testing a Delivery Time Claim

A food delivery company claims its average delivery time is 30 minutes. A city manager suspects it is longer. She records 36 random deliveries and finds a sample mean of 32.5 minutes. From long-term data, the population standard deviation is known to be 6 minutes.

  1. Hypotheses: H0: mean = 30. H1: mean > 30. This is a right-tailed test, because only "longer" matters.
  2. Significance level: alpha = 0.05.
  3. Critical value: for a right-tailed Z test at 0.05, the critical value is about 1.645, because 5 percent of the standard normal curve lies to its right.
  4. Test statistic: Z = (32.5 - 30) / (6 / sqrt(36)) = 2.5 / 1 = 2.5.
  5. Decision: 2.5 is greater than 1.645, so the statistic falls in the rejection region. Reject H0; the data suggests deliveries take longer than claimed.

One-Tailed vs Two-Tailed Critical Values

The direction of the alternative hypothesis decides where the rejection region sits and which value you look up:

Alternative HypothesisRejection RegionZ Critical Value at alpha = 0.05
mean is not equal to valueBoth tails, alpha/2 in eachabout plus or minus 1.96
mean > valueRight tail onlyabout 1.645
mean < valueLeft tail onlyabout -1.645

At alpha = 0.01, the two-tailed Z value grows to about 2.576, which makes rejection harder. A stricter significance level always pushes the critical value further out.

Using the t-Distribution in Python

When the population standard deviation is unknown and you estimate it from the sample, use the t-distribution. Its critical value depends on degrees of freedom (n - 1), and it is larger than the Z value for small samples:

from scipy import stats
import numpy as np

sample = np.array([31, 35, 29, 33, 34, 30, 36, 32, 31, 34])
mu0 = 30
alpha = 0.05
n = len(sample)

t_stat = (sample.mean() - mu0) / (sample.std(ddof=1) / np.sqrt(n))
t_crit = stats.t.ppf(1 - alpha, df=n - 1)   # right-tailed

print(round(t_stat, 3), round(t_crit, 3))
if t_stat > t_crit:
    print("Reject H0")
else:
    print("Fail to reject H0")

Notice ddof=1, which gives the sample standard deviation. For a two-tailed test, use stats.t.ppf(1 - alpha/2, df=n - 1) and compare the absolute value of the statistic.

Common Mistakes with the Critical Value Method

  • Mixing up tails. Using 1.96 for a one-tailed test makes the test stricter than intended.
  • Using Z when t is needed. With a small sample and unknown standard deviation, Z values understate the uncertainty.
  • Saying "accept H0". Not rejecting the null does not prove it true; it only means the evidence was not strong enough.
  • Choosing the direction after seeing the data, which inflates the chance of a false positive.
  • Ignoring assumptions such as random sampling and roughly normal data for small samples.

The critical value method and the p-value method always lead to the same decision for the same test and alpha. The p-value simply also tells you how strong the evidence is.

Ready to Master Data Science?

Join Uncodemy's Data Science Course and build real, job-ready skills with expert mentors.

Explore Course