Hypothesis Testing and Significance

Every claim in experimental physics eventually reduces to one uncomfortable question: could the data have looked like this by chance alone? Hypothesis testing turns that question into a number. You write down a null hypothesis H0H_0 — the boring default, "nothing new here, only known background" — and an alternative H1H_1, "there is a signal". You choose a test statistic T(X)T(\mathbf{X}), a single number squeezed from the data whose behaviour under H0H_0 you can compute exactly. If the observed TT falls deep in the tail of what H0H_0 predicts, the data are surprising and you reject H0H_0. The whole edifice controls one thing you never see directly: the rate at which you fool yourself. The significance level α\alpha is the probability, fixed in advance, of rejecting a true H0H_0 — a Type I error, a false alarm. Its partner β\beta is the probability of missing a real effect (Type II), and 1−β1-\beta, the power, is the number an experimenter loses sleep over. There is no free lunch: tighten the cut to suppress false alarms and you miss more real signals. The art — the theorem at the centre of this article — is to squeeze maximum power out of a fixed false-alarm budget. That theorem is the Neyman–Pearson lemma, and its answer is startlingly clean: rank every outcome by its likelihood ratio Λ=L(x∣H0)/L(x∣H1)\Lambda=\mathcal{L}(\mathbf{x}\mid H_0)/\mathcal{L}(\mathbf{x}\mid H_1) and reject those H1H_1 favours most. From that one idea flow the zz-test, the tt-test, Pearson's χ2\chi^2, Wilks' theorem, and the 5σ5\sigma convention for when a particle counts as discovered. Threaded through all of it is the misconception that has done more damage than any other in quantitative science: the pp-value is not the probability that H0H_0 is true.

Key takeaways
  • Hypothesis testing is a decision rule: posit a null H0H_0 and alternative H1H_1, compute a test statistic, and reject H0H_0 when it lands in a pre-chosen critical region.
  • The significance level α\alpha is the fixed probability of a Type I error (rejecting a true H0H_0); the power 1−β1-\beta correctly rejects a false H0H_0. Shrinking one tail trades against the other.
  • The pp-value is the tail probability under H0H_0 of a statistic at least as extreme as observed; reject when p<αp<\alpha. It is uniform on the unit interval under H0H_0 — and emphatically not P(H0∣data)P(H_0\mid\text{data}).
  • The Neyman–Pearson lemma proves the likelihood ratio gives the most powerful test at fixed α\alpha for a simple null against a simple alternative.
  • For Gaussian data this collapses to the zz-, tt- and χ2\chi^2-tests; Wilks' theorem makes −2ln⁡Λ-2\ln\Lambda asymptotically χ2\chi^2, the workhorse of profile-likelihood testing.
  • Key idea: fix the false-positive rate α in advance, then among all tests with that rate choose the one with greatest power; the Neyman–Pearson lemma shows the optimal decision boundary is a contour of constant likelihood ratio Λ(x) = ℒ(x|H₀)/ℒ(x|H₁).
The core insight

Fix the false-positive rate α\alpha in advance, then among all tests with that rate choose the one with greatest power; the Neyman–Pearson lemma shows the optimal decision boundary is a contour of constant likelihood ratio Λ(x)=L(x∣H0)/L(x∣H1)\Lambda(\mathbf{x})=\mathcal{L}(\mathbf{x}\mid H_0)/\mathcal{L}(\mathbf{x}\mid H_1).

Where this lives today

The 5σ5\sigma convention is where this machinery becomes headline physics. When ATLAS and CMS announced the Higgs boson in July 2012, the number that mattered was a local pp-value at 5.0σ5.0\sigma (p≈2.87×10−7p\approx2.87\times10^{-7}): each tested H0H_0 = "background only" against H1H_1 = "background plus a resonance" using −2ln⁡Λ-2\ln\Lambda whose distribution Wilks' theorem supplies. The stringency defends against the look-elsewhere effect — scanning many mass bins inflates the chance that some bin fluctuates high, so the local pp must be corrected to a global one first. The same framework governs the LIGO–Virgo gravitational-wave detections, neutrino oscillations, and the muon g−2g-2 anomaly at Fermilab, whose ∼4\sim4–5σ5\sigma tension with theory is exactly a zz-test of a measured against a predicted number. Meanwhile the replication crisis in biomedical and social science — driven by pp-hacking, underpowered studies, and precisely the pp-value misreading this article warns against — has pushed proposals to lower defaults to p<0.005p<0.005. The century-old Fisher–Neyman argument is, remarkably, still live.

The physical picture

Picture a coin you suspect is loaded. Under H0H_0 it is fair, p=12p=\tfrac12; flip it nn times and the head-count clusters near n/2n/2 with a known binomial spread. A count far out in the tail would be a freak event for a fair coin, so it is evidence against fairness. The significance level is the line you draw before flipping: "declare the coin loaded only if the result is so extreme it would happen by chance less than α\alpha of the time." Every physics test is this coin dressed up: a known null distribution, a cut in its tail, a decision. The sharper picture is two overlapping bell curves — the statistic under H0H_0 and under H1H_1 — with the critical region a single cut on the axis. The H0H_0 area past the cut is α\alpha; the H1H_1 area before the cut is β\beta, the signal you miss. Slide the cut right and α\alpha shrinks while β\beta grows — both are small only when the curves are far apart, which is what more data buys.

Figure
Two sampling distributions of the test statistic — H₀ (blue) and a shifted H₁ (green). The vertical cut at the critical value z = 1.645 puts α = 0.05 of the H₀ area in the red rejection tail, while the green area left of the cut is β, the missed-signal probability. Sliding the cut trades α against β.
Fix the cut, and the two tails are the two error rates: α under H₀, β under H₁ cut z = 1.645 H₀ H₁ α = 0.05 β test statistic T

A pp-value is a ruler for surprise, uniform on the unit interval under H0H_0: p=0.01p=0.01 means a fair world would produce data this extreme only one time in a hundred. Small pp says the data sit in the tail of the null's prediction — but it speaks only about compatibility with H0H_0, never its truth, which needs a prior. Particle physics pushes the ruler to an extreme: a discovery needs the statistic five standard deviations out, a one-sided tail of 2.87×10−72.87\times10^{-7}, about one in 3.5 million.

Figure
The significance ladder: the standard normal N(0,1) under H₀, with the one-sided rejection tail beyond z = 1.645 (α = 0.05) shaded red. The p-value is the tail area past the observed z. Ladder rungs: 1σ → p = 0.159, 2σ → 0.0228, 3σ → 1.35×10⁻³ (evidence), 5σ → 2.87×10⁻⁷ (discovery).
The p-value is a tail area: p = 1 − Φ(z). Discovery lives at 5σ, p = 2.87×10⁻⁷ 0 1σ 1.645 2σ 3σ 5σ α tail 2σ → 0.0228 3σ → 1.35×10⁻³ (evidence) 5σ → 2.87×10⁻⁷ (discovery threshold)

Power is what experimenters actually care about: if the effect is real, how likely am I to catch it? A test with airtight α\alpha but tiny power wastes data — a null result then tells you almost nothing, because you never had the sensitivity to see the signal. Designing an experiment is choosing the sample size and statistic so the power at the smallest interesting signal is respectable, conventionally 1−β≥0.81-\beta\geq0.8.

The core equations

The starting point is the pair of error rates. A test partitions the sample space into acceptance and rejection (critical) regions; the two ways to be wrong live on opposite hypotheses and are computed under different distributions — this asymmetry is the whole game.

α=P(T∈W∣H0),β=P(T∉W∣H1),power=1−β(1)\alpha = P(T\in W \mid H_0),\qquad \beta = P(T\notin W \mid H_1),\qquad \text{power}=1-\beta \qquad (1)

where: TT — test statistic, a function of the data X\mathbf{X}; WW — critical (rejection) region in the sample space of TT; α\alpha — significance level, the Type I (false-positive) error probability; β\beta — Type II (false-negative) error probability; 1−β1-\beta — power. Reading: α\alpha is chosen by fiat before data; β\beta then follows from the alternative and the sample size. The pp-value repackages the observed statistic as a probability, comparable across tests: it is the smallest α\alpha at which the data would already be rejected.

p=P(T≥tobs ∣ H0)(one-sided),reject H0 if p<α(2)p = P\big(T \ge t_{\text{obs}} \,\big|\, H_0\big)\quad(\text{one-sided}),\qquad \text{reject } H_0 \text{ if } p<\alpha \qquad (2)

where: tobst_{\text{obs}} — observed value of the statistic; pp — tail probability under H0H_0 of statistics at least as extreme as observed. Reading: a symmetric two-sided test doubles the tail, p=2 P(T≥∣tobs∣∣H0)p=2\,P(T\ge|t_{\text{obs}}|\mid H_0); crucially pp is conditioned on H0H_0, not a probability of H0H_0. The likelihood ratio is the quantity the Neyman–Pearson lemma singles out as optimal — it compares how well the two hypotheses explain the same data, the decision boundary being a level set of the ratio.

Λ(x)=L(x∣H0)L(x∣H1),reject H0 if Λ(x)≤kα(3)\Lambda(\mathbf{x}) = \frac{\mathcal{L}(\mathbf{x}\mid H_0)}{\mathcal{L}(\mathbf{x}\mid H_1)},\qquad \text{reject } H_0 \text{ if } \Lambda(\mathbf{x}) \le k_\alpha \qquad (3)

where: L(x∣H)\mathcal{L}(\mathbf{x}\mid H) — likelihood of the data under HH; Λ\Lambda — likelihood-ratio statistic; kαk_\alpha — threshold fixed so P(Λ≤kα∣H0)=αP(\Lambda\le k_\alpha\mid H_0)=\alpha. Reading: small Λ\Lambda means H1H_1 explains the data far better, so small Λ\Lambda is the natural rejection region. For Gaussian data with known variance, the likelihood ratio for a mean collapses to a linear cut on the sample mean — the zz-statistic, whose null distribution is standard normal.

Z=Xˉ−μ0σ/n,Xˉ=1n∑i=1nXi(4)Z = \frac{\bar{X}-\mu_0}{\sigma/\sqrt{n}},\qquad \bar{X}=\frac1n\sum_{i=1}^n X_i \qquad (4)

where: Xˉ\bar{X} — sample mean of nn observations; μ0\mu_0 — mean hypothesised by H0H_0; σ\sigma — known population standard deviation; nn — sample size. Reading: the denominator σ/n\sigma/\sqrt{n} is the standard error, so ZZ measures the discrepancy in units of how well you know the mean. When σ\sigma is unknown and estimated from the same small sample, the extra uncertainty fattens the tails: the statistic follows Student's tt, not the normal.

T=Xˉ−μ0s/n,s2=1n−1∑i=1n(Xi−Xˉ)2(5)T = \frac{\bar{X}-\mu_0}{s/\sqrt{n}},\qquad s^2=\frac{1}{n-1}\sum_{i=1}^n (X_i-\bar{X})^2 \qquad (5)

where: ss — sample standard deviation with the unbiased n−1n-1 (Bessel) denominator; TT — follows tn−1t_{n-1} under H0H_0. Reading: for n≳30n\gtrsim30 the tt is nearly normal; for n=5n=5 its critical value swells noticeably above zz. For binned or categorical data, Pearson's statistic sums squared standardised residuals over bins and is asymptotically χ2\chi^2-distributed.

χ2=∑i=1k(Oi−Ei)2Ei(6)\chi^2 = \sum_{i=1}^{k} \frac{(O_i-E_i)^2}{E_i} \qquad (6)

where: OiO_i — observed count in bin ii; EiE_i — count expected under H0H_0; kk — number of bins. Reading: each term is (residual)2/(Poisson variance)(\text{residual})^2/(\text{Poisson variance}); degrees of freedom ν=k−1−m\nu=k-1-m after the normalisation constraint and mm fitted parameters. The likelihood ratio generalises to composite hypotheses through the profile likelihood ratio, whose asymptotic distribution Wilks' theorem supplies — letting physicists read a significance straight off a fit.

−2ln⁡Λ  =  −2ln⁡sup⁡θ∈Θ0L(θ)sup⁡θ∈ΘL(θ)  →  n→∞    χr2(7)-2\ln\Lambda \;=\; -2\ln\frac{\sup_{\theta\in\Theta_0}\mathcal{L}(\theta)}{\sup_{\theta\in\Theta}\mathcal{L}(\theta)} \;\xrightarrow{\;n\to\infty\;}\; \chi^2_r \qquad (7)

where: Θ0\Theta_0 — parameter subspace fixed by H0H_0; Θ\Theta — the full parameter space; rr — number of constraints (codimension of Θ0\Theta_0). Reading: the suprema profile out nuisance parameters, and the ratio never exceeds 1, so −2ln⁡Λ≥0-2\ln\Lambda\ge0. For r=1r=1 the significance in σ\sigma is −2ln⁡Λ\sqrt{-2\ln\Lambda}, and the discovery conventions read straight off the normal tail: 3σ⇒p=1.35×10−33\sigma\Rightarrow p=1.35\times10^{-3} ("evidence"), 5σ⇒p=1−Φ(5)=2.87×10−75\sigma\Rightarrow p=1-\Phi(5)=2.87\times10^{-7} (discovery, one-sided).

Derivation AThe Neyman-Pearson lemma

The goal is to prove that, for a simple null H0:θ=θ0H_0:\theta=\theta_0 against a simple alternative H1:θ=θ1H_1:\theta=\theta_1, no test of size α\alpha is more powerful than the one whose rejection region is a level set of the likelihood ratio. We propose the likelihood-ratio region W∗W^*, take any competitor WW of size at most α\alpha, and show the difference in their powers can never be negative. Write f0=L(⋅∣θ0)f_0=\mathcal{L}(\cdot\mid\theta_0) and f1=L(⋅∣θ1)f_1=\mathcal{L}(\cdot\mid\theta_1).

Step 1. Define the candidate region as everything the alternative favours by at least a factor cc: W∗={x:f1(x)≥c f0(x)}W^*=\{\mathbf{x}:f_1(\mathbf{x})\ge c\,f_0(\mathbf{x})\}, with cc tuned so ∫W∗f0=α\int_{W^*}f_0=\alpha. Its power is the alternative mass captured, Power(W∗)=∫W∗f1\text{Power}(W^*)=\int_{W^*}f_1. Why: this is exactly the "reject where Λ=f0/f1≤1/c\Lambda=f_0/f_1\le 1/c" rule of equation (3), with cc carrying the size constraint.

Step 2. Let WW be any region with ∫Wf0≤α\int_W f_0\le\alpha. The power difference Power(W∗)−Power(W)=∫W∗f1−∫Wf1\text{Power}(W^*)-\text{Power}(W)=\int_{W^*}f_1-\int_{W}f_1; the shared part W∗∩WW^*\cap W cancels, leaving the symmetric difference ∫W∗∖Wf1−∫W∖W∗f1\int_{W^*\setminus W}f_1-\int_{W\setminus W^*}f_1. Why: only the points where the two tests disagree can change the power.

Step 3. On W∗∖WW^*\setminus W every point has f1≥cf0f_1\ge c f_0 by construction; on W∖W∗W\setminus W^* every point lies outside W∗W^*, so f1<cf0f_1< c f_0. Substituting, ∫W∗∖Wf1−∫W∖W∗f1≥c(∫W∗∖Wf0−∫W∖W∗f0)\int_{W^*\setminus W}f_1-\int_{W\setminus W^*}f_1 \ge c\big(\int_{W^*\setminus W}f_0-\int_{W\setminus W^*}f_0\big). Why: lower-bounding f1f_1 on the region we add and upper-bounding it on the region we remove can only decrease the expression, so the inequality points the right way.

Step 4. Re-adding the cancelled overlap turns the bracket back into full sizes: c(P(W∗∣θ0)−P(W∣θ0))=c(α−P(W∣θ0))c\big(P(W^*\mid\theta_0)-P(W\mid\theta_0)\big)=c(\alpha-P(W\mid\theta_0)). Since c>0c>0 and P(W∣θ0)≤αP(W\mid\theta_0)\le\alpha, this is ≥0\ge0, so Power(W∗)≥Power(W)\text{Power}(W^*)\ge\text{Power}(W). Why: the competitor's size constraint is exactly what makes the bracket non-negative — spending the full α\alpha budget optimally beats every alternative allocation. *Why this matters concretely: for two Gaussians with equal variance and means μ0<μ1\mu_0<\mu_1, the criterion f1≥cf0f_1\ge cf_0 reduces algebraically to Xˉ≥c′\bar{X}\ge c', recovering the one-sided z-test of the next derivation.*

Go deeper · Derivation B · 1 minThe z-test as the most powerful test of a Gaussian mean
Derivation BThe z-test as the most powerful test of a Gaussian mean

The goal is to run the Neyman–Pearson recipe on nn independent normal observations with known variance σ2\sigma^2, testing H0:μ=μ0H_0:\mu=\mu_0 against H1:μ=μ1>μ0H_1:\mu=\mu_1>\mu_0, and show the optimal region is a simple cut on the sample mean whose calibration gives the familiar z1−αz_{1-\alpha} critical values. Because that region does not depend on the specific μ1\mu_1, the same test is optimal against every μ1>μ0\mu_1>\mu_0 at once — uniformly most powerful. Start from L(μ)=(2πσ2)−n/2exp⁡[−12σ2∑i(xi−μ)2]\mathcal{L}(\mu)=(2\pi\sigma^2)^{-n/2}\exp[-\tfrac{1}{2\sigma^2}\sum_i(x_i-\mu)^2].

Step 1. Form the ratio L(μ1)/L(μ0)=exp⁡[−12σ2∑i((xi−μ1)2−(xi−μ0)2)]\mathcal{L}(\mu_1)/\mathcal{L}(\mu_0)=\exp[-\tfrac{1}{2\sigma^2}\sum_i((x_i-\mu_1)^2-(x_i-\mu_0)^2)]; the normalisation prefactors cancel. Why: only the exponent carries the data, so the whole test lives in one quadratic-difference term.

Step 2. Expand: (xi−μ1)2−(xi−μ0)2=−2xi(μ1−μ0)+(μ12−μ02)(x_i-\mu_1)^2-(x_i-\mu_0)^2=-2x_i(\mu_1-\mu_0)+(\mu_1^2-\mu_0^2), in which the xi2x_i^2 pieces cancel and only a term linear in xix_i survives. Why: linearity in the data is what makes the boundary a straight cut rather than a curved region.

Step 3. Collect the sum: L(μ1)/L(μ0)=exp⁡[μ1−μ0σ2∑ixi−n(μ12−μ02)2σ2]\mathcal{L}(\mu_1)/\mathcal{L}(\mu_0)=\exp[\tfrac{\mu_1-\mu_0}{\sigma^2}\sum_i x_i-\tfrac{n(\mu_1^2-\mu_0^2)}{2\sigma^2}], which since μ1>μ0\mu_1>\mu_0 is strictly increasing in ∑ixi\sum_i x_i, hence in Xˉ\bar{X}. So "Λ\Lambda small" is identical to "Xˉ\bar{X} large", and the rejection region is {Xˉ≥c′}\{\bar{X}\ge c'\}. Why: this monotone-likelihood-ratio property makes a single cut optimal, and since μ1\mu_1 dropped out of the inequality's direction the same cut is optimal for all μ1>μ0\mu_1>\mu_0 — a uniformly most powerful test.

Step 4. Calibrate to size α\alpha. Under H0H_0, Xˉ∼N(μ0,σ2/n)\bar{X}\sim\mathcal{N}(\mu_0,\sigma^2/n), so P(Xˉ≥c′∣μ0)=αP(\bar{X}\ge c'\mid\mu_0)=\alpha standardises to (c′−μ0)/(σ/n)=z1−α(c'-\mu_0)/(\sigma/\sqrt{n})=z_{1-\alpha}, i.e. reject when Z=(Xˉ−μ0)/(σ/n)>z1−αZ=(\bar{X}-\mu_0)/(\sigma/\sqrt{n})>z_{1-\alpha}. For α=0.05\alpha=0.05 one-sided, z0.95=1.645z_{0.95}=1.645; two-sided uses z0.975=1.960z_{0.975}=1.960. Why: this is where the abstract threshold cc becomes a tabulated number — the standard-normal quantile every zz-test quotes. *As a consistency check: the critical values z0.95=1.645z_{0.95}=1.645 and z0.975=1.960z_{0.975}=1.960 correspond exactly to Φ(1.645)=0.950\Phi(1.645)=0.950 and Φ(1.960)=0.975\Phi(1.960)=0.975 from the standard normal CDF.*

Go deeper · Derivation C · 1 minWilks' theorem and the minus-two-log-lambda statistic
Derivation CWilks' theorem and the minus-two-log-lambda statistic

The goal is to see why the profile likelihood ratio −2ln⁡Λ-2\ln\Lambda becomes χr2\chi^2_r as the sample grows — the result that converts a fit into a significance without simulating the null. The mechanism is a quadratic (Laplace) expansion of the log-likelihood about its maximum plus the asymptotic normality of the MLE, which together turn a difference of log-likelihoods into a sum of rr squared standard normals. Let θ^\hat\theta be the unconstrained MLE, θ^0\hat\theta_0 the MLE constrained to the rr-codimensional null surface Θ0\Theta_0, and ℓ=ln⁡L\ell=\ln\mathcal{L}.

Step 1. Taylor-expand about θ^\hat\theta: ℓ(θ)≈ℓ(θ^)−12(θ−θ^)TI(θ^)(θ−θ^)\ell(\theta)\approx\ell(\hat\theta)-\tfrac12(\theta-\hat\theta)^{\mathsf T}I(\hat\theta)(\theta-\hat\theta), the linear term vanishing at the maximum, with II the observed Fisher information. Why: near a smooth maximum the log-likelihood is a paraboloid, and the curvature II is exactly the metric that standardises coordinate differences.

Step 2. Evaluate at the constrained maximum: −2ln⁡Λ=2[ℓ(θ^)−ℓ(θ^0)]≈(θ^−θ^0)TI(θ^)(θ^−θ^0)-2\ln\Lambda=2[\ell(\hat\theta)-\ell(\hat\theta_0)]\approx(\hat\theta-\hat\theta_0)^{\mathsf T}I(\hat\theta)(\hat\theta-\hat\theta_0). Why: the statistic is just the "distance" from the unconstrained to the constrained estimate in the Fisher metric.

Step 3. Invoke the MLE asymptotics n(θ^−θtrue)→dN(0,I1−1)\sqrt{n}(\hat\theta-\theta_{\text{true}})\xrightarrow{d}\mathcal{N}(0,I_1^{-1}) (I1I_1 the per-observation information). Under H0H_0 the displacement θ^−θ^0\hat\theta-\hat\theta_0 projects onto the rr constrained directions as a centred Gaussian whose Fisher-metric covariance is the identity — rr independent standard normals. Why: the metric II whitens the Gaussian, so the quadratic form becomes an unweighted sum of squares.

Step 4. Therefore (θ^−θ^0)TI(θ^−θ^0)→d∑j=1rZj2=χr2(\hat\theta-\hat\theta_0)^{\mathsf T}I(\hat\theta-\hat\theta_0)\xrightarrow{d}\sum_{j=1}^r Z_j^2=\chi^2_r. One compares the observed −2ln⁡Λ-2\ln\Lambda to χr2\chi^2_r quantiles, and for r=1r=1 the significance in σ\sigma is −2ln⁡Λ\sqrt{-2\ln\Lambda}. Why: a whitened quadratic form in rr normals is a χr2\chi^2_r — the bridge from a likelihood fit to a tabulated tail probability. *As a consistency check: for r=1r=1, the values −2ln⁡Λ=1,4,9,25-2\ln\Lambda=1,4,9,25 give significances 1,2,3,5σ1,2,3,5\sigma respectively, since −2ln⁡Λ=1,2,3,5\sqrt{-2\ln\Lambda}=1,2,3,5, in agreement with the χ12\chi^2_1 quantiles.*

Limiting cases

The standard tests are not separate inventions but special cases of the likelihood-ratio idea, selected by what is known and how the statistic is distributed:

CaseResultMeaning
Known variance, Gaussian meanZ=Xˉ−μ0σ/n∼N(0,1)Z=\dfrac{\bar{X}-\mu_0}{\sigma/\sqrt{n}}\sim\mathcal{N}(0,1)The zz-test; two-sided rejection when ∣Z∣>z1−α/2\lvert Z\rvert>z_{1-\alpha/2} (z0.975=1.96z_{0.975}=1.96).
Unknown variance, small nnT=Xˉ−μ0s/n∼tn−1T=\dfrac{\bar{X}-\mu_0}{s/\sqrt{n}}\sim t_{n-1}Student's tt-test; estimating ss fattens the tails. Recovers zz as n→∞n\to\infty.
Binned counts / goodness of fitχ2=∑i(Oi−Ei)2Ei∼χk−1−m2\chi^2=\sum_i\dfrac{(O_i-E_i)^2}{E_i}\sim\chi^2_{k-1-m}Pearson's test; mm fitted parameters cut the d.o.f. Large χ2\chi^2 rejects the model.
Composite null, large nn−2ln⁡Λ  →n→∞  χr2-2\ln\Lambda\;\xrightarrow{n\to\infty}\;\chi^2_{r}Wilks' theorem; rr constrained parameters — the basis of profile-likelihood significance.

Worked examples

1 · A measurement versus theory (confidence builder)

A precision experiment measures a quantity over n=25n=25 runs, reporting a mean Xˉ=100.8\bar{X}=100.8 in instrument units. Theory predicts μ0=100.0\mu_0=100.0, and the apparatus has a known per-run scatter σ=2.0\sigma=2.0. Is the measurement in tension with theory at the 5% level?

Step 1. Form the standard error of the mean: σ/n=2.0/25=0.4\sigma/\sqrt{n}=2.0/\sqrt{25}=0.4 — how well 25 runs pin down the mean.

Step 2. Compute the zz-statistic: Z=(100.8−100.0)/0.4=2.0Z=(100.8-100.0)/0.4=\mathbf{2.0} — the measurement sits two standard errors above the prediction.

Step 3. Convert to a two-sided pp-value (theory could err either way, so both tails count): p=2[1−Φ(2.0)]=2(0.02275)=0.0455p=2[1-\Phi(2.0)]=2(0.02275)=\mathbf{0.0455}. Since 0.0455<0.050.0455<0.05, you reject H0H_0 at α=0.05\alpha=0.05 — but only barely; 2σ2\sigma is "interesting, keep watching", not "discovery". Z = 2.0, two-sided p = 0.046, reject at 5% but far below the 5σ discovery bar.

2 · Goodness of fit of a die

A die is rolled n=60n=60 times to test fairness. The six faces come up 8,12,9,11,14,68,12,9,11,14,6. Under H0H_0 each face is expected E=60/6=10E=60/6=10 times. Is the die consistent with fairness?

Step 1. Compute Pearson's statistic with E=10E=10: the squared residuals are 4,4,1,1,16,164,4,1,1,16,16 (summing to 42), so χ2=42/10=4.2\chi^2=42/10=\mathbf{4.2}.

Step 2. Degrees of freedom: k=6k=6 bins, one constraint (counts sum to 60), no fitted parameters, so ν=k−1−m=6−1−0=5\nu=k-1-m=6-1-0=\mathbf{5}.

Step 3. Compare to χ52\chi^2_5: the 5% critical value is 11.0711.07, and 4.2≪11.074.2\ll11.07, so you fail to reject (p≈0.52p\approx0.52). The reduced χ2/ν=4.2/5=0.84≈1\chi^2/\nu=4.2/5=0.84\approx1 confirms an unremarkable fit. χ² = 4.2 on 5 d.o.f., p ≈ 0.52: no evidence the die is loaded.

3 · Sizing an experiment for a target power

You plan a one-sided test of H0:μ=μ0H_0:\mu=\mu_0 against H1:μ>μ0H_1:\mu>\mu_0 at α=0.05\alpha=0.05. The smallest interesting shift is δ=μ1−μ0=0.5σ\delta=\mu_1-\mu_0=0.5\sigma. How many samples nn are needed for power 1−β=0.901-\beta=0.90?

Step 1. The design equation sets the cut z1−αz_{1-\alpha} standard errors above μ0\mu_0 and simultaneously z1−βz_{1-\beta} below μ1\mu_1: z1−α+z1−β=δn/σz_{1-\alpha}+z_{1-\beta}=\delta\sqrt{n}/\sigma, so n=σ2(z1−α+z1−β)2/δ2n=\sigma^2(z_{1-\alpha}+z_{1-\beta})^2/\delta^2.

Step 2. Insert the quantiles z0.95=1.645z_{0.95}=1.645 and z0.90=1.282z_{0.90}=1.282, and the standardised effect δ/σ=0.5\delta/\sigma=0.5: n=(1.645+1.282)2/0.52=(2.927)2/0.25=8.57/0.25=34.3n=(1.645+1.282)^2/0.5^2=(2.927)^2/0.25=8.57/0.25=34.3. Round up to be safe: n=35\mathbf{n=35}.

Step 3. Check the delivered power at n=35n=35: the signal sits 35⋅0.5=2.96\sqrt{35}\cdot0.5=2.96 standard errors above μ0\mu_0; subtracting the cut z0.95=1.645z_{0.95}=1.645 leaves 1.311.31 of margin, and Φ(1.31)=0.905≥0.90\Phi(1.31)=0.905\ge0.90 as required. n = 35 samples deliver 90% power to detect a 0.5σ shift at α = 0.05.

Physics of the portrait

Hypothesis testing has no single inventor; it is a two-decade argument among a handful of statisticians that hardened into the frequentist framework physics still runs on.

Origins · 1 minJerzy Neyman and how this was discovered
JN
Jerzy Neyman
1894–1981 · frequentist hypothesis testing and the Neyman–Pearson lemma

Jerzy Neyman, born in the Russian Empire and trained in Kharkiv and Warsaw, carried the rigour of measure-theoretic probability into a field that in the 1920s was still a bag of recipes. The decisive collaboration began in 1926 with Egon Pearson — son of Karl Pearson, who had invented the χ2\chi^2 goodness-of-fit test in 1900. Between 1928 and 1933 the two built testing as a decision problem: they named the two error types, defined power, and proved the lemma that bears their names — the likelihood ratio gives the most powerful test at fixed size. This broke sharply with Ronald Fisher, whose significance tests and pp-values (systematised in his 1925 Statistical Methods for Research Workers) framed testing as evidence against a null, with no explicit alternative and no power. The Fisher–Neyman feud was bitter and lifelong, yet the working physicist uses an unspoken hybrid: Fisher's pp-values and Neyman–Pearson's error rates in the same breath. Neyman also built confidence intervals (1937) as the dual of testing and, after emigrating, founded the Berkeley statistics department. The remaining threads came from William Gosset — "Student", the Guinness brewer who derived the tt-distribution in 1908 — and Samuel Wilks, whose 1938 theorem made −2ln⁡Λ-2\ln\Lambda asymptotically χ2\chi^2 and handed particle physics its significance calculator. A quarrel over the meaning of evidence became the quiet arithmetic behind every discovery claim.

History
1900
— Karl Pearson introduces the χ² goodness-of-fit statistic
1908
— William Gosset, as Student, publishes the t-distribution for small samples
1925
— Fisher systematises significance tests and p-values in Statistical Methods for Research Workers
1933
— Neyman and Egon Pearson prove the most-powerful-test lemma and formalise Type I and Type II errors
1938
— Samuel Wilks derives the asymptotic χ² distribution of the likelihood-ratio statistic
1937
— Neyman constructs confidence intervals as the dual of hypothesis tests

Going further

Texts. Cowan, Statistical Data Analysis (Oxford, 1998), the physicist's standard · Stone & Goldbart, Mathematics for Physics (Cambridge, 2009), statistics chapter · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed. · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 31 · Kendall & Stuart, The Advanced Theory of Statistics, Vol. 2, for the full proofs · James, Statistical Methods in Experimental Physics, 2nd ed. Key numerical anchors: the standard-normal quantiles z0.95=1.645z_{0.95}=1.645, z0.975=1.960z_{0.975}=1.960, z0.90=1.282z_{0.90}=1.282; the discovery-ladder tails 1−Φ(5)=2.87×10−71-\Phi(5)=2.87\times10^{-7} and 1−Φ(3)=1.35×10−31-\Phi(3)=1.35\times10^{-3}. Worked-example results: Z=2.0⇒p2-sided=0.0455Z=2.0\Rightarrow p_{\text{2-sided}}=0.0455; die χ2=4.2\chi^2=4.2 on ν=5\nu=5 (p≈0.52p\approx0.52); sample-size design n=(1.645+1.282)2/0.52=34.3→35n=(1.645+1.282)^2/0.5^2=34.3\to35, delivering power Φ(1.31)=0.905\Phi(1.31)=0.905.

Builds on: Random Variables and Probability Distributions · Cumulative Distribution Functions · Gaussian (Normal) Distribution · Central Limit Theorem · Conditional Probability and Bayes' Theorem. Leads to: Maximum Likelihood Estimation · Confidence Intervals · Bayesian Inference.

Ask the tutor: Ask me why the same Xˉ\bar{X} can reject a theory in one experiment yet leave it standing in another — the hidden lever is power, and I will show you how to compute it.

Is a smaller p-value stronger evidence against H₀?

Broadly yes, but with caveats. Under H0H_0 the pp-value is uniform on the unit interval, so a pp of 10−710^{-7} is genuinely harder to produce by chance than a pp of 0.050.05. But pp measures only incompatibility with H0H_0, not the probability of H1H_1: a tiny pp can come from a huge sample detecting a physically trivial effect, or from an unmodelled systematic masquerading as signal. And pp-values do not combine by averaging or multiplying — pooling results properly means combining likelihoods. Read pp as a calibrated surprise index, always paired with an effect size and the test's power.

When do I use a t-test instead of a z-test?

Use the zz-test only when the population standard deviation σ\sigma is genuinely known — from a prior calibration, say — and the sample mean is Gaussian. Use the tt-test when you must estimate the scatter from the same data via ss. Replacing the fixed σ\sigma by the random ss injects extra uncertainty, which Student's tn−1t_{n-1} absorbs with heavier tails, so its critical values are larger for small nn: at n=5n=5 the two-sided 5% value is 2.782.78 versus the normal's 1.961.96. By n≈30n\approx30 they agree to a couple of percent, and for large samples the distinction is cosmetic.

What is the difference between a one-sided and a two-sided test?

It is a statement about the alternative. A one-sided test asks "is the mean greater than μ0\mu_0?" and puts the whole budget α\alpha in one tail; a two-sided test asks "is the mean different, either way?" and splits α\alpha into two tails of α/2\alpha/2. So the two-sided critical value is larger (z0.975=1.96z_{0.975}=1.96 versus z0.95=1.645z_{0.95}=1.645 at α=0.05\alpha=0.05) and the two-sided pp-value is double the one-sided tail. Choose one-sided only when a deviation the other way would be meaningless — and choose it before seeing data, since switching post hoc silently doubles your true false-alarm rate.

Why exactly 5σ for a discovery — isn't that overkill?

It is deliberately conservative. First, the look-elsewhere effect: scanning hundreds of mass bins gives many chances to fluctuate, so a local 3σ3\sigma bump somewhere is almost expected and the global significance is far weaker. Second, systematics are hard to model in the deep tails, where the Gaussian −2ln⁡Λ→σ-2\ln\Lambda\to\sigma conversion can itself drift, so a wide margin buys robustness. Third, the field's history is littered with 33–4σ4\sigma "signals" that evaporated. The p=2.87×10−7p=2.87\times10^{-7} bar is a sociological choice about acceptable false-discovery rates, not a law of nature; lower-stakes fields legitimately use 2σ2\sigma or 3σ3\sigma.

Can I prove H₀ true by failing to reject it?

No — the single most common logical slip in applied testing. Failing to reject means only that the data are not surprising under H0H_0; it cannot distinguish "H0H_0 is true" from "my test had no power". A study with a few noisy samples fails to reject almost any null, not because the null is right but because it was blind. The honest reading depends on power: 95% power to detect the smallest interesting effect and still nothing is real support for H0H_0; 20% power is simply uninformative. This is why serious null claims are reported as upper limits or confidence intervals — they quantify what effect sizes have been excluded.

How are hypothesis tests and confidence intervals related?

They are two views of one computation — a duality Neyman built deliberately. A two-sided level-α\alpha test of H0:μ=μ0H_0:\mu=\mu_0 rejects exactly those μ0\mu_0 lying outside the 100(1−α)%100(1-\alpha)\% confidence interval for μ\mu. So the interval is the set of null values the data would not reject: "reject every μ0\mu_0 more than 1.961.96 standard errors from Xˉ\bar{X}" is identical to "the 95% interval is Xˉ±1.96 σ/n\bar{X}\pm1.96\,\sigma/\sqrt{n}". This is why physicists increasingly quote an interval or upper limit rather than a bare pp-value: it carries the same decision plus the effect size and its uncertainty.

Before this

Where this leads