- Hypothesis testing is a fundamental aspect of statistics.
- The p-value helps determine whether observed data deviates significantly from the null hypothesis.
2024-10-20
## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 30.33 43.29 49.26 49.53 54.89 67.87
t_result <- t.test(sample_data, mu = 52) t_result
## ## One Sample t-test ## ## data: sample_data ## t = -1.3796, df = 29, p-value = 0.1783 ## alternative hypothesis: true mean is not equal to 52 ## 95 percent confidence interval: ## 45.86573 53.19219 ## sample estimates: ## mean of x ## 49.52896
The formula for the t-statistic:
\[ t = \frac{\bar{x} - \mu}{s / \sqrt{n}} \]
Where: - \(\bar{x}\): Sample mean - \(\mu\): Population mean - \(s\): Standard deviation - \(n\): Sample size
\[ P(T \geq t_{obs}) \]