σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Statistics skill›Module 2 · Testing hypotheses›Topic 2.2·~55 minIntermediate

Multiple testing and false discoveries

Skill positionModule 2 of 4 · Topic 2 of 2
2.2 Multiple testing and false discoveries
—Lab score— / 100Total XP—Streak—

The more you look, the more you find

A test at the 5% level wrongly flags a real-nothing as significant 5% of the time. Run one test and that is acceptable. Run mmm independent tests on pure noise and the chance of at least one false positive is 1−(1−α)m1-(1-\alpha)^m1−(1−α)m: with 20 tests it is 1−0.9520≈64%1-0.95^{20}\approx64\%1−0.9520≈64%. Trying many signals, parameters, assets or time windows and reporting the one that worked is the most common way quant research fools itself, and it has a name: the multiple-testing problem, or data snooping.

pi≤αm,p(k)≤km qp_i\le\frac{\alpha}{m},\qquad p_{(k)}\le\frac{k}{m}\,qpi​≤mα​,p(k)​≤mk​q(1)

There are two things you can control. The family-wise error rate (FWER) is the probability of making any false discovery; Bonferroni controls it by testing each hypothesis at level α/m\alpha/mα/m, which is simple but harsh when mmm is large. The false discovery rate (FDR) is the expected share of discoveries that are false; the Benjamini-Hochberg procedure sorts the ppp-values, finds the largest kkk with p(k)≤kq/mp_{(k)}\le kq/mp(k)​≤kq/m and declares the kkk smallest significant. FDR control is gentler and suits exploratory research where a few false leads are tolerable, FWER control suits the moment you must be sure.

Twenty tests and six p-valuesTwenty independent tests on noise give at least one p<0.05p<0.05p<0.05 with probability 1−0.9520=0.641-0.95^{20}=0.641−0.9520=0.64. With 50 hypotheses, Bonferroni demands p≤0.05/50=0.001p\le0.05/50=0.001p≤0.05/50=0.001. Test 1,000 signals at 5% when none works and you expect 1000⋅0.05=501000\cdot0.05=501000⋅0.05=50 false discoveries. For six sorted ppp-values 0.001, 0.008, 0.039, 0.041, 0.042, 0.0600.001,\,0.008,\,0.039,\,0.041,\,0.042,\,0.0600.001,0.008,0.039,0.041,0.042,0.060 and q=0.05q=0.05q=0.05, the Benjamini-Hochberg thresholds kq/6kq/6kq/6 are 0.0083, 0.0167, 0.025, 0.033, 0.0417, 0.050.0083,\,0.0167,\,0.025,\,0.033,\,0.0417,\,0.050.0083,0.0167,0.025,0.033,0.0417,0.05. The second ppp-value passes, the third does not, and none of the later ones do: two discoveries.
  • Many tests: the chance of a false positive grows as 1−(1−α)m1-(1-\alpha)^m1−(1−α)m.
  • Bonferroni controls the chance of any false discovery (FWER) with the level α/m\alpha/mα/m.
  • Benjamini-Hochberg controls the share of false discoveries (FDR) and keeps more power.
Count your trials, including the ones you did not keepThe correction depends on how many hypotheses you really tried, not how many you report. Every parameter grid, every discarded idea, every variation of a filter counts, and the honest number is usually much larger than the one in the paper. Write down the trials as you go, and when you cannot count them, assume more than you think.

Lab · what's graded

  • At least one false positive15 pts
  • A Bonferroni level10 pts
  • Expected false discoveries10 pts
  • Benjamini-Hochberg15 pts
  • Which controls the false discovery rate15 pts
  • The vocabulary15 pts
  • The best of many backtests20 pts
0/ 7 answered
Tasks
1Numeric answer15 ptsNot answered

You run 20 independent tests at the 5% level on pure noise. What is the probability that at least one is significant? Give it to four decimals.

P=P =P=accepted: ± 0.001
2Numeric answer10 ptsNot answered

With 50 hypotheses and an overall level of 0.05, what p-value threshold does Bonferroni use for each test?

α/m=\alpha/m =α/m=accepted: ± 0.00005
3Numeric answer10 ptsNot answered

You test 1,000 signals at the 5% level and none has any real effect. How many false discoveries do you expect?

E[FD]=E[FD] =E[FD]=accepted: ± 0.1%
4Numeric answer15 ptsNot answered

Six sorted p-values are 0.001, 0.008, 0.039, 0.041, 0.042 and 0.060. With q = 0.05, the thresholds k*q/6 are 0.0083, 0.0167, 0.025, 0.033, 0.0417 and 0.05. How many discoveries does Benjamini-Hochberg make?

k=k =k=accepted: ± 0.001
5Choice15 ptsNot answered

Which procedure controls the false discovery rate (FDR)?

6Match15 ptsNot answered

Match each term to its meaning.

Pick the partner of each item on the left.

FWER
FDR
p-hacking
Bonferroni correction
7Explain in words20 ptsNot answered

In two sentences, say why the best of many backtested strategies is weak evidence even when its raw p-value is small.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub