# Week 7 lab: team exposure and communication costs

## Question and learning objectives

How does a team intervention affect recipients, untreated peers and joint production? You will build a directed exposure map, reconstruct the actual randomization support, estimate complete exposure-state means, distinguish two enumeration exercises and design an intervention that records helper costs as well as benefits.

Mas–Moretti anchors directional exposure, Weidmann–Deming repeated team composition, and Battiston et al. communication opportunity costs. The invented two-stage experiment is motivated by these questions and the Baird et al./Aronow–Samii design readings. It does not reproduce any paper's experimental protocol, participants or empirical results.

## Setup and provenance

From the lab root:

```bash
ENV_NAME=research bash smoke.sh
```

The route is **original synthetic design reconstruction**, with `empirical_replication: false` and marker **`SYNTHETIC_TEACHING_CONSTRUCTION_NOT_PUBLISHED_REPLICATION`**. Actual original archive files/licenses were not inspected here; original data and code were not downloaded or executed. Optional empirical replication remains separate.

The numerical script uses only the standard library and refuses nonempty output paths with exit code 2. The wrapper stages fresh output, preserves authored notes and refuses modified generated targets. Smoke compiles the code, executes fresh runs, checks saved numbers and verifies nonmutation on refusal. It never requires a favorable estimate or significant p-value.

## Reproduce: the assignment and exposure ledgers

### Fixed membership and directed edges

Open `data/teaching/membership.csv`, `baseline_directed_edges.csv` and `teaching-schema.csv`. Sixteen workers belong to four fixed teams of four. The graph has 48 directed within-team nonself edges. **Row receiver $i$ is affected by source column $j$**; all three peers receive weight $1/3$. The graph is fixed before assignment. No cross-team spillovers, attrition or noncompliance occur in this stated teaching environment; those assumptions need separate evidence in a real workplace.

Baseline scores and potential-outcome primitives are generated before the independently seeded assignment. All sixteen baseline/post scores are observed. The score is a comparable contribution and team output is additive in this DGP only. Keep unique team records in `team_outcomes.csv`; do not confuse this additive score construction with a project score copied onto every member's row.

Draw membership and interaction ledgers separately. Define why an edge represents possible influence, not a reporting line or necessarily realized help. Explain how a graph would change if contacts crossed teams, attendance responded to treatment or the intervention created new links.

### Reconstruct both stages of randomization

Stage 1 chooses exactly two of four teams for high saturation. Stage 2 chooses three of four recipients in each high team and one of four in each low team. There are

```{math}
\binom42\binom43^2\binom41^2=6\times4^4=1536
```

equally likely allocations. An unrestricted eight-of-sixteen shuffle would create 12,870 allocations, including impossible within-team recipient counts. Reconstruct the permitted set before inference.

Let $d$ denote own aid and $s$ saturation. With $K_L=1$ and $K_H=3$, peer share is $(K_s-d)/3$. Verify each worker's unconditional inclusion probability, not only aggregate counts:

| Complete state | Peer share | Assignment probability | Observed count in every allocation |
|---|---:|---:|---:|
| $(0,L)$ | $1/3$ | $3/8$ | 6 |
| $(1,L)$ | $0$ | $1/8$ | 2 |
| $(0,H)$ | $1$ | $1/8$ | 2 |
| $(1,H)$ | $2/3$ | $3/8$ | 6 |

The state includes both own assignment and peer exposure; $(d,s)$ is an equivalent label under this fixed-count design. A peer-only state cannot ignore a direct effect. There is **no identical peer-share value supported for both own-treatment states**.

### Estimate complete exposure-state means

Using only `observed_workers.csv` and the known protocol, estimate each state mean by

```{math}
\widehat\mu(d,s)=\frac1{16}\sum_i
\frac{\mathbf1\{(D_i,S_i)=(d,s)\}\Delta Y_i}{p_i(d,s)}.
```

Reproduce `output/reproduced/exposure_state_means.csv`. Each HT estimate equals its observed cell mean here because probabilities and cell sizes are fixed uniformly across workers. This equality is a design-specific identity, not a generic property of interference estimators.

Then distinguish these targets in `estimates.json`:

1. **Untreated-peer spillover:** $\mu(0,H)-\mu(0,L)$ changes peer share from one-third to one at own treatment zero.
2. **Within-saturation recipient contrast:** $\mu(1,s)-\mu(0,s)$ changes own treatment and peer exposure. It is not a nonparametric direct effect holding peers fixed.
3. **High-minus-low policy:** $[0.75\mu(1,H)+0.25\mu(0,H)]-[0.25\mu(1,L)+0.75\mu(0,L)]$. Verify that its estimate equals the mean high-team score change minus the mean low-team change. It is not the policy of treating everyone versus nobody.

The instructor response model is $b_i+\tau_i d+\gamma_i e$. Under that additional model, the within-saturation target is $\bar\tau-\bar\gamma/3$, the untreated spillover is $2\bar\gamma/3$, and the policy target is $(\bar\tau+\bar\gamma)/2$. Those identities explain the simulation; they do not identify an unsupported fixed-peer direct contrast nonparametrically.

There is also an instructive exception: in this symmetric mixture of one- and three-recipient teams, average peer exposure conditional on own treatment is one-half for either own-treatment state. The pooled own-treatment contrast therefore equals $\bar\tau$ **in design expectation under the additive DGP**. Its realized value remains noisy. Do not turn the mixed within-saturation comparison into a claim that every pooled contrast is inherently biased.

## Diagnose: two different enumeration exercises

### A. Global Fisher sharp-null reference

Hold the observed sixteen outcome changes fixed. For every legal allocation, recompute the high-minus-low team statistic; inspect `sharp_null_reference.csv`. The two-sided p-value counts absolute reference statistics at least as large as observed, including equality. Exhaustive enumeration needs no Monte Carlo correction.

The null is **global**: every worker's outcome is invariant to every permitted allocation. It is not zero spillovers with unrestricted direct effects, and it is not a weak-null confidence interval. The statistic depends only on which two teams are high. There are six such selections, each repeated 256 times by within-team lotteries. Only four teams were observed; 1,536 legal assignments are not 1,536 independent teams. The two-sided reference is correspondingly coarse, with minimum attainable p-value one-third. More computational enumeration cannot remove this design limit.

### B. Instructor-only potential-outcome audit

In a separate calculation, change each worker's outcome under each alternate assignment. `data/instructor_only/recomputed_potential_outcome_distribution.csv` saves the resulting policy statistic and four HT state estimates. `truth_audit.json` verifies that each mean HT estimate equals its finite-population state mean and that the mean policy estimate equals 2.725.

The known own-effect mean is 2.3 and peer slope 3.15; the mixed recipient target is 1.25 and untreated spillover target 2.1. These are invented parameters, not empirical results. The oracle distribution's variance uses every invented potential outcome. It is **not an estimated sampling variance or real-data standard error**. Do not put latent primitives, oracle estimates or future outcome information into learner predictors.

## Additional original diagnostics

Use `output/diagnose/design_diagnostics.json` and the saved CSVs to reproduce the following calculations. State the assumption behind each numerical answer.

| Diagnostic | Calculation | Interpretation limit |
|---|---|---|
| Complete-group reflection | Demeaned leave-one-out output equals minus own deviation divided by three; with nonzero within-group variation, regression of own output on peer mean returns −3 | Mechanical identity, not a discovered peer response; constant outcomes make the slope undefined |
| Directed exposure | A source at the middle of a three-node chain affects a different receiver if the matrix is transposed | Document receiver/source orientation |
| Overlap weighting | $(10\times8+20\times2)/30=4$ versus unweighted mean 5 | Choose weights for a specified influence process; zero overlap is undefined |
| Role assignment | Bottleneck teams AB+CD produce 17 versus AC+DB producing 14 | Fixed skills, effort and labor input; no universal composition rule |
| Shared rewards | $a/(nc)=1$ versus planner effort $a/c=4$, with $a=8,n=4,c=2$ | Specified equal-share quadratic-cost example, not the full Holmström model |
| Communication | $12\log(1+m)-2m-m^2/2$ peaks at $m=2$, value about 7.18 | Invented units and costs, not an estimated meeting-time rule |
| Helping | Sender −5 plus recipient +8 equals joint +3 | Add only comparable units; record time, quality and future learning too |
| Digital capture | Online 10→30, offline 30→0: recorded +20 but total −10 | Capture change can mimic network change |
| Objective choice | $(2,2,10)$ has lower mean but higher maximum than $(6,6,6)$ | Ranking depends on whether the objective uses every idea or one best idea |
| Joint-outcome duplication | One project score 20 copied to four workers is still one score | Summing to 80 invents production and independence |
| Fixed pair identification | Adding 7 to one contribution and subtracting 7 from its fixed partner preserves the pair sum | One fixed pair cannot identify both contributions separately |

The communication curve is saved in `communication_curve.csv`; sender/recipient accounting in `benefits_and_costs.csv`; exposure support in `exposure_support.csv`. The chapter plots these inputs. Preserve the synthetic captions and assumptions when using them in a memo.

## Transfer: a spillover-aware proposal

Complete `transfer-memo-template.md`: two pages plus an exposure map. Choose a lateral help channel, task-aid rollout, collaboration schedule, role rule or code-review intervention. Define planned and realized membership, directed workflow/interaction boundaries, actual assignment unit, complete exposure states and supported contrasts.

Specify two competing mechanisms and a discriminating prediction. Include unique joint output, individual outcomes, independent quality, sender costs, person-time and worker welfare. Record take-up, missing outcomes and cross-team help. If treatment changes the graph, distinguish a fixed-baseline-graph estimand from the broader policy effect.

An inference plan that says only “cluster the standard errors” is incomplete. State why the comparison identifies the desired target, which dependence the variance procedure addresses and what remains unresolved by it. Dyadic or clustered uncertainty cannot solve reflection, endogenous relationships or a wrong exposure map. Do not estimate and validate a team-player score using the same task outcomes; use independent rounds/tasks where appropriate.

Public archive pointers are starting points, not completed original-data access. No provider contact or restricted-data application is required. State one claim the proposed design cannot establish, including a mechanism or welfare conclusion beyond the available data.

## Submission

Submit the directed map and schema, legal assignment support/probabilities, HT state means and three contrast interpretations, the global-null explanation, the separate truth-audit explanation, short diagnostic calculations and the two-page proposal. Include commands, seed and any modifications in a run log. Label all synthetic outputs; do not supply an oracle standard error as if it were available from real observations.
