import json,math from pathlib import Path O=Path(__file__).parent u0=1;ub=math.exp(-.5);up=math.exp(1);den=u0+ub+up out=dict(clv=dict(finite3=300/1.1+240/1.1**2+192/1.1**3,infinite=300/(1.1-.8),netInfinite=300/(1.1-.8)-250),allocation=dict(s=64,e=36,customersS=20*math.sqrt(64),customersE=3*math.sqrt(36),netValue=40*math.sqrt(64)+30*math.sqrt(36)-100,cappedE=100/9,cappedS=100-100/9,cappedNet=40*math.sqrt(100-100/9)+30*math.sqrt(100/9)-100),choice=dict(basicShare=ub/den,plusShare=up/den,outsideShare=1/den,twoOfferProfit=1000*(60*ub+200*up)/den,plusOnlyProfit=1000*200*up/(1+up)),pricing=dict(price=145,quantity=210,contribution=(145-40)*210,capacity120price=190,capacity120contribution=(190-40)*120),experiment=dict(control=40/400,treatment=60/400,uplift=60/400-40/400,incrementalConversions=20,netContribution=20*500-8000)) out['capacityInvestment']=dict(cost10Net=50*math.sqrt(90)-100,cost5Net=50*math.sqrt(95)-100,cost8Net=50*math.sqrt(92)-100,breakEvenCost=100-((out['allocation']['cappedNet']+100)/50)**2,revised12CapacityNet=40*math.sqrt(79)+120-100) (O/'mba611-outputs.json').write_text(json.dumps(out,indent=2));print(json.dumps(out,indent=2))