Learn Without Walls

Comprehensive Study Guide: Hypothesis Testing

Complete reference for Module 8 concepts and formulas

View Quick Reference Card

1. Introduction to Hypothesis Testing

What is Hypothesis Testing?

A statistical procedure used to test a claim about a population parameter based on sample data. It uses proof by contradiction: assume a claim is true, collect data, and determine how likely the data would be if the claim were true.

Null and Alternative Hypotheses

Hypothesis Description Symbol
Null (H₀) The claim being tested; represents "no effect" or status quo. Always contains equals sign (=). H₀: μ = μ₀
H₀: p = p₀
Alternative (Hₐ or H₁) The claim we're trying to find evidence for. Contains ≠, <, or >. Hₐ: μ ≠ μ₀ (two-tailed)
Hₐ: μ > μ₀ (right)
Hₐ: μ < μ₀ (left)

Types of Tests

Test Type Alternative Hypothesis When to Use
Two-Tailed Hₐ: parameter ≠ value Testing for any difference (higher OR lower)
Right-Tailed Hₐ: parameter > value Testing if parameter is greater than claimed
Left-Tailed Hₐ: parameter < value Testing if parameter is less than claimed

Components of Hypothesis Testing

Steps of Hypothesis Testing

  1. State H₀ and Hₐ, choose α
  2. Calculate test statistic from sample data
  3. Find critical value(s) or p-value
  4. Make decision: reject or fail to reject H₀
  5. State conclusion in context
Decision Rules:

2. Type I and Type II Errors & Power

The Four Possible Outcomes

Our Decision H₀ is True H₀ is False
Reject H₀ Type I Error (α)
False Positive
Correct Decision
Power (1 - β)
Fail to Reject H₀ Correct Decision
(1 - α)
Type II Error (β)
False Negative

Type I Error (α)

Definition: Rejecting a true null hypothesis (false positive)

Probability: α (significance level we choose)

Example: Conclude a drug works when it actually doesn't

Control: We directly control by choosing α (0.05, 0.01, etc.)

Type II Error (β)

Definition: Failing to reject a false null hypothesis (false negative)

Probability: β (depends on sample size, effect size, α)

Example: Conclude a drug doesn't work when it actually does

Control: Indirectly controlled by increasing sample size

Statistical Power

Power = 1 - β

Probability of correctly rejecting a false H₀
Recommended: Power ≥ 0.80 (80%)

Factors Affecting Power

Factor To Increase Power Effect
Sample Size (n) Increase n Most practical method
Significance Level (α) Increase α But increases Type I error
Effect Size Larger effect Not always controllable
Variability (σ) Decrease σ Better measurements

3. Hypothesis Tests for Means

Z-Test vs. T-Test

Test When to Use Test Statistic
Z-Test σ (population SD) is KNOWN z = (x̄ - μ₀) / (σ/√n)
T-Test σ is UNKNOWN (use s) t = (x̄ - μ₀) / (s/√n)
df = n - 1
In Practice: Almost always use t-test because σ is rarely known in real-world scenarios.

Z-Test for Population Mean

z = (x̄ - μ₀) / (σ / √n)

Where: x̄ = sample mean, μ₀ = hypothesized mean, σ = population SD, n = sample size

T-Test for Population Mean

t = (x̄ - μ₀) / (s / √n)

Where: s = sample SD, df = n - 1
Use t-distribution table with df to find critical values

Critical Values (Standard Normal Distribution)

Test Type α = 0.10 α = 0.05 α = 0.01
Two-tailed ±1.645 ±1.96 ±2.576
Right-tailed 1.282 1.645 2.326
Left-tailed -1.282 -1.645 -2.326

Decision Rules for Tests of Means

Test Type Reject H₀ if...
Two-tailed |z| > critical value or |t| > critical value
Right-tailed z > critical value or t > critical value
Left-tailed z < critical value or t < critical value

4. Hypothesis Tests for Proportions

When to Use

Use proportion tests when data is categorical (yes/no, success/failure) and can be expressed as a proportion or percentage.

Notation

Symbol Meaning
p Population proportion (parameter, unknown)
p₀ Hypothesized population proportion (in H₀)
Sample proportion = x/n
x Number of successes in sample
n Sample size

Test Statistic for Proportions

z = (p̂ - p₀) / √(p₀(1-p₀)/n)

Important: Use p₀ in denominator, NOT p̂

Required Conditions

Before conducting test, verify:

  1. Random sample
  2. Independent observations
  3. Normal approximation: np₀ ≥ 10 AND n(1-p₀) ≥ 10

If conditions fail, test is not valid!

5. Common Mistakes to Avoid

Don't Make These Errors!

  1. Wrong hypotheses: H₀ always has =, never ≥ or ≤
  2. Confusing α and p-value: α is chosen before test; p-value is calculated from data
  3. Saying "accept H₀": We "fail to reject" H₀, never "accept" it
  4. Using p̂ in proportion SE: For hypothesis tests, use p₀ in √(p₀(1-p₀)/n)
  5. Ignoring conditions: Always check conditions before conducting test
  6. Wrong test choice: Use t-test when σ is unknown (almost always)
  7. Misinterpreting p-value: p-value ≠ P(H₀ is true)
  8. Confusing statistical and practical significance: Significant ≠ important

6. Formula Summary

Test Formula Notes
Z-Test (Mean) z = (x̄ - μ₀) / (σ/√n) When σ is known
T-Test (Mean) t = (x̄ - μ₀) / (s/√n)
df = n - 1
When σ is unknown
Z-Test (Proportion) z = (p̂ - p₀) / √(p₀(1-p₀)/n) Check: np₀ ≥ 10, n(1-p₀) ≥ 10
Sample Proportion p̂ = x/n x = successes, n = sample size
Power Power = 1 - β β = P(Type II error)

7. Interpreting Results

P-Value Interpretation

P-value Range Interpretation
p < 0.01 Very strong evidence against H₀
0.01 ≤ p < 0.05 Strong evidence against H₀
0.05 ≤ p < 0.10 Weak evidence against H₀
p ≥ 0.10 Little or no evidence against H₀

Conclusion Language

If we reject H₀:

"There is sufficient evidence at the α = ___ significance level to [conclude Hₐ in context]."

If we fail to reject H₀:

"There is not sufficient evidence at the α = ___ significance level to [conclude Hₐ in context]."

Study Tips

View Quick Reference Card → Back to Module Home