# Equal average error rates are not equal conditional behavior

This is an exact, synthetic counterexample, not a storage benchmark or an attack.
It asks one narrow question: does an aggregate false-positive fraction determine
how positives are distributed between two query groups? It does not.

## Construction

Every query is for a full key absent from the represented set. A positive
therefore counts as a false positive for **full-key membership**. The two groups
are abstract labels, not real prefixes. Each contains 100 equally weighted
query slots. These are stipulated populations, not sampled observations.

| Design | Group | Absent queries | Positive answers | Fraction |
| --- | --- | ---: | ---: | ---: |
| Balanced | A | 100 | 10 | 10/100 |
| Balanced | B | 100 | 10 | 10/100 |
| Concentrated | A | 100 | 20 | 20/100 |
| Concentrated | B | 100 | 0 | 0/100 |

Both designs have 20 positives among 200 absent queries: 10%. Their conditional
fractions differ. In the balanced design, selecting a group does not change the
fraction. In the concentrated design it changes from 20% to 0%.

For counts x and y with denominators a and b, the overall fraction is
(x + y)/(a + b). The two conditional fractions are equal exactly when x*b = y*a.
The implementation compares these products as integers, avoiding floating-point
rounding. Unequal group sizes require the weighted aggregate, not the unweighted
average of percentages.

## What this establishes

An aggregate error rate discards the allocation of errors across groups.
Consequently, two filters with the same reported average need not behave alike
under a differently weighted query distribution. This is an elementary
counterexample to an inference, not a model of a particular filter.

Even the concentrated table does **not** prove an information leak. To make a
confidentiality claim, an assessment would additionally need to define protected
information, explain its relationship to the groups, show what an observer can
measure and test the deployed authorization and execution paths. None of those
conditions is supplied by these arithmetic tables.

Nor is the balanced table a proof of safety: it checks only two groups and one
binary outcome. Other groupings, state histories or observations are outside
this model. The example contains no network client, timing probe, key-recovery
logic, engine dependency or random simulation.

## Reproduce

From this directory, with Node.js supporting its built-in test runner:

```sh
node model.mjs
node --test model.test.mjs
```

The first command prints all inputs and exact numerator/denominator pairs.
The tests cover the example, unequal denominators, 4,225 small contingency
tables and invalid inputs. No confidence interval is appropriate: all counts
are constructed, not estimated. No seed or external dataset is needed.

## Context and reuse

The accompanying [Prefix siphoning entry](https://hesela.dev/terms/prefix-siphoning/)
separates a published security result from this independent arithmetic exercise.
For the original research, see [Kaufman, Hershcovitch and Morrison, USENIX ATC 2023](https://www.usenix.org/conference/atc23/presentation/kaufman).
The example does not reproduce that work's measurements or algorithms.

Hesela-authored model, tests and explanation: CC0-1.0. Third-party publications
retain their original rights. Created 2026-12-02.
