{
  "version": 1,
  "basis": "Declared next part of the marketplace experiment designs study: users who share small, overlapping groups (families, friend groups, teams) in an app, where one member's treatment reaches the others. Declared before any run of this code; the main, sensitivity, decision and memory sweep runs and their files are unchanged.",
  "declaration": "DESIGN-groups.md",
  "seed": 17,
  "replications": 500,
  "replication_rule": "500 simulated populations per setting, no reduction. Populations are shared across spillover strengths and shapes within one overlap level (seed 17, spawn key (0, overlap index, replicate) for the population and (1, overlap index, replicate) for every assignment).",
  "population": {
    "users": 50000,
    "group_sizes": [2, 3, 4, 5, 6, 7, 8],
    "group_size_weights": [0.22, 0.20, 0.18, 0.15, 0.11, 0.08, 0.06],
    "group_fill": "Primary groups are drawn in order until every user has one; the last group is cut to the users left, and a last group of one user joins the group before it.",
    "ring": "Groups sit on a ring in the order they were drawn, a stand-in for social nearness.",
    "overlap_share": [0.0, 0.15, 0.30],
    "overlap_rule": "Exactly round(share x users) users, chosen at random, also join one second group, drawn uniformly from the 20 groups within 10 places of their own on the ring.",
    "mates": "A user's group-mates are every other member of every group the user belongs to, counted once."
  },
  "outcome": {
    "name": "weekly active days, averaged over the test",
    "baseline": "3.0 + group effect of the user's first group, normal with SD 0.8, + user noise, normal with SD 1.5",
    "scale": "continuous, with no floor at 0 or ceiling at 7",
    "treatment": "Y = baseline + direct x own treatment + spillover x f(share of the user's group-mates treated)"
  },
  "effects": {
    "direct": 0.08,
    "spillover": [0.0, 0.04, 0.08, 0.16],
    "spillover_reason": "No spillover, half, equal to and twice the direct effect.",
    "shapes": {
      "linear": "f(s) = s",
      "threshold": "f(s) = 1 when at least half of the user's group-mates are treated, else 0"
    },
    "settings": "linear at every overlap and spillover (12); threshold at overlap 0.15 with spillover 0.04, 0.08 and 0.16 (3); no effect (direct 0, spillover 0) at every overlap (3). 18 settings.",
    "target": "Global effect: mean over users of the outcome with everyone treated minus the outcome with no one treated. It equals direct + spillover in every setting, because f(1) = 1 and f(0) = 0."
  },
  "base_setting": {"overlap_share": 0.15, "spillover": 0.08, "shape": "linear"},
  "designs": {
    "user_ab": "Exactly half the users treated at random. Difference in means; Welch standard error and degrees of freedom.",
    "group": "Exactly half the first groups treated at random; every user takes the assignment of their first group, so a user in two groups follows the first. Difference in user means; standard error clustered by first group (each arm's squared cluster sums of deviations, times G/(G-1), over the arm's users squared); G minus 2 degrees of freedom.",
    "graph_cluster": "Groups are first clustered by the partition below, then exactly half the clusters treated at random; every user takes the assignment of their first group's cluster. Same estimator, clustered by cluster.",
    "exposure_model": "The user_ab assignment and outcomes, analysed with least squares of the outcome on own treatment and the share of group-mates treated. Global effect estimate: the two coefficients summed; spillover estimate: the share coefficient. Standard errors clustered by first group, G minus 3 degrees of freedom."
  },
  "partition": {
    "method": "Greedy capped merge. Each user in two groups links their two groups. Links between the same two groups add up. Links are taken heaviest first, ties by the lower then the higher group number; two clusters merge when the merged cluster holds at most 60 users counted by first group. Every group starts as its own cluster.",
    "cap_users": 60,
    "uses_ring_order": "only through ties: links of equal weight are taken in group-number order, which is ring order"
  },
  "intervals": "95% Student t intervals from each design's estimate, standard error and degrees of freedom.",
  "metrics": "Per setting and design: mean estimate, share of the global effect measured (mean estimate over the global effect), gap (mean estimate minus the global effect) with a Student t Monte Carlo interval, standard deviation of the estimates across populations, mean reported standard error, coverage of the global effect, rejection of zero (power with an effect, false wins without), and the ship rule's ship, stop and keep-testing rates; Wilson intervals for rates. Exposure model only: the same for its spillover estimate against the spillover parameter.",
  "rule": {
    "source": "The study's ship, stop or keep-testing rule, vendor/readout_rule/decision.py, called unchanged: posterior() then terminal_action().",
    "utility": "1,000 x estimate: extra active days per 1,000 users per week; standard error scaled the same; no charge.",
    "prior_sd": 500,
    "meaningful_utility": 100,
    "ship": "P(utility > 100) >= 0.95 and expected shipping loss <= 25",
    "stop": "P(utility > 100) <= 0.05 and expected stopping loss <= 25",
    "checks_not_applied": "The rule's two evidence checks count rides served by another driver and rides matched across regions. A user graph has no counterpart, so only the estimate layer is applied, as the decision run's estimate-only layer.",
    "scoring": "A ship is right when the global utility is above 100 and wrong at or below it; a stop is wrong above it."
  },
  "checks": {
    "census": "18 settings x 500 populations x 4 designs = 36,000 rows; every estimate, standard error and degrees of freedom finite.",
    "truth_bookkeeping": "The global effect computed by setting everyone treated and no one treated equals direct + spillover in every population. Confirms the code path, not a finding.",
    "no_effect": "In every no-effect setting each design's false-win rate is at most 0.05 + 4 x sqrt(0.05 x 0.95 / 500) + 0.02, the main run's tolerance.",
    "no_spillover": "In every linear setting with spillover 0 and an effect, each design's mean gap is within 4 Monte Carlo standard errors plus 0.001 days.",
    "reported_either_way": "A failed check is reported and kept; no outcome is rerun with other random draws."
  },
  "outputs": ["groups.json", "groups-runs.csv", "groups-populations.csv"],
  "frozen_sha256": {
    "vendor/readout_rule/decision.py": "d385cbbedddf605ffc00a59de9fc547ff7f641db2c1f4f6699811fc805fab43a",
    "data/protocol.json": "07bb54ed1ab973adc7ce79d32d0abfc5f49c28df3e3dbb20b69a014ec9ad73be",
    "data/decision-protocol.json": "94e7fd25bc3087ed07fdd84898e3bcf90416602fcca8a674e31f97c91aed41b4",
    "results.json": "c1f085fd7de02bc02adaed497225fd8c8513ff4d8bd3c041d09f78d7f9900e5e",
    "scenarios.csv": "86e6683f683b9d36435b6dec46084701cdaff56a565bfff0143fe937ab3a6aa0",
    "sensitivity.json": "744b26854cb67df63b5af161bfaaf5f7250cc71a5dc42c2a9ff6d7f64be43aa7",
    "sensitivity-ar1.csv": "446c7db26584bd0e3b621cafa94602047c3c8ee969762b8cf551a2fd11d18623",
    "sensitivity-blocks.csv": "e5a39e0280d869add9ba3af5fa558c1e50ecbfaf14d6d3a069fc88ee86080136",
    "decision.json": "3f1859995ee633c6a62b864b0defdad06ee272e73bdc510e7bccf735a3eb4bbe",
    "decision-runs.csv": "09c5fd8cea17a544c62ee3fac75c6f0410885f50ded52f49dfc85b4a59170d1c",
    "sequential.json": "3943519b57e1afdbd304d92f4fdf402cbd60b2537104cf5195152761dd3b7bb5",
    "sequential-runs.csv": "bd64b8c9c248774096eb5304fd718e83c3c61de91387ea2c679030aedb71d9ae",
    "looks.csv.gz": "60abcc2701265caae4fcf1ae965aafe525dc29607d1e86d9e6f6727053cc49cc",
    "carryover-sweep.json": "9a4d127767c8a81dca7c820e9c7375040e358f8b812c504e5c214630a0b1e160",
    "carryover-sweep.csv": "ee8a10be33cf6cc397aff390ab80842f879284b496b37fe739d52bf26f3f0f10"
  },
  "predictions": [
    {"id": "user_ab", "design": "user_ab", "setting": "base",
     "parts": ["measures 45% to 55% of the global effect",
               "its interval covers the global effect in under 10% of populations",
               "the rule ships in under 5% of populations"]},
    {"id": "group", "design": "group", "setting": "base",
     "parts": ["measures 80% to 95% of the global effect",
               "its spread (SD of estimates) is 1.2 to 1.6 times the user A/B's",
               "the rule ships in 40% to 80% of populations"]},
    {"id": "graph_cluster", "design": "graph_cluster", "setting": "base, plus overlap 0.30 at spillover 0.08",
     "parts": ["its gap from the global effect is at most two thirds of the group design's gap",
               "its spread is 0.95 to 1.25 times the group design's",
               "at overlap 0.30 it still measures at least 90% of the global effect"]},
    {"id": "exposure_model", "design": "exposure_model", "setting": "every linear setting with an effect, the base, and threshold at spillover 0.08",
     "parts": ["mean estimate within 5% of the global effect in every linear setting with an effect",
               "coverage of the global effect at least 90% in every linear setting with an effect",
               "its spread is 1.5 to 3 times the user A/B's at the base setting",
               "under the threshold shape at spillover 0.08 it misses the global effect by more than 10%, either way"]}
  ],
  "prediction_scoring": "Each part is scored true or false from groups.json after the run; a prediction holds only when every part holds. Misses are reported beside hits.",
  "outcomes_collected_at_declaration": false
}
