#!/usr/bin/env node // BudgetBench TREND TEST across versions of one system on the SAME frozen split: is a label's rate moving with the // version, or is a round-to-round change noise? Cochran-Armitage test for trend (versions scored 0, 1, 2, ... in the // order given), two-sided, normal approximation; plus the chi-square test of homogeneity. Never quote a // round-to-round difference without it. // node budgetbench/stats/trend.mjs --label wrong_shown ... // (--label may be given twice to test the union, e.g. --label wrong_shown --label wrong_offered) import {loadRun} from "./report.mjs"; const argv = process.argv.slice(2); const labels = []; const dirs = []; for (let i = 0; i < argv.length; i++) { if (argv[i] === "--label") labels.push(argv[++i]); else if (argv[i] !== "--regrade") dirs.push(argv[i]); } if (dirs.length < 2 || !labels.length) { console.error("usage: trend.mjs --label