Choose between learning an effect and allocating reward
Separate cumulative-reward objectives, changing propensities, nonstationary mixtures, and valid adaptive inference.
On this page
The question for today
What you’ll understand
- Distinguish regret minimization from a fixed treatment-effect comparison.
- Log conditional action probabilities under adaptation.
- Explain why raw arm means can compare different time/context mixtures.
A fixed experiment typically sacrifices some short-term reward to obtain an interpretable comparison. A bandit reallocates decisions toward promising actions while continuing some form of exploration. Both can learn, but they optimize different objectives and produce different data. Under adaptation, an action’s sample size and the contexts or times at which it is chosen depend on earlier information. Treating those logs as a fixed independent two-arm trial can give misleading estimates or uncertainty. Decide whether the goal is reward during learning, identification of a deployable policy, or a stable causal contrast, then select the allocation and analysis together.
Regret is not an ordinary effect estimate
In a stationary stochastic bandit, each arm has an unknown expected reward, and a standard objective compares the learner’s cumulative reward with always selecting the best arm. Exploration can incur immediate cost but reveal which arm is better. Original finite-time bandit results analyze that tradeoff under specified reward and stationarity assumptions. They do not automatically provide a conventional A/B confidence interval or protect arbitrary operational guardrails.
A fixed experiment can instead hold assignment probabilities stable and estimate a prespecified contrast over a defined population and horizon. A best-arm identification study has another objective: select an arm with a controlled error or information budget. These tasks should not be collapsed into the assertion that a bandit is always a faster A/B test. Changing the objective changes the relevant guarantee, sample allocation, stopping rule, and decision evidence.
Adaptation makes the assignment history relevant
Record the probability of the selected action conditional on the information available at that decision, including prior history, context, eligible action set, and algorithm version. An overall fraction of A actions is generally not that conditional probability. Maintaining exploration supports later evaluation, while greedy zero-probability decisions can remove support for alternatives. Delayed outcomes complicate adaptation because the learner may preferentially react to fast-arriving rewards rather than completed horizon outcomes.
Unweighted arm averages can compare different calendar or context mixtures when allocation changes. Even randomized choices at each time do not make the eventual A and B observations identically distributed if their sampling times differ and the baseline drifts. Appropriate weighting, model adjustment, and adaptive inference can address specific designs under assumptions, but a fixed-trial standard error pasted onto the adaptive log does not inherit those guarantees.
Keep operational and inferential contracts explicit
If assignment is user-sticky, an adaptive enrollment policy may change probabilities for newly enrolled users while keeping existing users in their original arm. A per-request bandit implements a different intervention with potential carryover. Log those distinctions instead of calling both a traffic ramp. Preserve minimum exploration, guardrail logic, and the full propensity trajectory when they are part of the design, and evaluate outcome-maturity handling before allowing updates.
Bandit results should report cumulative reward or regret under the stated model, deployment-policy quality, and uncertainty from a suitable adaptive method when causal claims are made. A high observed mean for the heavily favored arm is not proof it would win under a common population distribution. Retain a fixed randomized holdout when the product question requires one, or use an explicitly justified alternative design; a changing allocation strategy is a choice with a different evidence contract.
Work it through
Changing allocation plus calendar drift distorts raw means
Consider two periods of ten decisions each. Both actions have reward 1 throughout period 1 and reward 0 throughout period 2, so there is no action effect within either period. Conditional A probabilities are 0.8 then 0.2. In the realized log, A/B counts are 8/2 in period 1 and 2/8 in period 2.
A receives 8 positive rewards in 10 total observations, so its raw mean is 0.8. B receives 2 positives in 10 observations, so its raw mean is 0.2. The raw difference is 0.6 despite both actions having identical reward in each period.
For an always-A target evaluated over all 20 decisions, IPS positive contributions sum to 8/0.8=10; the two later A rewards are zero. Dividing by 20 gives 0.5. For always-B, the positive contributions are 2/0.2=10, also giving 0.5.
Each target’s true reward over the equally weighted two-period population is (1+0)/2=0.5. The weighted estimates match it in this particular realization. This drifting example illustrates mixture bias in raw means; it is not the stationary-arm model assumed by the displayed regret objective.
Conditional randomization can coexist with misleading pooled arm averages. Correct recorded propensities and an appropriate target population are necessary for the weighted interpretation.
The living notebook
Explore the model
Interactive lab · probability
Exploration probability changes information allocation
Reset, set Success probability p to 0.1 and Trials n to 20. Predict count mean 2 and variance 1.8 before Step. Reset, set p to 0.5 and n to 20, predict mean 10 and variance 5 before Step. These exact independent fixed-probability counts illustrate exploration allocation only; playback is not an adaptive bandit trajectory and does not compute regret.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forFewer exploratory observations can reduce information about an alternative even when short-term allocation favors the current winner.
Pause & reason
Check your understanding
Your turn
Try it yourself
Use two actions with true means 0.7 and 0.6, and a frozen correctly ranked greedy choice of the first action. With ε=0.2 and uniform exploration, find action probabilities and expected reward per decision. If these conditions stay fixed for 100 decisions, find expected regret against always choosing mean 0.7.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
The greedy action receives exploitation plus half the exploration probability.
Compare with the solution
Probabilities are 1−0.2+0.2/2=0.9 and 0.1. Expected reward is 0.9×0.7+0.1×0.6=0.69. Expected regret per decision is 0.7−0.69=0.01, totaling 1 reward unit over 100 decisions under the stated fixed stationary conditions. This calculation does not analyze learning errors or changing greedy estimates.
Keep the idea
Take it with you
- Reward allocation and fixed effect estimation optimize different objectives.
- Adaptive logs need their actual conditional probabilities and history.
- Changing calendar mixtures can make raw arm means misleading.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.