Quant interview toolkit · rare-event inference

No failures in 100 trials: how risky could it still be?

A strategy ran through 100 independent stress trials and never crossed its loss limit. The dashboard says “0% failure rate.” That describes the sample. It does not tell you the underlying chance is zero. A true one-in-a-hundred risk would produce a perfectly clean set of 100 trials surprisingly often.

How surprising are no failures?

Suppose each trial independently fails with the same probability pp. The chance that all nn trials succeed is

P(K=0∣p)=(1−p)n.P(K=0\mid p)=(1-p)^n.

At p=1%p=1\% and n=100n=100, this is 0.99100≈36.6%0.99^{100}\approx36.6\%. More than one in three such experiments would see zero failures, even though the risk is real. To make zero failures occur less than 5% of the time when the true rate is at least 1%, you need 299 independent trials: 0.99299≈4.95%0.99^{299}\approx4.95\%.

That calculation makes the claim testable. It also shows why an impressive-looking zero can be weak evidence when events are rare.

36.6%Chance of seeing zero failures
2.95%95% upper bound after zero observed
299Clean trials needed to challenge this rate at 95%

Chance of a clean run as the trial count grows

The curve assumes the same true failure probability on every independent trial. The dashed line marks 5%.

Turn zero observed failures into an upper bound

For an exact one-sided 95% binomial confidence procedure, solve for the largest failure probability at which zero failures would occur with probability 5%:

(1−pU)n=0.05⟹pU=1−0.051/n.(1-p_U)^n=0.05 \quad\Longrightarrow\quad p_U=1-0.05^{1/n}.
Independent trials, all with zero failuresOne-sided 95% upper bound on pp
1002.95%
3000.994%
1,0000.299%

For moderately large nn, log⁡(1−p)≈−p\log(1-p)\approx-p, so pU≈−log⁡(0.05)/n≈3/np_U\approx-\log(0.05)/n\approx3/n. This is the rule of three. It is a quick approximation, not a new data point. The exact formula is easy to use when the distinction matters.

The confidence level describes the long-run coverage of the procedure over repeated samples under its assumptions. It is not, by itself, a 95% posterior probability that this one fixed pp lies below the reported number. A Bayesian probability statement needs a prior and a likelihood.

The independence assumption does work here

One thousand simulation paths that all reuse one quiet historical week are not one thousand independent demonstrations of performance across market regimes. Similarly, overlapping daily loss windows can share most of their returns. The binomial calculation presumes identical independent Bernoulli trials; clustering and changing risk levels can make its effective evidence much weaker.

Define the failure event before running the test. Changing the loss threshold after seeing the sample changes what the zero means. Record the sampling window and market conditions too. VaR backtesting separates the number of breaches from their clustering; rare-event log loss evaluates probability forecasts even when failures are scarce.

If the event rate itself changes over time, a long clean history can also describe the wrong regime. When more data makes a forecast worse gives a simple example.

Practice

One-percent riskIf the true failure rate is 1%, what is the chance of no failures in 300 independent trials?
Show answer

0.99300≈4.90%0.99^{300}\approx4.90\%. A clean run of 300 trials is possible under a 1% risk, but it is uncommon enough to put the one-sided 95% upper confidence bound just below 1%.

Fewer trialsZero failures appeared in 50 independent trials. What does the rule of three give, and what is the exact 95% upper bound?
Show answer

The shortcut gives 3/50=6%3/50=6\%. The exact bound is 1−0.051/50≈5.82%1-0.05^{1/50}\approx5.82\%.