CHAPTER 19
Beginner
Hypothesis Testing
Updated: May 18, 2026
5 min read
# CHAPTER 19
Hypothesis Testing in R
1. Chapter Introduction
Hypothesis testing is the formal statistical framework for making evidence-based decisions. Is the new drug effective? Are the salary differences real? This chapter builds the complete hypothesis testing toolkit in R.2. Hypothesis Testing Framework
text
3. One-Sample t-Test
r
4. Two-Sample t-Test
r
5. Chi-Squared and ANOVA
r
6. Mini Project: Survey Analysis Tool
r
7. Common Mistakes
- p-value ≠ probability H₀ is true: A p-value of 0.04 means "if H₀ were true, there's a 4% chance of seeing this data." It does NOT mean there's a 96% probability that H₁ is true.
-
Multiple testing problem: Running 20 t-tests at α=0.05 gives ~1 false positive by chance. Use Bonferroni correction:
p.adjust(p_values, method="bonferroni").
8. MCQs
Question 1
p-value < 0.05 means?
Question 2
Two-sample t-test var.equal=FALSE runs?
Question 3
Paired t-test is used when?
Question 4
Chi-squared test is for?
Question 5
ANOVA tests?
Question 6
TukeyHSD() after ANOVA performs?
Question 7
Cohen's d = 0.8+ indicates?
Question 8
Bonferroni correction addresses?
Question 9
Type I error = ?
Question 10
Confidence interval that doesn't include H₀ value indicates?
9. Interview Questions
- Q: What is the difference between a one-tailed and two-tailed t-test?
- Q: What is the multiple testing problem and how do you address it?