2025-03-15

P-Value?

The p-value is a measure of the evidence against a null hypothesis. A smaller p-value indicates stronger evidence against the null hypothesis. - p < 0.05: Strong evidence against Hâ‚€ (reject Hâ‚€) - p > 0.05: Weak evidence against Hâ‚€ (fail to reject Hâ‚€)

One-Sample t-Test

set.seed(127)
data <- rnorm(27, mean=5, sd=2)
t.test(data, mu=5)
## 
##  One Sample t-test
## 
## data:  data
## t = -0.52125, df = 26, p-value = 0.6066
## alternative hypothesis: true mean is not equal to 5
## 95 percent confidence interval:
##  4.171098 5.493550
## sample estimates:
## mean of x 
##  4.832324

Plotly Visualization 1

Plotly Visualization 2

ggplot Simulation of P-Values

ggplot Visualization of Test Statistics

p-value Formula

\[ p = P(T \geq t | H_0 \text{ is true}) \]

t-statistic Formula

\[ t = \frac{\bar{x} - \mu}{s / \sqrt{n}} \]

Conclusion

P-values help us determine statistical significance.