MLCrack

    EXPERIMENTATION & A/B TESTING · INTERVIEW QUESTION

    What is sample ratio mismatch?

    🟢 beginner · A/B Testing

    Hint: Focus on the decision rule, assumptions, and failure mode behind a/b testing.

    Answer

    SRM occurs when observed traffic allocation differs from expected allocation. It often indicates instrumentation, assignment, filtering, or logging bugs.

    Interview reasoning

    Observed allocation inconsistent with the planned ratio can indicate assignment, eligibility, or logging problems. Diagnose the pipeline before interpreting lift.

    Validate assignment, exposure, logging and metric joins as a funnel. Sample-ratio mismatch identifies counts inconsistent with allocation but does not explain why. Treatment-specific event loss or identifier changes can bias outcomes even if one top-level count looks balanced, so inspect completeness at every relevant stage.

    Worked example. Counts 5,500 versus 4,500 under a planned 50/50 allocation produce chi-square 100.

    Validation

    Test assignment and exposure counts by platform, time, and cohort.

    Reconcile events with authoritative assignments, audit missingness by variant, and stop effect interpretation until instrumentation faults are resolved.

    Common pitfalls

    An SRM p-value identifies an integrity concern, not its cause.

    Reweighting to expected proportions does not repair outcome-dependent missingness. Balanced counts alone do not prove accurate metric logging.

    Likely follow-up: Test assignment and exposure counts by platform, time, and cohort.