Skip to content
tezvyn:

Describe cluster or switchback randomization for network-effect A/B tests.

Source: statsig.comMediumHow cards are made

Describe cluster or switchback randomization for network-effect A/B tests.

Tests SUTVA violation, cluster-switchback tradeoffs. Outline: cluster (geo, teams) or switchback (time slices) isolation; cover pipeline changes, 10x inflation, and correlated error. Red flag: user-level randomization with post-hoc fixes or ignoring spillover.

What's really being asked

This question evaluates whether you understand that the Stable Unit Treatment Value Assumption is violated when users interact, making standard A/B tests biased. It tests your ability to design valid alternatives and anticipate the real engineering costs of moving away from user-level assignment.

The full answer

A strong response starts by naming two viable strategies. First is cluster randomization, where you assign treatment at the level of geography, workplace, organization, or social cluster so that spillover stays within the treated group. Second is switchback testing, where you alternate treatment and control across time windows for the same population, using time as the unit of randomization. Then it details engineering challenges. The routing layer must change from user-scoped to cluster-scoped or time-scoped bucketing, which breaks existing SDK assumptions. Power drops sharply because you have far fewer independent units, often inflating required sample size by one to two orders of magnitude. You must handle correlated standard errors because observations within a cluster or time window are not independent, requiring clustered standard errors or mixed-effects models. Operationally, switchback demands idempotent feature toggling and cache warming to handle rapid flips, while cluster randomization requires stable cluster definitions and handling edge cases where users move between clusters.

The mistakes people make

The biggest red flag is suggesting user-level randomization with post-hoc regression adjustments for network exposure, which does not recover valid causal estimates under interference. Another failure mode is proposing graph-cluster randomization without acknowledging the engineering cost of computing and maintaining dynamic social clusters at query time. Candidates also stumble by ignoring the power implications, treating a shift from millions of users to hundreds of clusters as a minor statistical detail.

What usually comes next

An interviewer might ask how you would choose between cluster and switchback given your product structure, or how you would detect network effects before committing to a complex design. They may probe how you handle carryover effects in switchback experiments, or ask how you analyze results when you have only dozens of clusters but millions of observations. Be ready to discuss variance estimation under few clusters and whether bootstrap or permutation methods are appropriate.

A concrete example

Consider a workplace collaboration tool where teams chat in shared channels. If you randomize at the user level, a treated user posting more messages floods control teammates with notifications, contaminating the control experience. Instead, you cluster randomize at the team level. The engineering team must refactor the experiment assignment service to accept a team ID rather than a user ID, update the data pipeline to emit team-level exposure logs, and accept that with five thousand teams you need a six-month run instead of a one-week run to reach equivalent power. Alternatively, a ride-hailing marketplace could use switchback testing, turning a new pricing algorithm on for two-hour windows and off for the next two. Engineers must ensure the pricing service can switch rapidly without cold-start latency, and analysts must model day-of-week seasonality to avoid confounding.

Interview question

When moving from user-level to cluster-level randomization to handle network effects, what is the primary statistical consequence that most sharply increases experiment cost?

  • a.The inability to use mixed-effects models for correlated errors
  • b.The need to rewrite the routing layer to use cluster IDs instead of user IDs
  • c.The requirement to warm caches every time the treatment assignment flips
  • d.A dramatic drop in statistical power due to far fewer independent units, often requiring 10x more observationsCorrect
Why?

Cluster randomization replaces millions of users with far fewer independent clusters, which massively inflates variance and required sample size. Rewriting the routing layer is an engineering burden, while cache warming applies specifically to switchback designs, not clustering.

Just read this? Test yourself on what you have been reading.

Read the original → statsig.com

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on growth — each one lists the topics its interview covers.

See open roles