Tutorials › Response-Adaptive Randomization › Deriving the One-Step Composition Recursion

Urn Models · Tutorial 51 of 501

Deriving the One-Step Composition Recursion

Learn to derive and calculate the one-step conditional mean urn composition from the current state, treatment-draw probabilities, and outcome-specific replacements.

Intermediate 11 min read

What You'll Learn

  • Define treatment-draw probabilities from a finite urn composition.
  • Combine outcome probabilities with replacement vectors to find expected additions for each treatment.
  • Derive the conditional expected next composition using indicator variables.
  • Calculate the recursion for binary and multi-category outcomes.
  • Check expected total urn size and identify errors in the calculation.
  • Distinguish the conditional mean recursion from a full state-distribution calculation.

From a Draw to an Expected Composition

An urn's next composition depends on two linked events: which treatment is drawn and which response follows that treatment. A replacement rule specifies what balls are added for each treatment-response combination. The one-step composition recursion averages over both events, conditional on the urn as it stands before the next assignment.

The key is to keep the two sources of randomness distinct. The current composition determines the probability of drawing each treatment. The response model and replacement rule then determine the expected additions after that draw. This yields a conditional expected composition, not a prediction of the exact next state.

Definition: Consider a finite urn with \(K\) treatment colors. Let \(X_n=(X_{n,1},\ldots,X_{n,K})^\mathsf{T}\) be the column vector of ball counts before assignment \(n+1\), and let \(S_n=\sum_{j=1}^K X_{n,j}>0\) be its total size. The probability of drawing treatment \(j\) is \(X_{n,j}/S_n\). Let \(Y_{n+1}\) be the response to the treatment drawn. For each treatment \(j\) and response category \(y\), let \(r_{j,y}\) be the column vector of balls added after that treatment-response combination. Thus \(X_{n+1}=X_n+r_{j,y}\) when treatment \(j\) is drawn and response \(y\) occurs.

This convention treats the drawn ball as returned before the specified additions are made; \(r_{j,y}\) records the added balls, not the returned ball. Equivalently, if the replacement matrix for response \(y\) records the numbers of balls added by treatment in its rows and ball color in its columns, \(r_{j,y}\) is the transpose of row \(j\). We assume throughout that the urn has a positive total, each draw is made with probabilities proportional to current ball counts, and each replacement vector has finite, nonnegative entries. Replacement entries are counts, so they are ordinarily nonnegative integers.

The One-Step Recursion

Let the possible response categories be \(1,\ldots,M\). Conditional on drawing treatment \(j\), write \(q_{j,y}=P(Y_{n+1}=y\mid A_{n+1}=j,\mathcal{F}_n)\), where \(A_{n+1}\) denotes the treatment drawn and \(\mathcal{F}_n\) contains the information available before that draw. For each \(j\), the response probabilities satisfy \(q_{j,y}\geq 0\) and \(\sum_{y=1}^M q_{j,y}=1\). The model assumes these conditional probabilities and the replacement rule are specified for the current step. They may depend on the past if the model says so; the formula uses their values conditional on \(\mathcal{F}_n\).

Theorem: Given the current urn composition and the stated draw, response, and replacement rules, the conditional expected next composition is
$$ E(X_{n+1}\mid\mathcal{F}_n) = X_n+\sum_{j=1}^{K}\frac{X_{n,j}}{S_n} \left(\sum_{y=1}^{M}q_{j,y}r_{j,y}\right). $$

The inner sum is the expected replacement vector if treatment \(j\) is drawn. The outer sum averages those treatment-specific expected replacements using the urn's treatment-draw probabilities. If \(b_j=\sum_y q_{j,y}r_{j,y}\), the same recursion is \(E(X_{n+1}\mid\mathcal{F}_n)=X_n+\sum_j(X_{n,j}/S_n)b_j\).

Why the Recursion Holds

Define \(I_j=1\) if treatment \(j\) is drawn on the next assignment and \(I_j=0\) otherwise. Exactly one treatment is drawn, so \(\sum_j I_j=1\). The next composition can be written as the current composition plus the replacement associated with the drawn treatment and its response. Conditional on drawing \(j\), the expected replacement is \(\sum_y q_{j,y}r_{j,y}\). Averaging over the possible treatments gives the recursion.

More explicitly, the conditional probability of the joint event “treatment \(j\) is drawn and response \(y\) occurs” is \(P(A_{n+1}=j,Y_{n+1}=y\mid\mathcal{F}_n)=(X_{n,j}/S_n)q_{j,y}\). The conditional expectation of the replacement is therefore the sum of each possible replacement vector weighted by its joint-event probability:

$$ E(X_{n+1}-X_n\mid\mathcal{F}_n) = \sum_{j=1}^{K}\sum_{y=1}^{M} \frac{X_{n,j}}{S_n}q_{j,y}r_{j,y}. $$

Grouping this double sum first by treatment gives the displayed recursion. This argument uses the law of total expectation; it does not require the response probabilities to be the same across treatments. The essential ingredients are a well-defined conditional draw probability, a complete set of conditional response probabilities, and a specified replacement vector for every treatment-response pair.

Worked Example: Three Treatments and Binary Responses

Suppose the current composition is \(X_n=(4,3,1)^\mathsf{T}\), so \(S_n=8\). Responses are success or failure. The hypothetical success probabilities for treatments 1, 2, and 3 are \(0.70\), \(0.50\), and \(0.25\). The replacement vectors are:

  • Treatment 1: success adds \((2,0,0)^\mathsf{T}\); failure adds \((0,1,0)^\mathsf{T}\).
  • Treatment 2: success adds \((0,1,0)^\mathsf{T}\); failure adds \((1,0,1)^\mathsf{T}\).
  • Treatment 3: success adds \((0,0,2)^\mathsf{T}\); failure adds \((1,0,0)^\mathsf{T}\).

The draw probabilities are \(4/8=0.50\), \(3/8=0.375\), and \(1/8=0.125\). First calculate the expected replacement vector for each possible draw:

$$ b_1=0.70(2,0,0)^\mathsf{T}+0.30(0,1,0)^\mathsf{T} =(1.40,0.300,0)^\mathsf{T}, $$
$$ b_2=0.50(0,1,0)^\mathsf{T}+0.50(1,0,1)^\mathsf{T} =(0.500,0.500,0.500)^\mathsf{T}, $$
$$ b_3=0.25(0,0,2)^\mathsf{T}+0.75(1,0,0)^\mathsf{T} =(0.750,0,0.500)^\mathsf{T}. $$

Weighting by the draw probabilities gives the expected addition:

$$ E(X_{n+1}-X_n\mid\mathcal{F}_n) =0.50b_1+0.375b_2+0.125b_3 =(0.98125,0.33750,0.25000)^\mathsf{T}. $$

Adding this vector to the current composition gives \(E(X_{n+1}\mid\mathcal{F}_n)=(4.981,3.338,1.250)^\mathsf{T}\), to four significant figures. The expected total is \(4.98125+3.33750+1.25000=9.56875\) balls. This is a conditional mean; the actual next composition must follow one of the discrete replacement outcomes and need not equal this vector.

Worked Example: Three Response Categories

Consider a hypothetical urn with three treatments and current composition \(X_n=(2,1,3)^\mathsf{T}\), of total size 6. There are three response categories, \(a,b,c\). For the three treatments, the response-probability vectors are respectively \((0.50,0.30,0.20)\), \((0.20,0.50,0.30)\), and \((0.10,0.60,0.30)\). The replacement vectors for categories \(a,b,c\) are:

  • Treatment 1: \((1,0,0)^\mathsf{T}\), \((0,1,0)^\mathsf{T}\), \((0,0,1)^\mathsf{T}\).
  • Treatment 2: \((0,2,0)^\mathsf{T}\), \((1,0,0)^\mathsf{T}\), \((0,0,2)^\mathsf{T}\).
  • Treatment 3: \((1,0,1)^\mathsf{T}\), \((0,1,0)^\mathsf{T}\), \((2,0,0)^\mathsf{T}\).

The treatment-draw probabilities are \(2/6=1/3\), \(1/6\), and \(3/6=1/2\). The treatment-specific expected additions are:

$$ b_1=(0.50,0.30,0.20)^\mathsf{T},\quad b_2=(0.20)(0,2,0)^\mathsf{T}+(0.50)(1,0,0)^\mathsf{T}+(0.30)(0,0,2)^\mathsf{T} =(0.500,0.400,0.600)^\mathsf{T}, $$
$$ b_3=(0.10)(1,0,1)^\mathsf{T}+(0.60)(0,1,0)^\mathsf{T}+(0.30)(2,0,0)^\mathsf{T} =(0.700,0.600,0.100)^\mathsf{T}. $$

For treatment 1, each response adds one ball of one color, so its expected addition is its response-probability vector. Combining the three treatments,

$$ E(X_{n+1}-X_n\mid\mathcal{F}_n) =\frac{1}{3}b_1+\frac{1}{6}b_2+\frac{1}{2}b_3 =(0.600,0.4667,0.2167)^\mathsf{T}. $$

Thus \(E(X_{n+1}\mid\mathcal{F}_n)=(2.600,1.467,3.217)^\mathsf{T}\). The expected total increases from 6 to \(7.283\). Independently checking by total additions gives \((1/3)(1)+(1/6)(1.5)+(1/2)(1.4)=1.283\), which agrees with the sum of the expected addition components.

Checks, Failure Modes, and What the Recursion Does Not Say

The expected change in total urn size has a useful check. Let \(\mathbf{1}\) be the vector of \(K\) ones. Since the total is the sum of the composition components,

$$ E(S_{n+1}\mid\mathcal{F}_n) =S_n+\sum_{j=1}^{K}\frac{X_{n,j}}{S_n} \left(\sum_{y=1}^{M}q_{j,y}\mathbf{1}^\mathsf{T}r_{j,y}\right). $$

Here \(\mathbf{1}^\mathsf{T}r_{j,y}\) is the number of balls added for that treatment-response pair. A negative expected change is not possible under the nonnegative-addition assumption. If a calculation produces it, check the signs, the response probabilities, and the orientation of the replacement vectors.

A second diagnostic is probability accounting: for each treatment \(j\), the probabilities \(q_{j,y}\) must sum to 1, and the treatment-draw probabilities \(X_{n,j}/S_n\) must also sum to 1. A missing outcome category or a wrong denominator changes the expected addition. If \(X_{n,j}=0\), treatment \(j\) has draw probability zero, so its replacement vector contributes nothing to this step. The formula still applies as long as \(S_n>0\).

A common mistake is to average replacement vectors across treatments without weighting by the current urn composition. For example, treating each of three treatments as equally likely in the first worked example would use weights \(1/3\), even though the actual draw probabilities are \(0.50\), \(0.375\), and \(0.125\). The correction is to use \(X_{n,j}/S_n\), then average the response-specific replacements within each treatment using \(q_{j,y}\).

The recursion gives the expected composition conditional on the current information; it does not give the full distribution of \(X_{n+1}\). To obtain that distribution, one must retain the possible treatment-response events and their probabilities, rather than collapse them to a mean vector. Nor can one generally obtain an unconditional recursion by simply substituting the mean composition into the conditional formula: the draw probabilities are ratios involving the random total \(S_n\). An average of such ratios need not equal the ratio of average counts.

Worked Example: Why a Mean State May Not Give the Mean Update

Suppose, hypothetically, that before a draw the urn is equally likely to be in either state \((2,0)^\mathsf{T}\) or \((0,4)^\mathsf{T}\). There are two treatments; assume each draw adds one ball of the drawn treatment's color, regardless of response. In state \((2,0)^\mathsf{T}\), treatment 1 is drawn with probability 1, so the next state is \((3,0)^\mathsf{T}\). In state \((0,4)^\mathsf{T}\), treatment 2 is drawn with probability 1, so the next state is \((0,5)^\mathsf{T}\).

Averaging these two next states gives an unconditional expected next composition of \((0.5)(3,0)^\mathsf{T}+(0.5)(0,5)^\mathsf{T}=(1.5,2.5)^\mathsf{T}\). The mean current composition is \((1,2)^\mathsf{T}\). If it is incorrectly treated as a single urn state, its total of 3 gives draw probabilities \(1/3\) and \(2/3\), and the resulting plug-in expected next composition is \((1,2)^\mathsf{T}+(1/3,2/3)^\mathsf{T}=(1.333,2.667)^\mathsf{T}\). These are different. The conditional recursion is valid for each actual state; the discrepancy arises from averaging state-dependent probabilities.

The main alternative to the conditional-mean recursion is direct enumeration of the one-step transitions. Enumeration retains every possible next state and its probability, which is necessary for calculating a state distribution or a nonlinear summary of that distribution. The recursion is shorter and sufficient when the target is the one-step conditional mean. Unlike a fixed-allocation calculation, it updates treatment probabilities from the current composition. Its limitation is exactly that it summarizes the transitions rather than preserving their full variability.

Check Your Understanding

For each question, use the stated urn composition and replacement rule. Solutions follow the questions.

  1. An urn has composition \((3,1)^\mathsf{T}\). Treatment 1 always adds \((1,0)^\mathsf{T}\), and treatment 2 always adds \((0,2)^\mathsf{T}\). Find the conditional expected next composition.
  2. An urn has composition \((2,2)^\mathsf{T}\). For treatment 1, success has probability \(0.60\) and adds \((1,0)^\mathsf{T}\), while failure adds \((0,1)^\mathsf{T}\). For treatment 2, success has probability \(0.25\) and adds \((0,2)^\mathsf{T}\), while failure adds \((1,0)^\mathsf{T}\). Find the conditional expected next composition.
  3. State one check you can make on a computed expected total urn size when all replacement entries are nonnegative.
  4. Why does the conditional mean recursion not, by itself, specify the full distribution of the next urn state?

Solutions. For question 1, the draw probabilities are \(3/4\) and \(1/4\). The expected addition is \((3/4)(1,0)^\mathsf{T}+(1/4)(0,2)^\mathsf{T}=(0.750,0.500)^\mathsf{T}\), so the next conditional mean is \((3.750,1.500)^\mathsf{T}\). For question 2, both treatments are drawn with probability \(1/2\). Their expected replacement vectors are \(b_1=0.60(1,0)^\mathsf{T}+0.40(0,1)^\mathsf{T}=(0.600,0.400)^\mathsf{T}\) and \(b_2=0.25(0,2)^\mathsf{T}+0.75(1,0)^\mathsf{T}=(0.750,0.500)^\mathsf{T}\). The expected addition is \((1/2)b_1+(1/2)b_2=(0.675,0.450)^\mathsf{T}\), giving \((2.675,2.450)^\mathsf{T}\). For question 3, the expected total cannot be less than the current total, because each possible replacement adds a nonnegative number of balls. For question 4, different treatment-response events can lead to different next states; a mean vector records only their probability-weighted average, not the states and probabilities separately.

Clinical Biostats