Hypothesis Testing Overview
Hypothesis Testing
Introduction to Hypothesis Testing
Hypothesis testing is generally considered more difficult than confidence intervals. Confidence intervals primarily involve performing a calculation and interpreting the result, but hypothesis testing requires a structured decision-making process with multiple steps. The conceptual framework and the logic behind rejecting or failing to reject a claim demand careful attention.
The process can be introduced with a concrete example. Suppose a person claims to be a 40% free throw shooter. An observer believes the shooter is actually worse — a 20% shooter. The goal is to design a test to decide which claim is more plausible based on evidence.
Null and Alternative Hypotheses
In hypothesis testing, two competing statements are set up:
Null hypothesis (H0) : The statement that is assumed true until evidence suggests otherwise. It often represents the status quo or a skeptical viewpoint. In the free throw example, the null hypothesis is that the shooter's true probability of success p (making a free throw) is 0.2, or possibly less: H0:p≤0.2.
Alternative hypothesis (H1) : The statement that the researcher hopes to support. Here, the alternative is H1:p>0.2 (the shooter believes they are better than 20%).
The parameter p is the true probability of success on any single attempt. The null hypothesis is often written as H0:p=0.2 for computational purposes — this turns a composite hypothesis (an inequality) into a simple hypothesis (a single value). This simplification is justified because the probability of making a Type 1 error is maximized when p is exactly at the boundary value (0.2); if the true p is smaller, the chance of falsely rejecting H0 is even lower.
Definition: Null hypothesis (H0) — the hypothesis to be tested, assumed true unless strong evidence contradicts it. Alternative hypothesis (H1) — the hypothesis that is accepted if the null is rejected. Notation varies; some sources use Ha for the alternative.
The Testing Framework
To perform the test, a random sample of free throws is taken. Let the sample size be n=20, a manageable number. Let X be the number of successes (makes) in 20 attempts.
X is a binomial random variable with parameters n=20 and unknown probability p.
Under the null hypothesis (assuming p=0.2), the expected number of successes is 20×0.2=4.
If the observed number of successes is low (e.g., 4 or fewer), that supports the null. If it is high (e.g., 8 or more), that supports the alternative. The challenge is to determine how many successes constitute strong enough evidence to reject H0.
Types of Errors
Two kinds of mistakes can occur when making a decision:
Type 1 error: Rejecting H0 when it is actually true. This is analogous to convicting an innocent person in a courtroom.
Type 2 error: Failing to reject H0 when it is false. This is analogous to acquitting a guilty person.
The probability of a Type 1 error is denoted by α (the level of significance). The probability of a Type 2 error is denoted by β. There is a trade-off: making α smaller (harder to commit a Type 1 error) typically increases β (easier to commit a Type 2 error). The only way to reduce both errors simultaneously is to increase the sample size.
Key takeaway: A smaller α makes it harder to reject H0, protecting against false positives, but may allow false negatives. The choice of α depends on the consequences of each error.
Classical Approach (Critical Region)
The classical approach, developed decades ago, involves setting a level of significance α before the experiment and defining a critical region (or rejection region) — the set of values of the test statistic that lead to rejecting H0.
Steps in the Classical Approach
Set up the hypotheses: H0:p≤0.2 (treated as p=0.2), H1:p>0.2.
Choose the level of significance α. A common choice is 0.05 (5%), but any value can be used depending on the consequences of a Type 1 error. For matters of life and death, α might be set extremely small (e.g., 0.0001).
Determine the critical region. Find the smallest number of successes k such that P(X≥k∣p=0.2)≈α.
Conduct the experiment — shoot 20 free throws and record X.
Make a decision: if X falls in the critical region, reject H0; otherwise, fail to reject H0.
Finding the Critical Region for the Free Throw Example
With n=20 and p=0.2 under H0, compute P(X≥k) for various k using the binomial distribution.
P(X≥7)=1−P(X≤6). Using a binomial CDF:
1−BinomCDF(20,0.2,6)=1−0.9133=0.0867This is above 0.05.
P(X≥8)=1−P(X≤7)=1−0.9679=0.0321 This is below 0.05.
Since X is discrete, there is no k that gives exactly 0.05. The safe choice is to use k=8, so the critical region is {8,9,10,…,20}. The actual probability of a Type 1 error is then 0.0321, slightly less than the chosen α of 0.05.
Decision rule: If the shooter makes 8 or more free throws out of 20, reject H0 (conclude p>0.2). Otherwise, fail to reject H0.
Note: The critical region is determined by assuming the null hypothesis is true (using p=0.2) and ensuring the probability of incorrectly rejecting H0 is at most α.
Modern Approach (p-value)
The modern approach, which has become common in the last several decades, computes a p-value and then makes a decision by comparing the p-value to the chosen α.
Definition of p-value
p-value: The probability, assuming the null hypothesis is true, of observing a test statistic value as extreme as, or more extreme than, the value actually observed. "More extreme" is defined in the direction of the alternative hypothesis.
For the free throw example, if the shooter makes 6 out of 20, the p-value is:
Using the binomial distribution:
So the p-value is approximately 0.196.
Decision Using p-value
If the p-value is less than the chosen level of significance α, reject H0. If it is greater than or equal to α, fail to reject H0.
With α=0.05, the p-value of 0.196 is larger than 0.05, so we fail to reject H0. This does not mean H0 is accepted; it simply means there is insufficient evidence to conclude that p>0.2.
If the shooter had made 8 out of 20, the p-value would be P(X≥8)=0.0321, which is less than 0.05, leading to rejection of H0.
Common Misinterpretation
The p-value is not the probability that the null hypothesis is true. That probability cannot be determined using classical hypothesis testing. The p-value is a conditional probability under the assumption that H0 is true — it measures how unusual the observed result would be if H0 were true.
Crucial distinction: A small p-value indicates that the observed data are unlikely under H0, which casts doubt on H0, but it does not quantify the probability that H0 is true.
Terminology and Comparison
Classical approach (critical region): The decision rule is determined before the experiment based on α. It leads to a clear "reject" or "fail to reject" outcome.
Significance testing (p-value approach): The p-value is computed after the experiment, and the decision is made by comparing it to α. This approach is sometimes called significance testing because it asks whether the result is statistically significant at a given level (e.g., "significant at the 5% level").
Statistical significance: A result is said to be statistically significant at level α if the p-value is less than α.
Both approaches incorporate the idea of controlling the Type 1 error rate. In practice, the p-value approach is more flexible because it provides a measure of evidence that can be interpreted at any α.
Practical Considerations
Hypothesis testing is not purely theoretical; the decision to reject or fail to reject H0 often leads to real-world actions (e.g., investing in a new marketing campaign, approving a drug, or concluding that a process improvement is effective). The consequences of Type 1 and Type 2 errors should guide the choice of α and the interpretation of results.
To extend these ideas to testing means (rather than proportions), a t-statistic is often used, as described in sections 84 and 85 of the textbook. The logic remains the same: set up hypotheses, choose α, compute a test statistic, find the p-value (or critical region), and make a decision. The distribution changes from binomial to normal or t, but the fundamental reasoning is identical.

Ask anything
We've read this whole study set, so questions about it get the best answers.