Repository navigation
test(escalation): Wilson intervals, exact McNemar and bootstrap Spearman in the aggregate - #41
Merged
Merged
Conversation
…man in the aggregate Each rate (task score, false-confidence, over-escalation, unparseable) now carries its Wilson 95% interval (z = 1.96) in the JSON cell and as extra trailing table columns. --pair A B runs an exact two-sided McNemar on the discordant shared unanswerable items and reports b, c and p. --rank reports Spearman between task score and false-confidence rate across models with a 10,000-resample bootstrap interval over models (--seed, default 0). Stdlib only; no existing field or score changes. Persona: hanuman Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vcntd3qgAxd6gnPEvVukVm
The two McNemar tests used unanswerable-only fixtures, so dropping the answerable filter in _unanswerable_outcomes left them green. Add a pair fixture mixing answerable items on which the models split: counting them would move b 5->8, c 1->2, n_shared 12->16 and p 14/64 -> 112/1024. Persona: hanuman Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vcntd3qgAxd6gnPEvVukVm
rudi193-cmd
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bite
The escalation aggregate reports every rate with its Wilson 95% interval and gains the two statistics the pre-registered grading rule grades on: exact McNemar for paired models and a bootstrap Spearman over models. Stdlib only; no existing number changes.
What was done
benchmarks/escalation/aggregate.py:*_ci(Wilson, z = 1.96) beside task score, false-confidence, over-escalation and unparseable rates, in bothmdandjsonoutput.--pair A B: exact two-sided McNemar on discordant items only, restricted to unanswerable items both models parsed without error. Reports b, c and p.--rank: Spearman between task score and false-confidence rate across models (average-rank ties). Bootstrap 95% interval, 10,000 resamples,--seeddefault 0. Needs at least 3 non-constant models, otherwise it reports none._statsappears only when--pairor--rankis passed; existing fields are unchanged.tests/test_escalation_runner.py: Wilson against textbook values, McNemar against hand-computed b/c, a seeded bootstrap, and a mixed-fixture test pinning the unanswerable-only filter.Evidence
*_ci(Kart F4EKKFRZ); suite 645 passed / 9 skipped.assert (8, 2, 16, 10) == (5, 1, 12, 6); restore → pass; suite 646 / 9;privacy_gate.py OK 14 files; ruff 0.16.7 clean (Kart ALZFMSP8).110 passedon the escalation test files; ruff 0.16.7All checks passed!,110 files already formatted(Kart 62BW4YVB).Out of scope
Next bite
Real runs of step 2b across the local ladder once the models are pulled (willow-mcp #693), graded under the sealed rule.
Decision
Ratified-by: sean-campbell — "ratify all"
🤖 Generated with Claude Code
https://claude.ai/code/session_01Vcntd3qgAxd6gnPEvVukVm