Hypothesis testing = a statistical method used to decide whether there is enough evidence in data to support a specific claim about a population.
2026-01-31
Hypothesis testing = a statistical method used to decide whether there is enough evidence in data to support a specific claim about a population.
Test 2 competing hypotheses:
\[ H_0: \mu = \mu_0 \]
\[ H_a: \mu \neq \mu_0 \]
where \(\mu\) is the true population mean..
p-value = the probability of observing data at least as extreme as the sample result, assuming the null hypothesis is true.
\[ p = P(\text{data} \mid H_0) \]
A small p-value provides evidence against \(H_0\).
Suppose the average exam score ~ 75.
We collect a random sample of exam scores and want to test whether the true mean score differs from 75.
t_test_result <- t.test(scores, mu = 75) t_test_result
## ## One Sample t-test ## ## data: scores ## t = 0.95166, df = 9, p-value = 0.3661 ## alternative hypothesis: true mean is not equal to 75 ## 95 percent confidence interval: ## 73.89835 77.70165 ## sample estimates: ## mean of x ## 75.8