Pricing Optimization & Marketplace Economics
The boundary: bandits and reinforcement learning have their own lessons (Multi-Armed Bandits & Exploration, Contextual Bandits for Personalization, Off-Policy Evaluation & Offline RL, RL in Production: Safe Exploration & Serving); here we cover the economics, the estimation and the optimization layer that those learners sit on top of, and where they plug in. Experiment mechanics (power, SRM, CUPED) are A/B Testing & Online Experimentation, and switchbacks, geo tests and marketplace interference are Advanced Experimentation: Interference, Marketplaces & Platforms; this lesson says what to randomize for prices and links back. Identification tools (instruments, DiD) come from Causal Inference Basics, and double machine learning with continuous treatments from Uplift Modeling & Heterogeneous Treatment Effects. Demand forecasting belongs to Forecasting at Scale: Global, Probabilistic & Hierarchical Models, and long-run customer value to Product Analytics, Metrics & LTV. The end-to-end design lesson, Case Study: Dynamic Pricing for a Marketplace, is forthcoming.
Interviews ask this as "how would you estimate price elasticity from our transaction logs?", "should we maximize revenue or profit?", "design surge pricing for a ride-hailing app", "how do you match couriers to orders?", "what does a dual value mean?" and "is personalized pricing a good idea?". The senior answer names the objective first (profit under constraints, not revenue), identifies where the price variation in the data came from, separates own from cross effects, and puts the constraints into an optimizer whose duals tell the business what each constraint costs.
Everything executable below was run (Python 3.12, NumPy 2.5, SciPy 1.18 with the HiGHS solver, pandas 2.3, statsmodels 0.15, fixed seeds) on simulated data with a known truth, or by hand, and is marked "(verified)". Facts recalled from the literature without re-running (Littlewood's rule, EMSR, Gale-Shapley, regulatory rules, DML) are marked "(from memory)". PuLP and OR-Tools were not installed, so those snippets are sketches, not run. Simulated numbers show mechanics and relative sizes, not the behaviour of any real retailer or marketplace.