Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis/adoption_national.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"engine":{"convention":"additive_anchor","draws":4000,"seed":11},"national_expected_fy2028_bills_usd":{"base":7671249967.84,"broad":6940672776.84,"strict":7574367069.48},"provenance":{"data_json_sha256":"d1730015b76c09d0a407af3e739675bae6405a96c148e10e574da48360e47cde","engine_scenario_data_sha256":"7886710020f940beabc01110564384829ff4cb54b806ed1aee5bd9cac5f26b20"},"schema":"snap_qc_sim.adoption_national.v1","states_expected_fy2028_bills_usd":{"AK":{"base":0.0,"broad":0.0,"strict":0.0},"AL":{"base":171787192.36,"broad":160076870.93,"strict":171507863.59},"AR":{"base":47330949.4,"broad":29122069.15,"strict":46317321.73},"AZ":{"base":277976643.97,"broad":249360323.09,"strict":277976643.97},"CA":{"base":1711964398.01,"broad":1335116889.01,"strict":1668746568.61},"CO":{"base":158939210.69,"broad":135592834.8,"strict":142582482.98},"CT":{"base":84964973.42,"broad":66643594.63,"strict":76426964.07},"DC":{"base":0.0,"broad":0.0,"strict":0.0},"DE":{"base":0.0,"broad":0.0,"strict":0.0},"FL":{"base":680119996.5,"broad":930041164.8,"strict":696435084.13},"GA":{"base":0.0,"broad":0.0,"strict":0.0},"GU":{"base":15963222.46,"broad":16082533.63,"strict":16237026.3},"HI":{"base":105852837.97,"broad":99633475.76,"strict":105826335.0},"IA":{"base":0.0,"broad":0.0,"strict":0.0},"ID":{"base":0.0,"broad":0.0,"strict":0.0},"IL":{"base":0.0,"broad":0.0,"strict":0.0},"IN":{"base":140044205.39,"broad":121676316.99,"strict":139571438.01},"KS":{"base":37972034.1,"broad":35413348.47,"strict":37710943.73},"KY":{"base":0.0,"broad":0.0,"strict":0.0},"LA":{"base":146381926.98,"broad":72297683.38,"strict":118748248.89},"MA":{"base":300151100.61,"broad":343927837.23,"strict":303116829.45},"MD":{"base":132730990.15,"broad":207052260.25,"strict":171480942.85},"ME":{"base":49802930.15,"broad":41892613.79,"strict":48397432.52},"MI":{"base":298181424.1,"broad":178299476.5,"strict":280915715.3},"MN":{"base":79475101.07,"broad":98370529.6,"strict":79876941.47},"MO":{"base":137956398.61,"broad":81878807.67,"strict":136170018.87},"MS":{"base":79372132.45,"broad":76709171.57,"strict":79342323.18},"MT":{"base":15202702.62,"broad":9761309.19,"strict":13593361.93},"NC":{"base":137497994.69,"broad":30899216.62,"strict":131304074.28},"ND":{"base":10583417.07,"broad":9044481.01,"strict":10545317.86},"NE":{"base":0.0,"broad":0.0,"strict":0.0},"NH":{"base":14268455.85,"broad":7961702.92,"strict":13245326.44},"NJ":{"base":87649303.03,"broad":73648588.14,"strict":86538901.51},"NM":{"base":0.0,"broad":0.0,"strict":0.0},"NV":{"base":31016079.45,"broad":24005073.78,"strict":28209136.96},"NY":{"base":629878694.33,"broad":1020794400.53,"strict":629878694.33},"OH":{"base":135610495.08,"broad":11583475.84,"strict":113053200.03},"OK":{"base":216350433.65,"broad":189830542.95,"strict":213174061.2},"OR":{"base":0.0,"broad":0.0,"strict":0.0},"PA":{"base":399695390.62,"broad":338071111.1,"strict":392482370.63},"RI":{"base":42494399.77,"broad":47680157.03,"strict":47027700.64},"SC":{"base":119534388.63,"broad":80108460.18,"strict":119534388.63},"SD":{"base":0.0,"broad":0.0,"strict":0.0},"TN":{"base":153578435.12,"broad":151561205.24,"strict":153482376.56},"TX":{"base":680607586.47,"broad":404630032.53,"strict":675896610.22},"UT":{"base":0.0,"broad":0.0,"strict":0.0},"VA":{"base":230432127.45,"broad":246266640.38,"strict":245510558.58},"VI":{"base":0.0,"broad":0.0,"strict":0.0},"VT":{"base":0.0,"broad":0.0,"strict":0.0},"WA":{"base":87177521.17,"broad":7013190.28,"strict":83873001.01},"WI":{"base":0.0,"broad":0.0,"strict":0.0},"WV":{"base":22704874.43,"broad":8625387.89,"strict":19630864.01},"WY":{"base":0.0,"broad":0.0,"strict":0.0}}}
{"engine":{"convention":"additive_anchor","draws":4000,"seed":11},"national_expected_fy2028_bills_usd":{"base":7671249967.84,"broad":6940672776.84,"strict":7574367069.48},"provenance":{"data_json_sha256":"d1730015b76c09d0a407af3e739675bae6405a96c148e10e574da48360e47cde","engine_scenario_data_sha256":"f64b9fd7408daabe0e5ffad8115ef658572b35e0bdd102deca860f4230e6c044"},"schema":"snap_qc_sim.adoption_national.v1","states_expected_fy2028_bills_usd":{"AK":{"base":0.0,"broad":0.0,"strict":0.0},"AL":{"base":171787192.36,"broad":160076870.93,"strict":171507863.59},"AR":{"base":47330949.4,"broad":29122069.15,"strict":46317321.73},"AZ":{"base":277976643.97,"broad":249360323.09,"strict":277976643.97},"CA":{"base":1711964398.01,"broad":1335116889.01,"strict":1668746568.61},"CO":{"base":158939210.69,"broad":135592834.8,"strict":142582482.98},"CT":{"base":84964973.42,"broad":66643594.63,"strict":76426964.07},"DC":{"base":0.0,"broad":0.0,"strict":0.0},"DE":{"base":0.0,"broad":0.0,"strict":0.0},"FL":{"base":680119996.5,"broad":930041164.8,"strict":696435084.13},"GA":{"base":0.0,"broad":0.0,"strict":0.0},"GU":{"base":15963222.46,"broad":16082533.63,"strict":16237026.3},"HI":{"base":105852837.97,"broad":99633475.76,"strict":105826335.0},"IA":{"base":0.0,"broad":0.0,"strict":0.0},"ID":{"base":0.0,"broad":0.0,"strict":0.0},"IL":{"base":0.0,"broad":0.0,"strict":0.0},"IN":{"base":140044205.39,"broad":121676316.99,"strict":139571438.01},"KS":{"base":37972034.1,"broad":35413348.47,"strict":37710943.73},"KY":{"base":0.0,"broad":0.0,"strict":0.0},"LA":{"base":146381926.98,"broad":72297683.38,"strict":118748248.89},"MA":{"base":300151100.61,"broad":343927837.23,"strict":303116829.45},"MD":{"base":132730990.15,"broad":207052260.25,"strict":171480942.85},"ME":{"base":49802930.15,"broad":41892613.79,"strict":48397432.52},"MI":{"base":298181424.1,"broad":178299476.5,"strict":280915715.3},"MN":{"base":79475101.07,"broad":98370529.6,"strict":79876941.47},"MO":{"base":137956398.61,"broad":81878807.67,"strict":136170018.87},"MS":{"base":79372132.45,"broad":76709171.57,"strict":79342323.18},"MT":{"base":15202702.62,"broad":9761309.19,"strict":13593361.93},"NC":{"base":137497994.69,"broad":30899216.62,"strict":131304074.28},"ND":{"base":10583417.07,"broad":9044481.01,"strict":10545317.86},"NE":{"base":0.0,"broad":0.0,"strict":0.0},"NH":{"base":14268455.85,"broad":7961702.92,"strict":13245326.44},"NJ":{"base":87649303.03,"broad":73648588.14,"strict":86538901.51},"NM":{"base":0.0,"broad":0.0,"strict":0.0},"NV":{"base":31016079.45,"broad":24005073.78,"strict":28209136.96},"NY":{"base":629878694.33,"broad":1020794400.53,"strict":629878694.33},"OH":{"base":135610495.08,"broad":11583475.84,"strict":113053200.03},"OK":{"base":216350433.65,"broad":189830542.95,"strict":213174061.2},"OR":{"base":0.0,"broad":0.0,"strict":0.0},"PA":{"base":399695390.62,"broad":338071111.1,"strict":392482370.63},"RI":{"base":42494399.77,"broad":47680157.03,"strict":47027700.64},"SC":{"base":119534388.63,"broad":80108460.18,"strict":119534388.63},"SD":{"base":0.0,"broad":0.0,"strict":0.0},"TN":{"base":153578435.12,"broad":151561205.24,"strict":153482376.56},"TX":{"base":680607586.47,"broad":404630032.53,"strict":675896610.22},"UT":{"base":0.0,"broad":0.0,"strict":0.0},"VA":{"base":230432127.45,"broad":246266640.38,"strict":245510558.58},"VI":{"base":0.0,"broad":0.0,"strict":0.0},"VT":{"base":0.0,"broad":0.0,"strict":0.0},"WA":{"base":87177521.17,"broad":7013190.28,"strict":83873001.01},"WI":{"base":0.0,"broad":0.0,"strict":0.0},"WV":{"base":22704874.43,"broad":8625387.89,"strict":19630864.01},"WY":{"base":0.0,"broad":0.0,"strict":0.0}}}
51 changes: 26 additions & 25 deletions analysis/cause_shares.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@
"committed_prose_discrepancy": {
"assessment": "The 10-case count reproduces from all nine SAV AGENCY slots; neither available dollar definition reproduces $3.28M.",
"claim": "10 cases, $3.28M, 3.3%",
"claim_location": "paper/snapshot/labs/amterr/ANALYSIS.md:L62-L67",
"claim_location": "paper/snapshot/labs/amterr/ANALYSIS.md:L62-L67 at commit 755a7f3179e964dccdf6dc2f7266e7c4758a0141",
"claim_status": "Corrected in the lab's 2026-10-03 revision: ANALYSIS.md, section 'The 10 broad-coded cases that do not reproduce', reports that $3.28M does not reproduce, and claims_audit.json case_level.broad_coded_misses lists the 10 cases.",
"recomputed_broad_residual_n": 10,
"recomputed_hwgt_times_amterr_dollars": 4469987.48,
"recomputed_hwgt_times_engine_gap_dollars": 2913739.34,
Expand All @@ -144,27 +145,27 @@
},
"official_replay_any_agency_by_engine_outcome": {
"qc_any_agency": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 21385851.53,
"n": 16,
"share_of_slice_dollars": 0.262868558653,
"weighted_n": 70854.559396
},
"explained_input_facts": {
"reproduced": {
"dollars": 35722171.4,
"n": 47,
"share_of_slice_dollars": 0.439086360163,
"weighted_n": 196913.442078
}
},
"qc_no_agency": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 3996798.73,
"n": 5,
"share_of_slice_dollars": 0.049127467341,
"weighted_n": 17856.458946
},
"explained_input_facts": {
"reproduced": {
"dollars": 20250862.86,
"n": 29,
"share_of_slice_dollars": 0.248917613843,
Expand All @@ -174,83 +175,83 @@
},
"official_replay_fractional_cause_by_engine_outcome": {
"agency_or_system": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 18613052.87,
"fractional_n": 13.0,
"fractional_weighted_n": 57245.3175,
"share_of_replay_official_dollars": 0.228786138057
},
"explained_input_facts": {
"reproduced": {
"dollars": 30229226.25,
"fractional_n": 39.333333,
"fractional_weighted_n": 163473.948503,
"share_of_replay_official_dollars": 0.371568703879
}
},
"client_or_fact": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 6769597.39,
"fractional_n": 8.0,
"fractional_weighted_n": 31465.700841,
"share_of_replay_official_dollars": 0.083209887937
},
"explained_input_facts": {
"reproduced": {
"dollars": 25457397.13,
"fractional_n": 35.833333,
"fractional_weighted_n": 147975.931408,
"share_of_replay_official_dollars": 0.3129147924
}
},
"excluded_federal_match": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
"share_of_replay_official_dollars": 0.0
},
"explained_input_facts": {
"reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
"share_of_replay_official_dollars": 0.0
}
},
"no_required_action": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
"share_of_replay_official_dollars": 0.0
},
"explained_input_facts": {
"reproduced": {
"dollars": 286410.88,
"fractional_n": 0.833333,
"fractional_weighted_n": 3299.582211,
"share_of_replay_official_dollars": 0.003520477727
}
},
"other": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
"share_of_replay_official_dollars": 0.0
},
"explained_input_facts": {
"reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
"share_of_replay_official_dollars": 0.0
}
},
"unclassified": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
"share_of_replay_official_dollars": 0.0
},
"explained_input_facts": {
"reproduced": {
"dollars": 0.0,
"fractional_n": 0.0,
"fractional_weighted_n": 0.0,
Expand All @@ -259,20 +260,20 @@
}
},
"reference": {
"classification": "abs(engine_on_original - RAWBEN) <= 5; a miss is a computation-side upper bound, not a proven computation error",
"classification": "reproduced if abs(engine_on_original - RAWBEN) <= 5, else not_reproduced",
"path": "paper/snapshot/labs/amterr/amterr_replay_results.json",
"sha256": "3e214d2161269a8e5f1dad882aeec4dc0f7e35d957b6f836ea3170907b3368c6"
},
"slices": {
"all_283": {
"outcomes": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 27739818.9,
"n": 37,
"share_of_slice_dollars": 0.279838033554,
"weighted_n": 158746.939352
},
"explained_input_facts": {
"reproduced": {
"dollars": 71388303.72,
"n": 246,
"share_of_slice_dollars": 0.720161966446,
Expand All @@ -289,13 +290,13 @@
},
"official_above_threshold_97": {
"outcomes": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 25382650.26,
"n": 21,
"share_of_slice_dollars": 0.311996025994,
"weighted_n": 88711.018341
},
"explained_input_facts": {
"reproduced": {
"dollars": 55973034.26,
"n": 76,
"share_of_slice_dollars": 0.688003974006,
Expand All @@ -312,13 +313,13 @@
},
"subthreshold_186": {
"outcomes": {
"computation_side_upper_bound": {
"not_reproduced": {
"dollars": 2357168.64,
"n": 16,
"share_of_slice_dollars": 0.13263057259,
"weighted_n": 70035.921011
},
"explained_input_facts": {
"reproduced": {
"dollars": 15415269.46,
"n": 170,
"share_of_slice_dollars": 0.86736942741,
Expand Down Expand Up @@ -572,7 +573,7 @@
"element_dollar_formula": "sum(HWGT * AMOUNTi) where E_FINDGi in {2,3,4} and AMOUNTi > 0",
"generator": {
"path": "analysis/cause_shares.py",
"sha256": "67b7748b9cf02f63d910b9750839582068da1419005d1c9b5cf6f76ea1443ac3"
"sha256": "3eed82ca7af9c50fdccd3a924194e8cd65e22409487d6f4d7d217304c163721a"
},
"input_sav": {
"bytes": 62737439,
Expand Down
46 changes: 29 additions & 17 deletions analysis/cause_shares.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
Path(__file__).parents[1]
/ "paper/snapshot/labs/amterr/amterr_replay_results.json"
)
# A replayed case is "reproduced" when abs(engine_on_original - RAWBEN) <= 5.
REPLAY_OUTCOMES = ("reproduced", "not_reproduced")
REPLAY_TOLERANCE_DOLLARS = 5
# The lab's July 2026 ANALYSIS.md, before its 2026-10-03 revision.
PROSE_CLAIM_COMMIT = "755a7f3179e964dccdf6dc2f7266e7c4758a0141"

SLOTS = tuple(error_model.FINDING_SLOTS)
DETAIL_ROOTS = (
Expand Down Expand Up @@ -1023,13 +1028,22 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
raise ValueError("Replay HWGT does not match source SAV")
if not joined["STATUS"].astype(int).eq(replay["status"].astype(int)).all():
raise ValueError("Replay STATUS does not match source SAV")
engine_gap = (
pd.to_numeric(replay["engine_on_original"])
- pd.to_numeric(replay["rawben"])
).abs()
if not replay["within5"].astype(bool).eq(
engine_gap.le(REPLAY_TOLERANCE_DOLLARS)
).all():
raise ValueError("Replay within5 does not match its engine-RAWBEN gap")

for column in replay.columns:
if column not in joined:
joined[column] = replay[column]
joined["case_dollars"] = joined["HWGT"] * joined["AMTERR"]
reproduced, not_reproduced = REPLAY_OUTCOMES
joined["engine_outcome"] = np.where(
joined["within5"], "explained_input_facts", "computation_side_upper_bound"
joined["within5"], reproduced, not_reproduced
)
joined["official_above_threshold"] = error_model.official_error_label(joined).eq(1)
joined["cause_classes"] = joined.apply(_class_sets_for_row, axis=1)
Expand Down Expand Up @@ -1062,10 +1076,7 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
outcome: _replay_metric(
part.loc[part["engine_outcome"].eq(outcome)], denominator
)
for outcome in (
"explained_input_facts",
"computation_side_upper_bound",
)
for outcome in REPLAY_OUTCOMES
},
"solver_engine_within5_concordant_n": int(
part["solver_within5"].eq(part["within5"]).sum()
Expand Down Expand Up @@ -1093,10 +1104,7 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
fractional_cross_tab: dict[str, Any] = {}
for cause_class in CAUSE_CLASSES:
fractional_cross_tab[cause_class] = {}
for outcome in (
"explained_input_facts",
"computation_side_upper_bound",
):
for outcome in REPLAY_OUTCOMES:
part = crosswalk.loc[
crosswalk["class"].eq(cause_class)
& crosswalk["outcome"].eq(outcome)
Expand All @@ -1119,10 +1127,7 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
("qc_no_agency", False),
):
binary_cross_tab[qc_label] = {}
for outcome in (
"explained_input_facts",
"computation_side_upper_bound",
):
for outcome in REPLAY_OUTCOMES:
part = official.loc[
official["qc_any_agency"].eq(qc_value)
& official["engine_outcome"].eq(outcome)
Expand All @@ -1135,7 +1140,7 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
all_replay_dollars = float(all_replay["case_dollars"].sum())
broad_residual = all_replay.loc[
all_replay["qc_broad_rules_engine"]
& all_replay["engine_outcome"].eq("computation_side_upper_bound")
& all_replay["engine_outcome"].eq(not_reproduced)
].copy()
broad_residual["engine_gap_dollars"] = (
(broad_residual["engine_on_original"] - broad_residual["rawben"]).abs()
Expand All @@ -1152,8 +1157,8 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
"path": str(REPLAY_PATH.relative_to(Path(__file__).parents[1])),
"sha256": error_model._sha256(REPLAY_PATH),
"classification": (
"abs(engine_on_original - RAWBEN) <= 5; a miss is a "
"computation-side upper bound, not a proven computation error"
"reproduced if abs(engine_on_original - RAWBEN) <= 5, "
"else not_reproduced"
),
},
"denominator_reconciliation": {
Expand All @@ -1176,9 +1181,16 @@ def colorado_replay_reconciliation(universe: pd.DataFrame) -> dict[str, Any]:
"official_replay_any_agency_by_engine_outcome": binary_cross_tab,
"committed_prose_discrepancy": {
"claim_location": (
"paper/snapshot/labs/amterr/ANALYSIS.md:L62-L67"
"paper/snapshot/labs/amterr/ANALYSIS.md:L62-L67 at commit "
f"{PROSE_CLAIM_COMMIT}"
),
"claim": "10 cases, $3.28M, 3.3%",
"claim_status": (
"Corrected in the lab's 2026-10-03 revision: ANALYSIS.md, "
"section 'The 10 broad-coded cases that do not reproduce', "
"reports that $3.28M does not reproduce, and claims_audit.json "
"case_level.broad_coded_misses lists the 10 cases."
),
"recomputed_broad_residual_n": len(broad_residual),
"recomputed_hwgt_times_amterr_dollars": _rounded(
broad_residual["case_dollars"].sum(), 2
Expand Down
Loading
Loading