wanna mathMath ain't scary (not anymore)
4-Tier Textbook Index • Vol → Mod → Ch → Lab

Engineering Mathematics Volumes I–VI

6 Volumes • 20 Modules • 85 ChaptersFull Matrix →
4-Tier Statistics Index • Vol S → Mod → Ch → Lab

Interactive Statistics (S.1–S.6)

6 Modules • 18 ChaptersStatistics Index →
CHAPTER S.4.3 • 2DPublished Interactive Labs~35 min study

Hypothesis Testing, p-Values, Type I/II Errors & Statistical Power

Balance false alarms (α) against missed discoveries (β) on overlapping H₀ and H₁ bells—and cure the #1 p-value misconception forever.

Engineering & Physical Application Context

Clinical trial sample-size calculation, quality defect alarms, and digital experiment stopping rules.

Governing Mathematical Formulation
α=P(Type I Error),β=P(Type II Error),Power=1−β\alpha = P(\text{Type I Error}), \qquad \beta = P(\text{Type II Error}), \qquad \text{Power} = 1 - \beta
Volume S • Module S.41 Interactive Lab(s)

The Question You Should Ask

What does a pp-value actually measure under the null world H0H_0—and how do effect size δ\delta, sample size nn, and threshold α\alpha trade off false alarms against Statistical Power (1−β)(1 - \beta)?

In Simple Words & Math

A pp-value is P(data at least this extreme∣H0)P(\text{data at least this extreme} \mid H_0) assuming the null model holds—never P(H0∣data)P(H_0 \mid \text{data}), which requires a Bayesian prior odds ratio.

Tightening false-alarm threshold α\alpha lowers Type I errors at the direct cost of shifting rejection cutoffs outward, shrinking Statistical Power 1−β1 - \beta under H1H_1 unless nn grows.

4-Step Pedagogical Chapter Rhythm • Geometric Intuition First
Ch. S.4.3
STEP 1 • GEOMETRIC QUESTION

If you get p = 0.03, does that mean there is a 3% chance the null hypothesis is true—and why can an underpowered study miss a real cure half the time?

STEP 2 • INTERACTIVE LAB EXPLORATION

Slide true effect δ = μ₁ − μ₀, sample size n, and threshold α between overlapping H₀ and H₁ curves, then click any observed x̄ to shade its live p-value tail and Power (1 − β).

STEP 3 • SYMBOLIC FORMALIZATION
p=P(∣Xˉ−μ0∣≥∣xˉobs−μ0∣∣H0),Power=1−β=P(Reject H0∣H1)p = P(|\bar{X} - \mu_0| \ge |\bar{x}_{\text{obs}} - \mu_0| \mid H_0), \qquad \text{Power} = 1 - \beta = P(\text{Reject } H_0 \mid H_1)
STEP 4 • EDGE CASES & NEXT BRIDGE

Statistical significance (small p) ≠ large practical effect when n is huge. Module S.5 extends these tests to comparing two groups, tables, and multiple treatments.

Interactive Laboratories in Chapter S.4.3
FIRST-TIMER GUIDE • THE COURTROOM LOGIC OF HYPOTHESIS TESTING

Presumed Innocent Until Proven Otherwise: Decoding p-Values, Errors (α, β) & Power

Null Hypothesis Significance Testing works just like a courtroom trial: start assuming the skeptical status quo H0H_0 (“no real effect / innocent”) is true. Then compute the pp-value: if H0H_0 really were true, how bizarre would it be to witness data at least as extreme as ours? If p≤αp \le \alpha (typically 0.05), the verdict crosses beyond reasonable doubt and we reject H0H_0. Click right along the axis below to shade live pp-values and see why low sample size hides genuine breakthroughs (β\beta Miss Rate)!

Initializing Interactive Laboratory
LOADING MODULE

Preparing interactive canvas & numerical solver…

wanna math drafting viewport

The 2×2 Decision Matrix & Stopping the Two Biggest pp-Value Myths

1. TYPE I ERROR (α) VS. TYPE II ERROR (β)
  • Type I Error (α\alpha): Convicting an innocent null (“False Alarm” when H0H_0 is true).
  • Type II Error (β\beta): Letting a real effect walk free (“Missed Discovery” when H1H_1 is true).
  • Power (1−β1 - \beta): Probability of catching a real effect of size δ\delta! Target ≥80%\ge 80\%.
2. WHAT p = 0.03 ACTUALLY SAYS
p=P(extreme data∣H0)  ≠  P(H0∣data)p = P(\text{extreme data} \mid H_0) \;\neq\; P(H_0 \mid \text{data})

Remember Bayes (S.2.2)! A 3% pp-value does NOT mean “3% chance the null is true”—it assumes the null is true and scores how weird your data looks under that assumption!

3. TINY WORKED POWER CHECK

With σ=10\sigma = 10, n=25n = 25 (SE=2\text{SE}=2), two-tailed α=0.05\alpha = 0.05 sets rejection cutoff at 1.96×2=3.921.96 \times 2 = 3.92. If true δ=4\delta = 4:

Zpow=3.92−42=−0.04  ⟹  Power≈51.6%Z_{\text{pow}} = \frac{3.92 - 4}{2} = -0.04 \implies \text{Power} \approx 51.6\%
TRAP • STATISTICAL SIGNIFICANCE ≠ PRACTICAL IMPORTANCE

Slide n = 200 with a tiny δ = 0.8 (d = 0.08) and click at 1.5: you can easily hit p<0.05p < 0.05 for a trivially useless effect! Always report Confidence Intervals + Effect Size alongside pp.

BRIDGE TO MODULE S.5 • COMPARING MULTIPLE REAL GROUPS

Real A/B experiments rarely test against a fixed textbook μ0\mu_0—they compare Group A vs. Group B, contingency tables, and multi-treatment ANOVA in Module S.5!

Neyman–Pearson Decision Theory • Ch. S.4.3

p-Value Conditioning, Non-Centrality Power Curves & Significance vs. Effect Size

Open Hypothesis Formulas →
1. PROSECUTOR'S FALLACY VS. p-VALUE
p=P(Data≥obs∣H0)≠P(H0∣Data)p = P(\text{Data}_{\ge \text{obs}} \mid H_0) \neq P(H_0 \mid \text{Data})

Equating p=0.03p = 0.03 with a 3%3\% null probability ignores the prior base rate of H0H_0. Equivalently, rejecting H0H_0 at level α\alpha matches checking whether μ0\mu_0 lies outside the (1−α)(1-\alpha) CI!

2. POWER DEPENDS ON Δ√n / σ
Power=1−β≈Φ ⁣(∣μ1−μ0∣nσ−zα/2)\text{Power} = 1 - \beta \approx \Phi\!\left(\frac{|\mu_1 - \mu_0|\sqrt{n}}{\sigma} - z_{\alpha/2}\right)

Underpowered studies (Power≈20%\text{Power} \approx 20\%) not only miss true effects—statistically significant “wins” in noisy, underpowered tests severely exaggerate effect sizes (“winner's curse”).

3. STATISTICAL VS. PRACTICAL SIGNIFICANCE
Zobs=xˉ−μ0σ/n→n→106±∞ for any δ≠0Z_{\text{obs}} = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}} \xrightarrow{n \to 10^6} \pm\infty \text{ for any } \delta \neq 0

With millions of observations, a tiny 0.01%0.01\% change produces p<10−8p < 10^{-8} even if practically worthless—always report the confidence interval and effect size alongside pp.

Chapter S.4.3 Laboratory Specifications

1 Interactive Lab(s)
LAB S.4.3.1Component: HypothesisPowerOverlapLab

Dual-Curve H₀ vs. H₁ p-Value & Statistical Power Lab

Click observed statistics to shade exact one/two-tailed p-values and inspect Type I (α), Type II (β), and Power (1−β) dynamically.

Power=1−β\text{Power} = 1 - \beta