How does Thompson sampling work?
mediumAnswer
- For each arm, maintain posterior over its reward.
- To choose an action, draw ~ for each arm, pick arm with highest sampled .
- Randomness is 'baked in' via sampling → automatic exploration-exploitation tradeoff.
- Optimal frequentist regret bounds (Bayesian and worst-case).
- Standard in online experimentation, recommender systems, contextual bandits.
- Bayes / Beta-Bernoulli conjugate makes update O(1) per pull.
Check yourself — multiple choice
- Random
- Draw from each arm's posterior, pick argmax; automatic exploration/exploitation; optimal regret bounds; standard in bandits / online experimentation
- Same as UCB
- Not real
Thompson sampling: sample from posterior, pick argmax; optimal regret.
#bayesian#estimation
Practise Statistics Fundamentals
215 interview questions in this topic.