BackHypothesis Testing: Steps, Methods, and Applications
Study Guide - Smart Notes
Tailored notes based on your materials, expanded with key definitions, examples, and context.
Ch. 8 - Hypothesis Testing
Introduction to Hypothesis Testing
Hypothesis testing is a fundamental procedure in inferential statistics used to test claims about a population based on sample data. The process involves four main steps, each designed to systematically evaluate the validity of a stated assumption (the null hypothesis) against an alternative claim.
Step 1: Write Hypotheses – Formulate the null hypothesis (H0) and the alternative hypothesis (Ha).
Step 2: Calculate Test Statistic – Compute a value from the sample data that measures how far the sample statistic is from the hypothesized population parameter.
Step 3: Get P-Value – Determine the probability of obtaining a test statistic as extreme as, or more extreme than, the observed value, assuming H0 is true.
Step 4: State Conclusion – Decide whether to reject or fail to reject H0 based on the P-value and the chosen significance level (α).
Example: An article claims that 50% of students listen to music while studying. We want to test if the proportion is higher.
Step 1: Writing Hypotheses
Every hypothesis test begins with two statements:
Null Hypothesis (H0): The default assumption or status quo about a population parameter (e.g., H0: p = 0.5).
Alternative Hypothesis (Ha): The claim we are seeking evidence for, which contradicts H0 (e.g., Ha: p > 0.5).
Hypotheses are written in terms of population parameters (mean μ, proportion p, variance σ2).
Example: Testing if the average age of students is less than 23: H0: μ = 23, Ha: μ < 23.
Example: Testing if more than 20% of companies have female CEOs: H0: p = 0.20, Ha: p > 0.20.
Step 2: Calculating the Test Statistic
The test statistic quantifies how far the sample statistic is from the hypothesized parameter, measured in standard errors. The choice of test statistic depends on the parameter and whether the population standard deviation is known.
For Mean (σ known):
For Mean (σ unknown):
For Proportion:
For Variance:
Example: A sample of 35 students has a mean age of 22, population σ = 4, testing H0: μ = 23.
Step 3: Getting the P-Value
The P-value is the probability of obtaining a test statistic as extreme as the observed value, assuming H0 is true. The direction (left, right, or two-tailed) depends on Ha:
Left-tailed: Ha: parameter < value (area to the left of test statistic)
Right-tailed: Ha: parameter > value (area to the right of test statistic)
Two-tailed: Ha: parameter ≠ value (sum of both tails)
Example: For z = -2.00 in a left-tailed test, the P-value is the area to the left of z = -2.00.
Step 4: Stating the Conclusion
Compare the P-value to the significance level (α):
If P-value < α, reject H0 (sufficient evidence for Ha).
If P-value ≥ α, fail to reject H0 (insufficient evidence for Ha).
Always restate the conclusion in the context of the original claim.
Hypothesis Tests for Mean
Standard Deviation (σ) Known
When σ is known, use the z-test for the mean. The population must be normally distributed or n > 30.
Test Statistic:
Example: Testing if the mean lifespan of bulbs is less than 25,000 hours with σ = 1,200, n = 36, sample mean = 24,600, α = 0.10.
Standard Deviation (σ) Unknown
When σ is unknown, use the t-test for the mean. The sample standard deviation (s) is used, and the t-distribution with n-1 degrees of freedom applies.
Test Statistic:
Example: Testing if the average battery life is less than 12 hours with sample mean = 11.4, s = 1.2, n = 40, α = 0.05.
Hypothesis Tests for Proportion
Used to test claims about population proportions. The sample size must be large enough for the normal approximation to apply (np ≥ 5 and nq ≥ 5).
Test Statistic:
Example: Testing if the pass rate is below 90% with n = 200, x = 172, α = 0.01.
Hypothesis Tests for Variance
Used to test claims about population variance or standard deviation. The chi-square distribution is used.
Test Statistic:
Example: Testing if the variance in fill-weight is greater than 0.25 g2 with n = 30, s2 = 0.31, α = 0.10.
Hypothesis Testing Using Critical Values
Instead of the P-value, the critical value method compares the test statistic to a threshold (critical value) determined by α. If the test statistic falls in the rejection region (beyond the critical value), reject H0.
Critical Value: The boundary between expected and unusual test statistic values.
Example: Testing if the mean sodium content is more than 500 mg with n = 36, sample mean = 507 mg, σ = 15 mg, α = 0.01.
Confidence Intervals & Hypothesis Testing
A two-tailed hypothesis test at significance level α is equivalent to checking if the claimed value falls within a (1-α) confidence interval. If the claimed value is outside the interval, reject H0.
Example: A sample mean of 78, s = 6, n = 25, testing if the mean is different from 75 at α = 0.01.
Type I and Type II Errors
Because hypothesis tests are probabilistic, errors can occur:
Type I Error (α): Rejecting H0 when it is true (false positive).
Type II Error (β): Failing to reject H0 when it is false (false negative).
Reducing α decreases the probability of a Type I error but increases the probability of a Type II error, and vice versa.
H0 True | H0 False | |
|---|---|---|
Reject H0 | Type I Error | Correct |
Fail to Reject H0 | Correct | Type II Error |
Example: Testing if a treatment lowers blood pressure to 120 mmHg. Type I error: Conclude treatment works when it does not. Type II error: Conclude treatment does not work when it does.
Summary Table: Hypothesis Test Steps and Formulas
Step | Mean (σ known) | Mean (σ unknown) | Proportion | Variance |
|---|---|---|---|---|
Hypotheses | H0: μ = μ0 | H0: μ = μ0 | H0: p = p0 | H0: σ2 = σ20 |
Test Statistic | ||||
P-value | Area beyond test statistic (direction depends on Ha) | |||
Conclusion | Compare P-value to α; reject or fail to reject H0 | |||