Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

How Sequential Probability Ratio Test Algorithms Accumulate Streaming Financial Evidence: Likelihood Ratios, Error Boundaries, Early Stopping, Overshoot, Dependence and False Alarms

Three learners review open books together at a classroom table, with stacks of textbooks, stationery and a whiteboard in the bright room.

Reader question: If evidence arrives one observation at a time, how can an algorithm decide whether there is already enough evidence to distinguish two pre-specified statistical hypotheses instead of waiting for a fixed sample size?

The Sequential Probability Ratio Test, or SPRT, is a classical answer. It accumulates the likelihood ratio of the observed stream under two hypotheses and stops when the accumulated evidence crosses an upper or lower boundary. Between the boundaries, the correct output is not “yes” or “no”; it is “keep observing.”

This article owns the simple-hypothesis sequential-testing problem: H0 + H1 + sequential observations + chosen Type-I/Type-II error goals → a running likelihood-ratio statistic, continuation region, stopping time, decision and operating-characteristic diagnostics.

It does not own general fraud classification, suspicious-activity determinations, CUSUM change detection, Bayesian regime inference or automatic transaction blocking. Those are different page roles. An SPRT is evidence mathematics, not a legal or operational decision rule.

This is public mathematical and computational education, not financial advice or a live monitoring instruction.

1. Fixed-sample testing asks a different question

A conventional fixed-sample test chooses a sample size n in advance, collects all n observations and then evaluates the evidence.

A sequential test instead asks after each observation:

Is there already enough evidence for H1? Enough for H0? Or should sampling continue?

That third state is what makes sequential analysis fundamentally different. The stopping rule is part of the statistical design, not an afterthought.

2. Two simple hypotheses

The classical SPRT is clearest when both hypotheses specify complete probability models:

H0: X ∼ f0

H1: X ∼ f1.

For observations X1,…,Xn, define the likelihood ratio:

Λn = ∏i=1n f1(Xi)/f0(Xi).

Large Λ supports H1; small Λ supports H0.

3. Log likelihood turns multiplication into addition

Computationally, the logarithm is usually preferable:

Sn = log Λn = Σi=1n log[f1(Xi)/f0(Xi)].

Every new observation contributes an evidence increment. Positive increments favour H1; negative increments favour H0.

The algorithm therefore becomes a recursive accumulator:

Sn = Sn−1 + ℓ(Xn).

4. The three decision regions

Choose a lower likelihood-ratio boundary B and upper boundary A, with B<1<A.

  • If Λn ≥ A, stop in favour of H1.
  • If Λn ≤ B, stop in favour of H0.
  • If B < Λn < A, continue sampling.

In log space the boundaries become log B and log A.

5. Classical approximate boundaries

For desired Type-I error α and Type-II error β, the familiar Wald approximations are:

A ≈ (1−β)/α

B ≈ β/(1−α).

For α=0.05 and β=0.10, these give approximately:

A≈18,   B≈0.1053.

In log space:

log A≈2.89,   log B≈−2.25.

These are useful teaching formulas, but they are approximations rather than universally exact finite-sample boundaries.

6. Overshoot is not a minor technicality

At the stopping observation, the likelihood ratio usually does not land exactly on A or B. It crosses and overshoots. In discrete models, the amount of overshoot can be material.

Recent work by Fischer and Ramdas emphasises that the widely used approximate Wald thresholds do not, in general, deliver exact α and β guarantees when β>0. Exact or improved boundaries may require numerical calibration or modified sequential constructions.

Weak link: quoting α=5% and β=10% from the approximate formulas without verifying realised operating characteristics can create false precision.

7. A Bernoulli toy stream

Suppose Xi is a binary exception flag. This is a purely statistical toy example, not a definition of fraud or suspicious activity.

Compare:

H0: p=0.01

H1: p=0.03.

When X=1, the log-likelihood increment is:

log(0.03/0.01)=log 3≈1.099.

When X=0, the increment is:

log(0.97/0.99)≈−0.0204.

One flagged observation adds much more evidence for H1 than one ordinary observation adds for H0, because an exception is relatively rare under both hypotheses but three times more likely under H1.

The accumulated path, not any single observation, determines when a boundary is crossed.

8. Expected sample size is part of the design

One attraction of SPRT is efficiency. When one of the two simple models is correct and the evidence is strong, the test can stop much earlier than a fixed-sample procedure designed for comparable error goals.

But “faster on average” is not “always fast.” If the true data-generating process lies between H0 and H1, the likelihood ratio may wander in the continuation region for a long time.

A useful design therefore reports the distribution of stopping times across a grid of plausible parameter values, not only the mean under the two design points.

9. Inputs

Typical inputs include:

  • precise H0 and H1 probability models;
  • sequential observations;
  • α and β design targets;
  • exact, numerical or approximate boundaries;
  • maximum sample size if truncation is allowed;
  • missing-data policy;
  • dependence model if observations are not independent;
  • versioned definitions for the monitored quantity;
  • simulation plan for verifying realised errors and stopping times.

10. Outputs

Useful outputs include:

  • running likelihood ratio and log-likelihood ratio;
  • upper/lower boundary values;
  • status: support H0, support H1, or continue;
  • stopping time;
  • boundary crossed;
  • empirical Type-I and Type-II error rates from simulation;
  • expected and quantile stopping times;
  • overshoot distribution;
  • sensitivity to model misspecification;
  • audit trail of every evidence increment.

11. Independence is often the hidden assumption

The product likelihood above is valid when the joint model factorises in the assumed way. If observations are dependent, simply multiplying marginal densities can badly misstate evidence.

Financial streams commonly contain clustering, autocorrelation, common shocks and repeated observations linked to the same entity.

Falsifier: simulate or bootstrap data with the measured dependence structure. If the nominal false-alarm rate rises sharply, the independent-increment SPRT is not calibrated for the stream.

12. The hypotheses must be specified before looking at the path

If H1 is repeatedly changed after seeing which alternative best explains the accumulated data, the classical simple-vs-simple SPRT error calculation no longer describes the actual experiment.

Falsifier: freeze f0, f1, boundaries and stopping policy before evaluating the test on an untouched stream.

13. Composite hypotheses need other machinery

Real monitoring questions often look like:

H0: p≤1% versus H1: p≥3%

rather than two exact point values. Generalised likelihood-ratio tests, mixture tests, confidence sequences or specialised sequential procedures may then be more appropriate.

Using a simple-point SPRT while verbally claiming a broad composite guarantee is a page-role error.

14. Counterexample: true parameter lies between the design points

Suppose the actual Bernoulli rate is 2%, between the 1% and 3% hypotheses. The evidence can drift slowly because neither model is especially good.

Falsifier: simulate operating characteristics at intermediate values, not just p=0.01 and p=0.03. Examine decision probabilities and stopping-time tails.

15. Counterexample: seasonality masquerades as evidence

A monitored exception rate may change predictably by day of week, month-end or payment cycle. A stationary SPRT can then accumulate evidence against H0 merely because the baseline ignores known time structure.

Falsifier: stratify or model the expected rate by calendar state and test residual evidence rather than raw counts.

16. Counterexample: one source generates many correlated observations

Imagine one operational event creating hundreds of near-duplicate records. Treating all records as independent evidence can make Sn jump across a boundary immediately.

Falsifier: cluster by the true generating unit and recompute the likelihood at the cluster level or with an explicit dependence model.

17. Counterexample: truncation changes the test

An operational system may require a decision after at most N observations. A truncated SPRT needs a terminal rule for paths still inside the continuation region.

That terminal rule changes Type-I/Type-II errors and expected sample size.

Falsifier: simulate the complete truncated design including the terminal decision. Do not quote untruncated SPRT properties.

18. Counterexample: a boundary crossing becomes an automatic adverse action

An SPRT decides between statistical models. It does not establish intent, legality, creditworthiness, culpability or a complete risk assessment.

Falsifier of safe use: remove the downstream label and ask what the statistic literally proves. If the answer is only “the observed sequence is more compatible with f1 than f0 by the chosen rule,” then stronger operational claims require separate evidence and authority.

19. Alert-volume caps are not statistical calibration

A real monitoring system may face investigation capacity constraints. Simply capping alerts to fit staffing is mathematically different from choosing a statistically justified sequential boundary.

A useful historical governance example comes from FinCEN’s 15 February 2018 U.S. Bank enforcement release, which described the bank’s predetermined alert cap as causing legitimate automated monitoring alerts to be lost. The lesson for algorithm design is not that SPRT is required; it is that operational capacity limits must not be silently disguised as statistical evidence thresholds.

20. Evidence polarity

Evidence for confidence includes correctly specified likelihoods, predeclared hypotheses and boundaries, empirical error rates close to design targets, stable performance under dependence-aware simulation, sensible stopping-time distributions and reproducibility from the stored sequence.

Evidence against confidence includes approximate thresholds treated as exact, large overshoot effects, serial dependence ignored in the likelihood, a changing baseline, hypotheses chosen after inspecting the data, very long continuation under plausible intermediate states, or operational decisions that attach meanings the statistical hypotheses never encoded.

21. Diagnostics ladder

  1. Hypothesis audit: write f0 and f1 explicitly.
  2. Unit audit: identify the independent or modelled observation unit.
  3. Increment audit: verify each log-likelihood increment.
  4. Boundary audit: state whether boundaries are exact, numerical or Wald approximations.
  5. Overshoot audit: inspect boundary-crossing excess.
  6. Error audit: simulate Type-I and Type-II errors.
  7. Sample-size audit: inspect stopping-time mean and tail quantiles.
  8. Intermediate-state audit: simulate parameters between H0 and H1.
  9. Dependence audit: model autocorrelation and clustering.
  10. Drift audit: test for baseline changes through time.
  11. Truncation audit: include any maximum-N rule.
  12. Downstream audit: ensure statistical support is not being mislabelled as a substantive finding.

22. Why CUSUM is close but not the same

Both SPRT and CUSUM accumulate log-likelihood-style evidence. But their canonical jobs differ.

SPRT: sequentially distinguish two specified hypotheses and stop for either one.

CUSUM: detect a persistent change from a baseline, commonly resetting accumulated evidence when it moves in the wrong direction.

For unknown change time, the reset structure is crucial. Treating every sequential evidence accumulator as “CUSUM” or “SPRT” erases the different statistical questions.

23. Alternatives

Fixed-sample likelihood-ratio tests are appropriate when a fixed data horizon is natural and repeated early looks are unnecessary.

CUSUM is designed for persistent change detection rather than a one-shot simple-vs-simple sequential decision.

Generalised likelihood-ratio sequential methods handle unknown alternative parameters.

Confidence sequences and e-value methods offer time-uniform inference under different constructions and can be useful when repeated monitoring is intrinsic.

Bayesian sequential decision rules combine posterior beliefs and explicit decision costs rather than fixed frequentist α/β boundaries.

24. Connections to the surrounding Bukit Timah Tutor knowledge estate

How CUSUM Sequential-Detection Algorithms Find Small Persistent Shifts owns change detection with reset statistics and average-run-length diagnostics.

How Banks Detect Payment Fraud owns the broader classification and decision-threshold problem. This SPRT article does not define suspicious or fraudulent activity.

How Banks Detect Model Drift owns the wider monitoring/redevelopment workflow when the baseline model itself changes.

The full public lane is indexed at Finance & Banking Algorithms | Applied Mathematics in Real Financial Systems.

25. What would falsify confidence?

Withdraw confidence if realised Type-I/Type-II errors materially exceed the declared targets, if approximate boundaries are reported as exact despite overshoot, if dependence invalidates the likelihood factorisation, if the hypotheses drift during the test, if truncation is unmodelled, or if plausible intermediate states produce pathological stopping behaviour.

26. Verification protocol

Preserve the exact hypotheses, density or probability-mass functions, α, β, boundary derivation, maximum sample rule, observation order, each log-likelihood increment, stopping time, simulation code and random seeds. Verify the implementation against hand-calculated short sequences and independent Monte Carlo operating-characteristic tests.

27. Update triggers

Recalibrate when the monitored population changes, the observation unit changes, dependence structure changes, event definitions change, H0 or H1 is revised, a new maximum-sample rule is introduced, the cost of the two error types changes, or empirical false alarms depart from the verified design.

28. Primary and high-quality references

Educational boundary: an SPRT boundary crossing is a statistical statement relative to specified models and error rules. It is not, by itself, a finding of fraud, misconduct, default, insolvency or any other substantive conclusion.