Discuss the application of mixed models in A/B testing when dealing with hierarchical or nested data structures.

Instruction: Illustrate your answer with an example.

Context: This question examines the candidate's knowledge of complex data structures and their ability to apply mixed models to account for hierarchical data in A/B testing.

Updated

Official answer

Suppose organizations are randomized to a feature and repeated user outcomes are recorded within each organization. Those observations are not independent assignments. A linear mixed model for a suitable continuous outcome might be Y_ij = α + τ T_j + γ X_ij + b_j + ε_ij, with an organization random intercept b_j and appropriately modeled residual dependence.

The fixed treatment coefficient describes the modeled contrast. A random intercept allows baseline levels to differ across organizations; it does not by itself allow the treatment effect to vary. Treatment interactions or a supported random-slope structure address different questions and need enough independent information.

Match the model to outcome type, assignment, sampling and repeated measurements. Check assumptions, fit diagnostics, singular fits and sensitivity to the covariance structure. A logistic mixed model uses a different outcome/link and has a conditional interpretation.

With few assignment clusters, many user rows do not create many independent experimental units. Use small-sample corrections or design-appropriate randomization inference where justified, and compare with transparent cluster-level summaries. Mixed models can represent dependence; they do not rescue confounded assignment or guarantee accurate intervals merely by including a random effect.

Reference: lme4 model formulation.

Related Questions