InterviewStack.io LogoInterviewStack.io

Multi Armed Bandits and Experimentation Questions

Covers adaptive experimentation methods that trade off exploration and exploitation to optimize sequential decision making, and how they compare to traditional A B testing. Core concepts include the exploration versus exploitation dilemma, regret minimization, reward modeling, and handling delayed or noisy feedback. Familiar algorithms and families to understand are epsilon greedy, Upper Confidence Bound, Thompson sampling, and contextual bandit extensions that incorporate features or user context. Practical considerations include when to choose bandit approaches versus fixed randomized experiments, designing reward signals and metrics, dealing with non stationary environments and concept drift, safety and business constraints on exploration, offline evaluation and simulation, hyperparameter selection and tuning, deployment patterns for online learning, and reporting and interpretability of adaptive experiments. Applications include personalization, recommendation systems, online testing, dynamic pricing, and resource allocation.

MediumTechnical
67 practiced
Implement the LinUCB contextual bandit algorithm in Python for real-valued rewards. API: LinUCB(num_arms, d, alpha) with select_arm(context_vector) and update(arm, reward, context_vector). Use per-arm matrices A and vectors b and compute p = theta^T x + alpha * sqrt(x^T A^{-1} x). Describe numerical-stability choices.
HardTechnical
33 practiced
Adaptive allocation complicates statistical inference. Describe approaches that yield valid inference under adaptive sampling: martingale-based sequential tests, e-values, and permutation/bootstrap variants that account for adaptivity. Provide a practical recipe to compute p-values or credible intervals for an adaptive experiment.
MediumTechnical
45 practiced
Design a simulation framework to test and compare bandit algorithms for a recommendation system. Describe how you would model user heterogeneity, contexts, reward noise, delayed conversions, and non-stationarity. What metrics, visualizations, and experiment controls would you provide to researchers and engineers?
MediumTechnical
42 practiced
Implement a bootstrap-based exploration method for contextual bandits (bootstrapped Thompson). Build a Python routine that maintains an ensemble of online regressors, uses bootstrap resampling or Poisson weights for updates, and selects arms by sampling one model per decision. Explain trade-offs compared to Bayesian Thompson sampling.
MediumTechnical
34 practiced
Implement UCB1 for a K-armed bandit with rewards in [0,1] in Python. Provide a class with select_arm() and update(arm, reward), initialize by pulling each arm once, and simulate T=500 steps on arms with means [0.1, 0.4, 0.8]. Be careful to avoid log(0) when computing bonuses.

Unlock Full Question Bank

Get access to hundreds of Multi Armed Bandits and Experimentation interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.