{
  "title": "Check an experiment’s assignment counts before reading its uplift",
  "synthetic": true,
  "inputs": {
    "a": 550,
    "b": 450,
    "share": 0.5
  },
  "outputs": [
    {
      "label": "Expected A",
      "actual": 500,
      "expected": 500,
      "passed": true
    },
    {
      "label": "Chi-square statistic",
      "actual": 10,
      "expected": 10,
      "passed": true
    }
  ],
  "constraints": [
    "v.share<1"
  ],
  "formulas": [
    {
      "label": "Expected A",
      "javascript": "(v.a+v.b)*v.share"
    },
    {
      "label": "Chi-square statistic",
      "javascript": "(v.a-(v.a+v.b)*v.share)**2/((v.a+v.b)*v.share)+(v.b-(v.a+v.b)*(1-v.share))**2/((v.a+v.b)*(1-v.share))"
    }
  ],
  "limits": "Very small expected cells, clustered assignment and repeated checks need specialist treatment. A balanced allocation also cannot establish correct event logging, absence of spillover or a causal effect on revenue."
}
