2025-03-16

P-Value

Assuming the null hypothesis is true, a p-value in statistics measures the probability of getting a result as or more extreme as the observed one. It helps determine how statistically significant a test is.

Significance Levels of P-Values

  • p ≤ 0.01 : strong significance
  • 0.01 < p ≤ 0.05 : sigificant
  • 0.05 < p ≤ 0.1 : light significance
  • p > 0.1 : no significance

\(\alpha\) = significance level

If \(p \leq \alpha\), reject the null hypothesis (\(H_0\)).

If \(p > \alpha\), fail to reject the null hypothesis (\(H_0\)).

P-Value Example

You are testing whether a new type of fertilizer affects plant growth. You plant 10 plants and apply the fertilizer to 5 of them, while the other 5 receive no fertilizer (control group). After 4 weeks, you measure the plant heights.

The test gives p-value: 0.07

Since p = 0.07 > α = 0.05, we fail to reject the null hypothesis.

Meaing there isn’t enough evidence to suggest that the fertilizer significantly increases plant growth.

Math

\[ z = \frac{(\bar{x} - \mu_0)}{\frac{\sigma}{\sqrt{n}}} \]

\(\bar{x}\) = Sample mean

\(\mu_0\) = Population mean under the null hypothesis

\(\sigma\) = Population standard deviation

n = sample size

Visualize P-Value with ggplot: plot 1

Normal Distribution with Null Hypothesis in Red

Visualize P-Value with ggplot: plot 2

Null Hypothesis Mean in Red dashed line

Visualize P-Value with Plotly Plot

Visual of how change in the mean and standard deviation affect the distribution

P-Value Summary

  • The p-value helps determine if the null hypothesis will be rejected
  • A small p-value suggests rejecting null hypothesis
  • A large p-value suggests no rejecting null hypothesis