KatInterview

Measuring Treatment Effect from Experiment and Event Data

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsexperimentationcausal-inferenceconfidence-intervals

Last updated

Define a user-level outcome from experiment assignment and event logs, then estimate the average treatment effect with a confidence interval.

You have two data sources:

  1. Assignment log: Each row contains a user identifier, the timestamp when they entered the experiment, and whether they were assigned to treatment or control.
  2. Event log: Each row contains a user identifier, a timestamp, and a measured value (for example, session duration, revenue, or engagement score).

Your task is to estimate the causal effect of the treatment. Specifically:

  • Define a user-level outcome metric derived from the event log.
  • Explain how you would construct the analysis dataset by joining these sources.
  • Describe how to estimate the treatment effect as a difference in means and construct a confidence interval.
  • Explain the relationship between the confidence interval and a hypothesis test for the treatment effect.

This is a conceptual and statistical design question. You are not required to write queries, but you should be explicit about metric definitions, time windows, handling of missing data, and inference assumptions.

Hints

Hint 1

Define the outcome relative to each user's entry time, not using absolute calendar dates, so treatment and control are comparable.

Hint 2

Aggregation should happen at the user level—one row per user—before computing the difference in means.

Hint 3

A 95% confidence interval that excludes zero corresponds to rejecting the null hypothesis at the 5% significance level.