Introduction to Hypothesis
Testing
Overview
Hypothesis testing is a fundamental statistical method used to make decisions about populations based on sample data.
It provides a framework for determining whether there is enough evidence to support a particular claim about a
population parameter.
Basic Concepts
1. Null and Alternative Hypotheses
Null Hypothesis (H₀)
The default position or status quo
Usually states that there is no effect or no difference
What we assume is true until proven otherwise
Example: "The mean height of adult males is 175 cm"
Alternative Hypothesis (H₁ or Hₐ)
The claim we want to test
Contradicts the null hypothesis
What we need evidence to support
Can be one-tailed or two-tailed
Example: "The mean height of adult males is not 175 cm"
2. Types of Errors
Type I Error (α)
Rejecting a true null hypothesis
False positive
Probability = significance level (α)
Usually set at 0.05 or 0.01
Type II Error (β)
Failing to reject a false null hypothesis
False negative
Related to statistical power (1 - β)
Affected by sample size and effect size
3. Test Statistics
Common test statistics include:
Z-test (for large samples, known population standard deviation)
T-test (for small samples, unknown population standard deviation)
Chi-square test (for categorical data)
F-test (for comparing variances)
Steps in Hypothesis Testing
1. State the Hypotheses
Clearly define H₀ and H₁
Specify the parameter of interest
2. Choose Significance Level (α)
Typically 0.05 or 0.01
Based on consequences of Type I error
3. Select Test Statistic
Based on:
Type of data
Sample size
Population parameters known/unknown
Assumptions about the population
4. Calculate Test Statistic
Collect and analyze sample data
Apply appropriate formula
5. Find Critical Value(s)
Use statistical tables or software
Based on:
Significance level
Degrees of freedom
One or two-tailed test
6. Make Decision
Compare test statistic to critical value
Determine whether to reject H₀
State conclusion in context
Detailed Example: Z-Test for Population
Mean
Problem Statement
A manufacturer claims their light bulbs last 1000 hours on average. A sample of 100 bulbs has a mean life of 985 hours
with a standard deviation of 50 hours. Test this claim at α = 0.05.
Solution
1. State Hypotheses
H₀: μ = 1000 hours
H₁: μ ≠ 1000 hours (two-tailed)
2. Significance Level
α = 0.05
Critical z-values = ±1.96
3. Calculate Test Statistic
z = (x̄ - μ₀)/(σ/√n)
z = (985 - 1000)/(50/√100)
z = -15/5
z = -3
4. Decision
|-3| > 1.96
Reject H₀
Conclusion: There is sufficient evidence to conclude that the mean life differs from 1000 hours
Common Applications
1. Medical Research
Drug effectiveness
Treatment comparisons
Risk factor analysis
2. Quality Control
Product specifications
Process improvements
Defect rates
3. Social Sciences
Survey analysis
Behavioral studies
Demographic research
Practice Problems
1. A college claims its graduates earn an average starting salary of $60,000. A sample of 50 recent graduates
shows a mean salary of $58,500 with a standard deviation of $5,000. Test the claim at α = 0.05.
2. A new teaching method is claimed to improve test scores. The traditional method has a mean score of 75. A
sample of 40 students using the new method has a mean score of 78 with a standard deviation of 8. Is there
evidence the new method is better? Use α = 0.05.
Key Assumptions and Considerations
1. Sample Size
Affects choice of test statistic
Influences power of test
Impacts normality assumptions
2. Population Distribution
Normality requirements
Independence of observations
Homogeneity of variance
3. Practical Significance
Statistical vs. practical significance
Effect size consideration
Real-world implications
Solutions to Practice Problems
1. Starting Salary Problem
H₀: μ = $60,000
H₁: μ ≠ $60,000
z = (58500 - 60000)/(5000/√50) = -2.12
Decision: Reject H₀ (|-2.12| > 1.96)
2. Teaching Method Problem
H₀: μ = 75
H₁: μ > 75 (one-tailed)
t = (78 - 75)/(8/√40) = 2.37
Critical t (α = 0.05, df = 39) = 1.685
Decision: Reject H₀ (2.37 > 1.685)
Additional Resources
Statistical software packages (R, Python, SPSS)
Online calculators and visualization tools
Textbooks and online courses
Interactive simulation websites
Common Pitfalls to Avoid
1. Misinterpreting p-values
2. Confusing statistical and practical significance
3. Ignoring assumptions
4. Over-relying on hypothesis tests
5. Using inappropriate test statistics