Statistics Scenarios
Sampling, uncertainty, evidence, and evaluation decisions.
Source locations
- Inputs and calculations:
mlsysim/engine/scenario_definitions/statistics.py. - Named configurations:
mlsysim/engine/scenario_catalog/statistics/. - Result schemas:
mlsysim/engine/result_types/statistics.py.
Public imports and existing class reference URLs remain stable.
Scenario contracts
- AccuracyFrontierScenario: A hypothetical accuracy-against-disparity frontier,
floor + span (1 - exp(-rate x)), with named candidate disparities on it. - AgreementDriftScenario: A labeling campaign’s kappa at a baseline and again after
elapsed. - AnnotatorAgreementScenario: Two independent annotators with the same label mix
class_shares: chance agreement, and Cohen’s kappa at anobserved_agreement. - ArgumentConfidenceScenario: A stipulated safety argument:
premisesrequired premises atpremise_confidenceeach, and a claim carried bylegsindependent legs atleg_confidenceeach. - ArmComparisonScenario: Two policies run
arm_runstimes each, withsuccesses_aandsuccesses_bsuccesses; Fisher’s exact test, and the runs per arm that separatep_highfromp_lowtwo-sided atalphawithpower. - AutomationBiasScenario: A human reviews an AI’s output; the human accepts
miss_acceptanceof the AI’s misses. - BiasFeedbackScenario: A gap passed at launch, refit from the next audit, iterated over retraining cycles:
gap(k) = launch_gap * factor^kagainst a releasegate(all in percentage points). - BinShareShiftScenario: A feature binned at the training quantiles: training shares against recent shares, scored by PSI.
- BinomialIntervalsScenario: Several success counts out of one number of independent tasks.
- CappedSelectionCostScenario: Candidates for one fixed task, an exact checker, and a cap on candidates.
- CertifiedRadiusScenario: Binary randomized smoothing at noise
noise_sd, against an l-infinity budget on one input. - ClosedLoopCampaignScenario:
clean_runsfailure-free closed-loop trials of a frozen policy in one cell oftableonsite, eachrunlong with an automatedreset, bounded at one-sidedconfidence. - ConfidenceRegimesScenario: Stipulated proposer confidence against task success in several operating regimes.
- ConstraintAccuracyCostScenario: Accuracy before and after a fairness constraint (percent), with the policy’s stated rates.
- CrashRateDenominatorScenario: A reported before-and-after crash rate and the same comparison on the cohort whose exposure is complete (rates per million miles).
- DetectionDelayLossScenario: A fault that cuts
quality_dropofannual_valueuntil it is detected, found afterslow_detectionorfast_detection,incidents_per_yeartimes a year. - DriftConfirmationScenario: Labeled outcomes that confirm a drop of
dropfrombaseline_accuracy. - EfficiencyClaimGapScenario: A datasheet operating point against a sustained one: operations per watt at each, and their ratio.
- EqualOpportunityPriceScenario: Utility per applicant of raising
group’s TPR toreference_group’s by moving its threshold, when that move raises its FPR byfpr_increase: a repaid loan earnsrepay_margin, a default losesdefault_loss(both USD). - ExplanationLogScenario: Logging an explanation with every prediction:
predictions_per_dayfordays_per_month, each amap_size_lowtomap_size_highattribution map (or tabular attributions ofattribution_bytes_lowtoattribution_bytes_highper feature). - ExplorationExposureScenario: A ranking service showing
slots_per_useritems a day todaily_usersfrom a catalog ofcatalog_items, withexplore_shareof slots served by randomized exploration. - FalseAlarmBudgetScenario: One detection window every
window,listening_per_dayof each day, overhorizon. - FloatBitFlipScenario: One stored binary32 value with bit
flipped_bitflipped (bit 30 is the top exponent bit). - GaussianDriftScenario: A continuous feature fitted as a normal at reference and now: KL divergence of the reference from the current fit.
- GroupConfusionScenario: Binary decisions for two or more groups as confusion counts
{group: {tp, fp, fn, tn}}. - HazardExposureScenario: Failure-free exposure that bounds each of
rates(constant hazards per hour) at one-sidedconfidence, against whatrigsrigs or one rig overrig_timeaccumulate. - HostAcceleratorBoardScenario: One board, a host CPU and an attached accelerator: model-only and end-to-end latency, active energy.
- InlineOverheadScenario: A safeguard added inline to a request path of
base_latency, costingoverhead_lowtooverhead_high(fractions of the base) per request. - InterventionCampaignScenario:
interventionsinterventions inmissionssupervised runs ofmission: burden per hour and per kilometer, and an exact two-sided1 - alphainterval on the rate. - KsDriftScenario: A two-sample K-S drift test of
n_referencetraining againstn_currentrecent values of one feature. - LaplaceMeanReleaseScenario: The mean of a public roster of
group_sizevalues in[0, value_range]released underepsilon-DP by one Laplace draw on the sum (replace-one adjacency). - MeanShiftTestScenario: A feature mean that moves from
reference_meantoobserved_meanovern_samplesrequests. - MeanVersusTailScenario: A benchmark’s mean latency against a production tail stated as a range.
- MembershipAuditScenario: A membership-inference audit on the ROC plane against the ceiling a pure
epsilon-DP release allows; the audit curveFPR + a FPR (1 - FPR)is illustrative. - MissionExposureScenario: Failure-free missions of
missionatmachine’s drive limit, withresetbetween them, that boundhazard_rateat one-sidedconfidence; and the exposure a relaxed target of one failure perrelaxed_mtbfneeds. - MonitorFleetAlertScenario:
modelsxmetrics_per_modelmonitors checked everycheck_intervalat a per-checkfalse_positive_rateon a stable process;dedup_shareof crossings are merged away. - PairedComparisonScenario: One candidate and one baseline trial on each sampled task, outcomes kept in pairs.
- PreferenceLabelBudgetScenario: Human preference labels for a reward model:
comparisons_lowtocomparisons_highatprice_lowtoprice_highper comparison. - ProportionGapTestScenario: An observed gap between two rates,
rate_aandrate_b, onn_per_groupdecisions each. - ProportionPlanningScenario: Planning targets for one acceptance rate and for two independent arms.
- ProportionSampleSizeScenario: Samples that pin a pass fraction
rateto withinhalf_widthatconfidence:z^2 p (1 - p) / m^2. - ProxyMetricLatencyScenario: A search-width change that buys an offline metric gain with latency, against a serving budget.
- QuantizedAcceptanceGatesScenario: A float model and its quantized copy against acceptance gates set before compression.
- RetrainingIntervalScenario: Retraining a model whose accuracy decays as
driftfits it, servingquery_ratequeries worthvalue_per_queryper unit accuracy, atrun_costa run.footprintandaccelerator_priceprice the compute share of a run;compared_intervalsandscheduled_intervalare cadences to compare with the optimum. - RoadExposureScenario: Miles-to-demonstrate requirements per event class (zero failures, precision, improvement), in millions of miles at human benchmark
ratesper 100 million miles, against one datedfleet_milestotal (millions) at one-sidedconfidence. - SameTestSetAccuracyComparisonScenario: Two models scored on the same
n_samplestest items: independent-set interval and McNemar’s limit. - SampledDecisionMonitorScenario: Per-group metric monitoring of a decision service at
request_rate. - SegmentAccuracyScenario: Accuracy measured separately on each traffic segment;
traffic_sharesandaccuraciesare keyed by segment name. - SequentialTestScenario: Wald’s SPRT between an unacceptable failure rate
p_unacceptableand an acceptable onep_acceptableat error ratesalphaandbeta; the score aftertrace_clean_runsclean runs and one failure; and the fixed zero-failure test for success1 - p_unacceptableat the samealpha. - ShardedUnlearningScenario: Exact unlearning by sharded retraining (SISA) against a full retrain of
workload. - StrongScalingPairScenario: The same fixed job on
base_devicesand onscaled_devices: speedup, ideal time, and efficiency. - SubgroupEvaluationBudgetScenario: The labeled data a per-group evaluation needs: one group’s rate within
half_widthatconfidence(worst caserate0.5), the collection random sampling needs to reach atarget_per_groupfrom a group ofgroup_share, and the per-group count that pins a gap between two equal-size groups togap_half_width. - TaskMixConsistencyScenario: Equally weighted task types and a number of runs that must all pass.
- TwoProportionTestScenario: A two-arm test sized to detect an absolute
lifton abaseline_rateat the normal quantilesz_alphaandz_beta, ondaily_requestssplit between arms. - ZeroEventExposureScenario: Exposure needed, with zero events observed, to bound a rate of
budgetperhorizonat one-sidedconfidence, and the size of recording that exposure atsample_rate.