Skip to main content

Module alpha_investing

Module alpha_investing 

Source
Expand description

Alpha-Investing: sequential FDR control for multiple simultaneous alerts.

When many monitors fire simultaneously (budget alerts, degradation triggers, capability detection decisions), testing each at a fixed alpha level inflates the family-wise false discovery rate. Alpha-Investing controls FDR by treating significance level as a spendable resource.

§Mathematical Model

The investor maintains a wealth W that starts at an initial budget W₀:

W₀ = initial_wealth   (e.g. 0.5)

For each new hypothesis H_i:

  1. Invest: spend α_i ≤ W from the wealth (the test level for H_i)
  2. Test: evaluate H_i at level α_i
  3. Update wealth:
    • If H_i rejected (discovery): W += reward (typically ψ * α_i)
    • If H_i not rejected: W unchanged (already spent α_i)

The investment can never exceed the current wealth, so the procedure self-limits when too many tests fail to reject.

§FDR Guarantee

Under independence or positive dependence of the test statistics, Alpha-Investing controls the modified FDR (mFDR) at level ≤ W₀:

mFDR = E[V] / E[R] ≤ W₀

where V = false discoveries, R = total discoveries.

§Integration

Pair with conformal_alert for individual alert calibration:

conformal_alert → p-value → alpha_investing → gated decision

Each alert produces a p-value; the investor decides whether to “spend” enough alpha to declare the alert significant.

§Failure Modes

ConditionBehaviorRationale
Wealth exhausted (W ≈ 0)All tests skippedFDR budget spent
Negative p-valueClamped to 0.0Invalid input guard
p-value > 1.0Clamped to 1.0Invalid input guard
Zero investmentTest skippedNo alpha allocated

§Reference

Foster & Stine (2008), “α-investing: a procedure for sequential control of expected false discoveries”, JRSS-B 70(2):429-444.

Structs§

AlphaInvestingConfig
Configuration for the Alpha-Investing procedure.
AlphaInvestor
Alpha-Investing controller for sequential FDR control.
TestRecord
Record of a single hypothesis test within the Alpha-Investing sequence.

Enums§

TestOutcome
Outcome of testing a single hypothesis.

Functions§

benjamini_hochberg
Benjamini-Hochberg step-up procedure for FDR control.
bonferroni_test
Simple Bonferroni correction: test each hypothesis at α/m.