"""Original arithmetic from declared public inputs or explicit worked assumptions."""
import csv
from pathlib import Path
results={}
for name,b,se in [('AI_vs_unavailable',.0131,.00252),('AI_vs_human',-.000768,.00259),('hybrid_vs_human',.00358,.00304)]:
 results[name+'_purchasers_per1000']=b*1000;results[name+'_lower95']=(b-1.96*se)*1000;results[name+'_upper95']=(b+1.96*se)*1000
results['worked_allowed_loss_per1000']=-2
assert results['AI_vs_human_lower95']< -2<results['AI_vs_human_upper95']
p=Path(__file__).parent/"data";p.mkdir(exist_ok=True)
with (p/"support-comparator-thresholds.csv").open("w",newline="") as f:
 w=csv.writer(f);w.writerow(["metric","value"]);w.writerows(results.items())
print(results)
