"""Branch odds before the data: synthetic year values, SD 2.0 (design.py), 97 years, SE floor by
placebo SD s drawn as 0.25. 2000 runs for each true dip."""
import numpy as np, sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
import rule
rng = np.random.default_rng(1)
for true in (0, 0.3, 0.6, 1.0, 1.5):
    c = {"killed": 0, "survived": 0, "inconclusive": 0}
    for _ in range(2000):
        v = rng.normal(true, 2.0, 97)
        se = max(v.std(ddof=1) / 97 ** .5, 0.25)
        c[rule.verdict(v.mean(), se)[0]] += 1
    print(true, {k: round(n / 2000, 3) for k, n in c.items()})
