"""Original arithmetic from declared public inputs or explicit worked assumptions."""
import csv
from pathlib import Path
results={'no_marketing_index':100,'BAU_estimated_index':100*1.016,'proposed_computed_index':100*1.016*1.065,'proposed_vs_no_marketing_derived_pct':(1.016*1.065-1)*100,'proposed_minus_BAU_index_points':100*1.016*1.065-100*1.016,'proposed_vs_BAU_pct':((1.016*1.065)/1.016-1)*100}
assert abs(results['proposed_computed_index']-108.204)<1e-10
p=Path(__file__).parent/"data";p.mkdir(exist_ok=True)
with (p/"channel-allocation-baselines.csv").open("w",newline="") as f:
 w=csv.writer(f);w.writerow(["metric","value"]);w.writerows(results.items())
print(results)
