advanced25 min studyLesson 852 in Engineering

Keep eligibility, assignment, and actual intervention separate

Design a joinable exposure ledger without conditioning causal estimates on treatment-created activity.

On this page

What you’ll understand

  • Distinguish eligibility, assignment, intervention, and outcome events.
  • Explain exposure-conditioned selection bias.
  • Specify IDs, timestamps, versions, and deduplication for causal lineage.

A unit can qualify for an experiment, receive an assignment, and still never encounter the changed model. Perhaps it leaves before the feature loads, receives a fallback response, or never reaches the relevant workflow. Those are different events and should not be collapsed into one ambiguous exposure count. Log enough information to reconstruct what was assigned and what actually happened. Then choose an analysis population deliberately: an accurate record that somebody saw treatment does not automatically make comparison among observed exposed users a randomized causal estimate.

Define the intervention boundary

Eligibility describes whether a unit satisfies the enrollment rule. Assignment records its randomized arm. Exposure or intervention records the point where the changed decision could affect the unit, and outcomes record subsequent behavior under a declared window. A model being selected in a configuration lookup is not necessarily the model response displayed to the user. Server errors, fallback paths, caches, and client rendering can separate selection from delivery, so choose the boundary that matches the hypothesis.

An exposure ledger should carry the experiment and configuration IDs, randomization-unit ID, assigned arm, actual model artifact or fallback identity, event ID, event timestamp, and relevant request/session linkage. Deduplicate retries by logical event identity and preserve both event and ingestion time. A many-to-many join from outcomes to repeated exposure rows can inflate numerators. Reconcile assignment and exposure funnels by arm before interpreting lift, including dropped or malformed events.

Nassigned,a≥Nexposed,a≥0,rexposure,a=Nexposed,aNassigned,aN_{\rm assigned,a}\ge N_{\rm exposed,a}\ge0,\qquad r_{\rm exposure,a}=\frac{N_{\rm exposed,a}}{N_{\rm assigned,a}}
Counts refer to distinct units within one fixed cohort and arm a, each assigned once, with exposed units a subset of assigned units. The denominator must be positive. These are coverage diagnostics; differing exposure rates alone do not identify their cause.↔ Scroll wide equations horizontally.

Conditioning on actual exposure can break randomization

If treatment changes whether a unit reaches or completes the exposure event, exposed treatment and exposed control units need not be comparable. A faster model might retain additional marginal users who would have left under control. Comparing only the users who remained changes the composition in a treatment-dependent way. The assignment-based intention-to-treat comparison includes that reach effect, whereas the exposed-only difference can have another sign without any contradiction.

A triggered analysis can improve sensitivity when the trigger is a valid pre-intervention condition defined comparably in both arms. Counterfactual logging in control can record whether a request would have qualified for a treatment feature, as Microsoft’s experimentation guidance discusses. This requires correct symmetric logic and a defensible trigger; merely inventing a control exposure row does not remove selection bias. Keep the assignment-based result and check trigger coverage rather than discarding unaffected users opportunistically.

ΔITT=E[Y∣Z=1]−E[Y∣Z=0],Δexposed=E[Y∣Z=1,E=1]−E[Y∣Z=0,E=1]\Delta_{\rm ITT}=\mathbb E[Y\mid Z=1]-\mathbb E[Y\mid Z=0],\qquad \Delta_{\rm exposed}=\mathbb E[Y\mid Z=1,E=1]-\mathbb E[Y\mid Z=0,E=1]
Z is randomized assignment, E actual observed exposure, and Y a consistently measured outcome. Each displayed conditional population must have positive probability. ITT has an assignment-effect interpretation under design assumptions. Exposed-only conditioning generally lacks that interpretation if E depends on treatment or treatment-affected behavior.↔ Scroll wide equations horizontally.

Log missingness as evidence, not a silent filter

A missing exposure record can mean no intervention, instrumentation loss, or an unjoined identifier. Preserve a reason or diagnostic pathway rather than automatically treating every missing record as an unexposed unit. Compare source counts, join coverage, event lag, and fallback identity by arm. If the changed model crashes before emitting its own log, using only successful response logs systematically removes precisely the failures the experiment should measure.

Freeze the event schema and attribution rules with the experiment definition. Changes to logging logic during a run create analysis epochs that need investigation rather than automatic concatenation. A mature pipeline can reproduce a unit’s assignment, qualifying trigger, actual serving version, and attributed outcome from durable IDs. This makes a surprising result debuggable: the team can ask whether behavior changed, delivery changed, or the observation process changed instead of treating every dashboard difference as model quality.

A reach effect reverses an exposed-only comparison

Each arm has 100 assigned users. Treatment exposes 80 and has 24 total users with the defined feature-success outcome; control exposes 50 and has 20 successes. In this toy, feature success cannot occur without exposure, and all assigned outcomes are measured.

  1. Exposure coverage is 80/100=0.8 in treatment and 50/100=0.5 in control. The unequal funnels may be part of the treatment’s effect or a measurement issue; the counts alone do not decide which.

  2. Among exposed users, observed success rates are 24/80=0.30 and 20/50=0.40, giving an exposed-only difference of −0.10. This conditioning selects different post-assignment populations.

  3. Across the randomized assigned cohorts, rates are 24/100=0.24 and 20/100=0.20, giving an ITT difference of +0.04. The expanded reach and lower exposed-user rate can coexist; only the appropriate design assumptions support a causal interpretation.

The result

The same valid ledger yields −10 percentage points exposed-only and +4 percentage points assignment-based. The choice of population changes the question.

Explore the model

Interactive lab

Interactive lab · probability

A delivery funnel has an explicit denominator

Reset, set Success probability p to 0.8 and Trials n to 10. Predict exposed-count mean 8 and variance 1.6 before Step. Reset, set p to 0.5 and n to 10; predict mean 5 and variance 2.5 before Step. Playback highlights exact independent binomial outcomes, not observed exposure logs. This toy cannot distinguish treatment-induced reach from missing telemetry.

A delivery funnel has an explicit denominatorThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forCoverage counts need a defined assigned denominator; probability arithmetic does not establish a causal mechanism.

Check your understanding

Why can exposed-only comparison lose the original randomized interpretation?

Try it yourself

An arm has 200 distinct assigned units and 120 distinct exposed units. Its raw ledger has 180 exposure rows because some requests retried. Find distinct-unit exposure coverage and explain why 180/200 is the wrong unit-level ratio.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

The coverage numerator must count units, not event rows.

Compare with the solution

Distinct-unit coverage is 120/200=0.60. The row ratio 180/200=0.90 mixes repeated events with a unit denominator and overstates the population exposed. Event counts can be useful for another metric, but they must be deduplicated and aggregated under the declared unit-level definition before describing reach.

Take it with you

  • Eligibility, assignment, intervention, and outcomes are distinct events.
  • Accurate exposure logs do not remove post-treatment selection bias.
  • Stable IDs, deduplication, version linkage, and symmetric triggers make results reproducible.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.