The p-value is a number that describes how likely the data would be if the null hypothesis were true.
It helps to decide whether the patterns in the data are likely due to chance or are statistically significant.
1
The p-value is a number that describes how likely the data would be if the null hypothesis were true.
It helps to decide whether the patterns in the data are likely due to chance or are statistically significant.
All statistical tests begin with a null hypothesis (\(H_0\)), which typically states there is no effect or no difference.
\[ \begin{aligned} H_0\!: &\ \text{There is no difference in lifespan between Group A and Group B} \\ H_1\!: &\ \text{There is a difference in lifespan between Group A and Group B} \end{aligned} \]
A p-value tells us how likely it is to see the results we found if the null hypothesis is true.
The p-value does not prove that the alternative hypothesis is true.
Statistical tests use a formula to compare the observed data with what is expected under the null hypothesis.
For example, the formula for a z-test is:
\[ z = \frac{\bar{x} - \mu}{\sigma / \sqrt{n}} \]
Where:
- \(\bar{x}\) = sample mean
- \(\mu\) = population mean
- \(\sigma\) = standard deviation
- \(n\) = sample size
## `geom_smooth()` using formula = 'y ~ x'
A small p-value indicates strong evidence against the null hypothesis.
\[ \text{If } p \leq \alpha, \text{ reject } H_0 \\ \text{If } p > \alpha, \text{ fail to reject } H_0 \]
Common choices:
- \(\alpha = 0.05\) (5%)
- \(\alpha = 0.01\) (1%)