2025-06-08

What is a P-Value?

  • The p-value is the probability of obtaining a result equal to or more extreme than what was observed, assuming the null hypothesis is true.
  • A small p-value indicates strong evidence against the null hypothesis.
  • Common thresholds: 0.05, 0.01, 0.001.

The Role of P-Values in Vaccine Effectiveness Studies

  • In clinical trials, p-values help test the hypothesis that vaccines significantly reduce infection rates.
  • Misinterpretation of p-values leads to flawed public perception of effectiveness.
  • High p-values ≠ vaccine doesn’t work — it may reflect small sample size or bad design.

Mathematical Definition of a P-Value

\[ p = P(\text{observing data as extreme as the sample data} \mid H_0 \text{ is true}) \]

\[ p = \int_{x_{obs}}^\infty f(x \mid H_0) \, dx \]

Example Data (Simulated)

set.seed(123)
placebo <- rbinom(1000, 1, 0.10)  # 10% infection rate
vaccine <- rbinom(1000, 1, 0.08)  # 8% infection rate

data <- data.frame(
  group = rep(c("Placebo", "Vaccine"), each = 1000),
  infected = c(placebo, vaccine)
)

Infection Rate by Group (ggplot2)

Hypothesis Testing Result (with code)

test_result <- prop.test(x = c(sum(placebo), sum(vaccine)),
                         n = c(length(placebo), length(vaccine)),
                         alternative = "greater")
test_result$p.value
## [1] 0.1301831
  • Null Hypothesis: No difference in infection rate
  • Alternative: Placebo has higher infection rate
  • p-value < 0.05 suggests vaccine helps

P-Value Distribution (ggplot2)

3D Infection Simulation (plotly)