Skip to content

Outcome 5 (1/2): replication statistics aggregator#175

Merged
joshuawheelock merged 2 commits into
jumbocontext:mainfrom
DianaMeda:outcome-5-replication-stats
Jun 24, 2026
Merged

Outcome 5 (1/2): replication statistics aggregator#175
joshuawheelock merged 2 commits into
jumbocontext:mainfrom
DianaMeda:outcome-5-replication-stats

Conversation

@DianaMeda

Copy link
Copy Markdown
Contributor

Why

First building block of Outcome 5 (statistical confidence). A pure aggregator that turns K replicated A/B comparisons of the same scenario/harness into per-dimension lift statistics, so lift can be reported as mean ± SD instead of single-point estimates. Branches off mainindependent of the open Outcome 4 PRs (#170, #174).

What's here

  • src/domain/replication.tsReplicationReport + DimensionLiftStat { dimension, k, applicableReplications, meanJumbo, meanBaseline, meanLift, sdLift, tStatistic, isSignal }, re-exported from the domain barrel.
  • src/analysis/replication-stats.tsaggregateReplications(comparisons): ReplicationReport (pure, deterministic, no I/O). For each dimension present in every replication:
    • meanLift = mean of (jumboScore − baselineScore) per replication; sdLift = sample (n−1) SD.
    • isSignal only when |meanLift| > sdLift (GOAL.md: a lift is a signal only when it exceeds one SD); K<2 → SD 0, never a signal.
    • tStatistic reported against the K=5 one-tailed α=0.05 threshold (t > 2.13, df=4).
    • token-efficiency N/A replications (maxScore 0) are excluded and counted in applicableReplications.

Scope

Aggregation only. The eval run --replicate K command that drives, persists, and displays this is the next building block (2/2), which will stack on this branch.

Verification

  • 7 new unit tests (mean/SD math, isSignal boundary above/below 1 SD, K=1, N/A exclusion + applicable count, multi-dimension, "present in every replication", threshold note).
  • Full unit suite 361/361; tsc --noEmit clean.

🤖 Generated with Claude Code

Pure aggregator for K replicated A/B comparisons of the same scenario/harness,
the foundation for reporting lift with statistical confidence (GOAL.md
Outcome 5) instead of single-point estimates.

- domain/replication.ts: ReplicationReport + DimensionLiftStat
  { dimension, k, applicableReplications, meanJumbo, meanBaseline, meanLift,
    sdLift, tStatistic, isSignal }, re-exported from the domain barrel.
- analysis/replication-stats.ts: aggregateReplications(comparisons) ->
  ReplicationReport. Per dimension present in every replication: meanLift is the
  mean of (jumbo - baseline) per replication, sdLift the sample (n-1) SD;
  isSignal only when |meanLift| > sdLift (K<2 -> 0 SD, not a signal); tStatistic
  reported against the K=5 one-tailed alpha=0.05 threshold (t>2.13, df=4).
  token-efficiency replications that were N/A (maxScore 0) are excluded and
  counted in applicableReplications. Pure, deterministic, no I/O.

7 new tests; full unit suite 361/361 green; tsc --noEmit clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread evals/src/analysis/replication-stats.ts
@joshuawheelock joshuawheelock merged commit c7273ce into jumbocontext:main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants