A metric is a complete counting rule, including population, numerator, denominator, window and missing-data treatment.
Experiment metrics: denominators, guardrails and missing outcomes
Specify the primary outcome
For seven-day learning progress, use assigned eligible learners as the denominator and learners with at least one qualifying completion as the numerator. If treatment changes feed rendering, using exposed learners in the denominator can hide a failure. State whether multiple completions affect the metric or only the first one. The estimand chooses the correct population.
Add protective metrics
Track page load failures, empty slates, withdrawal requests and serious latency regressions as guardrails. A higher completion rate does not justify shipping if the feed begins failing for a subgroup. Guardrails need thresholds and owners before launch. A missing metric should stop a decision, not appear as zero harm. Segment results by device and new versus returning learners.
Treat ratios with care
A click-through ratio can change when the treatment alters the number of displayed lessons, even if learner behavior does not. Define whether clicks are counted per assigned learner, per rendered feed or per displayed item. Report both numerator and denominator by arm so a change in opportunity is visible. Aggregating event-level ratios can overweight highly active learners.
Check an example
Control assigns 47 learners and 19 complete a lesson; treatment assigns 49 and 23 complete. The raw rates are about 40.4 and 46.9 percent. Now suppose eight treatment learners never receive a feed. Keeping them in the assigned denominator reflects the release experience; excluding them creates an exposure-conditioned result with a different meaning.
Implementation
def completion_rate(assigned_ids, completed_ids):
assigned = set(assigned_ids)
if not assigned:
return None
return len(assigned & set(completed_ids)) / len(assigned)Performance and operating cost
Set-based counting costs O(A + C) expected time and space for A assigned and C completed IDs. Warehouse implementations should deduplicate event IDs and learner IDs before aggregation, then preserve numerator and denominator in the result packet.
Common Mistakes
- Do not switch denominators after seeing a favorable result.
- Do not interpret missing guardrail telemetry as zero incidents.
- Do not average per-event ratios when the estimand is per learner.
Read next
- Experiment contract: decision, estimand and assignment unit
- Experiment analysis: repeated looks, precision and pre-period covariates
- Experiment rollout: ramp gates, rollback and a reviewable decision
- Confidence intervals: interpret coverage and precision honestly
Continue the workflow: Instrumentation changes and metric guardrails for product analysis.
