"""Illustrative economics only; no empirical effect inputs."""
import json
from pathlib import Path
N=100000; baseline=.02; contribution=40
rows=[]
for cost in [2000,8000,16000]:
 for coverage in [1,.5,.25]:
  orders=cost/contribution; overall=orders/N; profiled=overall/coverage
  rows.append(dict(added_cost_gbp=cost,profile_coverage=coverage,break_even_extra_orders=orders,overall_purchase_lift_percentage_points=overall*100,profiled_purchase_lift_percentage_points=profiled*100,overall_relative_lift=overall/baseline))
Path(__file__).with_name('results.json').write_text(json.dumps(dict(status='Illustrative assumptions, not observed effects',assigned_customers=N,baseline_purchase_rate=baseline,contribution_per_order_gbp=contribution,scenarios=rows),indent=2)+'\n')
