Ray's Knowledge Base
Unlock

The p90 of a signed error is not a bound on the error's size

PitfallVerified 30 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.

Symptom#

A table reports "median / p90" of a signed error, such as a clock offset (fwd - rev) / 2, and the text reads the p90 as "the error is under X at p90". Decisions built on it (for example "a duration is measurable when it is more than twice the arm's p90 error") pass cells they should fail.

Cause#

The code takes the 90th percentile of the signed values, sorted(errs)[n * 9 // 10]. For errors centred near zero, the signed p90 is only the upper tail. The negative tail, which can be as large, is not in it. In one run the signed p90 was 0.69 us at 4 KB and 0.12 us at 64 B, while the p90 of the absolute error was 1.28 us and 0.86 us.

Fix#

  • When the p90 stands for "how large the error gets", compute it on abs(err).
  • Label a signed percentile as signed in every table that prints it.
  • Recompute every threshold or yes/no mark that used the signed value.

Evidence#

Found by an independent check of the dpucrumbs e2 clock-error doc on 2026-09-30 (run e2_asynchrony/20260929-200509, arm D). With the absolute p90, the claim "arm D is under a microsecond at p90" failed at 4 KB, and three of the doc's measurable/not-measurable marks changed.

Also found by searching

  • arm D is under a microsecond at p90 but the absolute error is larger
  • p90 of a signed clock error read as an error bound
  • how do I report the size of an error with a percentile
  • signed percentile hides the negative tail
  • sorted(errs)[n*9//10] gives p90 0.12 us but abs error p90 is 0.86 us
  • my table says the error is under X at p90 but large negative errors are not counted
  • how should I compute a p90 error bound for an error that can be positive or negative?
  • 90th percentile of signed clock offset vs percentile of absolute value, measurable threshold wrong