Hypothesis Testing, p-Value and Confidence Intervals: Biostatistics Review for Pharm.D

A one-page review of hypothesis testing for Pharm.D students: what a p-value really means, how to read a confidence interval, type I and II errors, and how to pick the right statistical test.

Hypothesis Testing, p-value & Confidence Intervals
Null hypothesis · p-value · 95% CI · type I/II errors · power & sample size · choosing the right statistical test
H₀ = null hypothesis (no difference) · H₁ = alternative hypothesis · α = significance level · β = type II error rate · CI = confidence interval · SD = standard deviation · SE = standard error
The logic in 4 steps
  • 1. Assume: H₀: no difference between groups
  • 2. Collect data: Run the study and calculate a test statistic (t, χ², F, z)
  • 3. p-value: Probability of results this extreme (or more) if H₀ were true
  • 4. Decide: p < α (usually 0.05): reject H₀ = “statistically significant”
What a p-value is NOT
  • Not: The probability that H₀ is true, or that the result happened by chance
  • Not: A measure of how big or important the effect is
  • p = 0.06 vs 0.04: Almost the same evidence; avoid treating 0.05 as a magic line
  • Large studies: Tiny, clinically useless differences can be “significant”
Confidence intervals
  • 95% CI meaning: Range of plausible values for the true effect; if the study were repeated many times, 95% of such intervals would contain the true value
  • For differences (mean difference, ARR): CI crossing 0 = not significant
  • For ratios (RR, OR, HR): CI crossing 1 = not significant
  • Width: Narrow CI = precise estimate (large sample); wide CI = uncertain
  • Why better than p: Shows size AND precision of the effect
Power & sample size
  • Power: Chance of detecting a real effect (1 − β); usually 80–90%
  • Sample size depends on: α, power, expected effect size, variability (SD), dropout rate
  • Underpowered study: “No significant difference” does not prove no difference
  • Multiple testing: Many comparisons raise false positives; use Bonferroni or pre-specified primary outcome
Choosing a test
  • 2 groups, numeric, normal: Independent t-test (paired t-test for before/after)
  • 2 groups, numeric, not normal: Mann-Whitney U (Wilcoxon signed-rank if paired)
  • ≥ 3 groups, numeric: One-way ANOVA (Kruskal-Wallis if not normal)
  • Categorical outcome: Chi-square test (Fisher's exact if expected counts < 5); McNemar if paired
  • Relationship between 2 numeric variables: Pearson correlation (Spearman if not normal); regression to predict
  • Time to event: Kaplan-Meier curves, log-rank test, Cox regression (hazard ratio)
Describing data
  • Normal data: Mean ± SD
  • Skewed data: Median (interquartile range)
  • SD vs SE: SD = spread of data; SE = precision of the mean (SD ÷ √n)
  • Normal curve: ± 1 SD ≈ 68%, ± 2 SD ≈ 95%, ± 3 SD ≈ 99.7% of values
Sources: Altman DG, Practical Statistics for Medical Research; American Statistical Association Statement on p-values (2016); Kirkwood & Sterne, Essential Medical Statistics. For learning and exam revision.

Type I and Type II errors

Truth: no real effect
(H₀ true)
Truth: real effect
(H₀ false)
Study says “significant” (reject H₀)Type I error (α)
False positive
usually set at 5%
Correct
Power = 1 − β
aim ≥ 80%
Study says “not significant”Correct
True negative
Type II error (β)
False negative
often 10–20%

Memory tip: Type I = “I see an effect that isn’t there”; Type II = “Too small a study misses a real effect”. Diagram drawn for this blog.

Practical points for students

When reading a drug trial, look at the confidence interval before the p-value: it tells you how big the benefit might be and whether it is clinically meaningful. Remember that statistical significance is not the same as clinical importance; a blood pressure drop of 1 mmHg can be “significant” in a huge trial but matter little to patients.

Important: this card is for education and revision. Treatment decisions must follow local guidelines and the treating doctor. More pocket cards: Biostatistics & Research Review | Clinical Pocket Cards | Disease Pocket Cards

No comments:

Post a Comment