From an Allocation Rule to an Update
A verbal urn rule can sound clear while leaving an essential detail unspecified: after a particular treatment is drawn and a particular response occurs, exactly which treatment balls are added or removed? For a multi-arm design, the answer must be given for every treatment-response combination. Writing those changes as vectors makes the rule checkable before it is used to generate allocations.
This tutorial uses a column-vector convention. There are \(K\) treatments and \(R\) possible response categories. The urn composition is \(x=(x_1,\ldots,x_K)^\mathsf{T}\), where \(x_i\) is the number of balls for treatment \(i\). If treatment \(j\) is drawn and response category \(r\) occurs, the replacement vector \(d_{jr}\) records the net change to the composition, in treatment order. Its \(i\)th entry is the change in the number of treatment-\(i\) balls. A negative entry removes balls; a zero leaves that count unchanged; a positive entry adds balls.
The vector describes the net change from the composition before the draw to the composition after replacement. In particular, if the drawn ball is returned unchanged, its entry in the replacement vector is zero, not one. If it is removed and not returned, its entry is \(-1\). If it is returned and one additional ball of the same treatment is added, the net entry is \(+1\).
For a valid update, every component of \(x+d_{jr}\) must be nonnegative. This check is needed for every treatment-response combination that the rule permits at the current state. A rule that can require removing more balls of a treatment than are present is not executable from that state. The usual urn allocation probability is \(x_j/\sum_i x_i\), so the urn must also have a positive total before a draw can be made.
A Reliable Translation Procedure
Translate one combination at a time, rather than trying to write a whole matrix directly from a sentence. First fix the treatment order and response categories. Then, for each drawn treatment and response, list the net change to each treatment count. Only after those vectors are clear should they be placed as matrix columns.
Write the treatment labels in a stated order, such as A, B, C, and state the possible response categories.
For a specified treatment drawn and response observed, identify every ball added, removed, or left unchanged.
Write one entry per treatment, with removals negative and additions positive. The entry for the drawn treatment includes whether its ball is returned.
Place each vector in the column for the treatment drawn in its response-specific matrix. Add it to a composition to check feasibility and calculate the total change.
This is a direct application of the replacement-matrix conventions and one-step composition update: if response category \(r\) occurs, the selected column of \(D^{(r)}\) is added to the current composition. A useful arithmetic check is that the net change in total urn size equals the sum of the entries in the replacement vector.
This follows by summing the update \(x_i'=x_i+d_{jr,i}\) over all treatments \(i\). It is a simple but effective way to catch sign errors: additions and removals affect total urn size according to their signed net changes.
Worked Example: A Two-Treatment Rule
Suppose there are treatments A and B, with responses favorable and unfavorable. After a favorable response, remove the drawn ball and add one ball for the other treatment. After an unfavorable response, return the drawn ball and add one more ball for that same treatment. Translate the rule, then verify the updates from composition \(x=(5,4)^\mathsf{T}\).
Use treatment order A, B. If A is drawn and the response is favorable, A loses one ball and B gains one, so \(d_{\mathrm{A,fav}}=(-1,1)^\mathsf{T}\). If B is drawn and the response is favorable, \(d_{\mathrm{B,fav}}=(1,-1)^\mathsf{T}\). Therefore,
For an unfavorable response, the selected ball is returned and one additional ball of its treatment is added. The net changes are \(d_{\mathrm{A,unfav}}=(1,0)^\mathsf{T}\) and \(d_{\mathrm{B,unfav}}=(0,1)^\mathsf{T}\), giving
There are four possible updates. If A is drawn, a favorable response gives \((5,4)^\mathsf{T}+(-1,1)^\mathsf{T}=(4,5)^\mathsf{T}\), while an unfavorable response gives \((5,4)^\mathsf{T}+(1,0)^\mathsf{T}=(6,4)^\mathsf{T}\). If B is drawn, a favorable response gives \((5,4)^\mathsf{T}+(1,-1)^\mathsf{T}=(6,3)^\mathsf{T}\), while an unfavorable response gives \((5,4)^\mathsf{T}+(0,1)^\mathsf{T}=(5,5)^\mathsf{T}\). Each updated component is nonnegative. Favorable responses leave total size at 9 because each favorable vector sums to zero; unfavorable responses increase it to 10 because each unfavorable vector sums to one.
Checking Every Combination in a Three-Arm Rule
For several arms, a verbal rule may treat the selected arm differently from the unselected arms. The following hypothetical rule illustrates why each column must be checked, even when the same response category is used throughout. There are treatments A, B, and C. For a favorable response, remove one ball of the selected treatment and add two balls to each of the other treatments. For an unfavorable response, return the selected ball and add one ball to treatment B.
Worked Example: Verifying a Three-Arm Rule
Use treatment order A, B, C and initial composition \(x=(3,4,2)^\mathsf{T}\). For favorable responses, the vectors for draws of A, B, and C are respectively \((-1,2,2)^\mathsf{T}\), \((2,-1,2)^\mathsf{T}\), and \((2,2,-1)^\mathsf{T}\). For unfavorable responses, the selected ball is returned and treatment B gains one ball regardless of which treatment was drawn, so each vector is \((0,1,0)^\mathsf{T}\).
The six updates are as follows. If A is drawn, a favorable response gives \((3,4,2)^\mathsf{T}+(-1,2,2)^\mathsf{T}=(2,6,4)^\mathsf{T}\); an unfavorable response gives \((3,5,2)^\mathsf{T}\). If B is drawn, a favorable response gives \((5,3,4)^\mathsf{T}\); an unfavorable response again gives \((3,5,2)^\mathsf{T}\). If C is drawn, a favorable response gives \((5,6,1)^\mathsf{T}\); an unfavorable response again gives \((3,5,2)^\mathsf{T}\). All six resulting compositions are nonnegative.
Each favorable vector has total change \(-1+2+2=3\); the other two columns have the same sum, \(2-1+2=3\) and \(2+2-1=3\). Thus a favorable update increases the total from 9 to 12. Each unfavorable vector sums to 1, so it increases the total from 9 to 10. The repeated unfavorable update is not a mistake: under the stated rule, the same one-ball addition to B occurs after any treatment is drawn.
All Response Categories Need a Vector
A rule with more than two response categories requires a replacement vector for each category and each treatment drawn. A response label alone does not determine an update: the treatment drawn matters whenever the rule refers to the selected treatment or to another treatment relative to it.
Worked Example: Three Treatments and Three Response Categories
Consider a hypothetical rule with three treatments arranged cyclically: after A, the next treatment is B and the previous is C; after B, the next is C and the previous is A; after C, the next is A and the previous is B. A high response removes one ball of the selected treatment and adds two to the next treatment. A middle response returns the selected ball and adds one to the next treatment. A low response returns the selected ball and adds one to the previous treatment. Start from \(x=(4,3,2)^\mathsf{T}\).
For draw A, the high, middle, and low vectors are \((-1,2,0)^\mathsf{T}\), \((0,1,0)^\mathsf{T}\), and \((0,0,1)^\mathsf{T}\). Applying the same cyclic definitions to draws B and C gives the matrices below. Columns are always ordered A, B, C; each matrix is for the response shown.
For a complete check, the updates are: A drawn with high, middle, or low gives \((3,5,2)^\mathsf{T}\), \((4,4,2)^\mathsf{T}\), or \((4,3,3)^\mathsf{T}\). B drawn with high, middle, or low gives \((4,2,4)^\mathsf{T}\), \((4,3,3)^\mathsf{T}\), or \((5,3,2)^\mathsf{T}\). C drawn with high, middle, or low gives \((6,3,1)^\mathsf{T}\), \((5,3,2)^\mathsf{T}\), or \((4,4,2)^\mathsf{T}\). Each of the nine compositions is nonnegative.
The high-response columns sum to \(1\), since removing one and adding two produces a net gain of one. Each middle- and low-response column also sums to \(1\), because each adds exactly one ball and returns the selected ball. Consequently every possible update increases the total size from \(4+3+2=9\) to 10. This shared total change is a useful check, but it does not mean the resulting treatment compositions are the same.
Diagnostics, Alternatives, and Limitations
A replacement matrix is only as unambiguous as the verbal rule from which it was made. Before using one, check that each combination has a defined update, that the treatment and response orders are stated, and that the entries describe net changes rather than replacement counts before accounting for a returned or removed drawn ball. Then verify the updated composition and its total for every relevant column.
- Check signs and totals. Sum the entries in a vector and compare the result with the rule’s net additions and removals. A vector such as \((-1,2,2)^\mathsf{T}\) changes the total by \(3\), not by \(-3\).
- Check feasibility at the state of use. A vector with a negative entry is permissible only if the corresponding current count is large enough to allow the removal.
- Check matrix orientation. In this convention, the treatment drawn selects a column, not a row. A matrix written with row vectors must be transposed before it is used with the stated column-vector update.
- Check for missing cases. With \(K\) treatments and \(R\) response categories, the rule must specify \(K R\) treatment-response combinations unless some combinations are explicitly impossible.
An equivalent representation is an expanded table with one row for every treatment-response pair and one change column per treatment. That table can be easier to audit when there are many response categories; the outcome-specific matrices can then be assembled from it. A verbal rule is useful for communicating the design, but is a poor substitute for explicit vectors when checking calculations. Neither representation repairs an ambiguous rule, supplies response probabilities, or guarantees that the resulting urn process has desirable long-run properties. Those questions require additional assumptions and analysis beyond translating the rule.
Check Your Understanding
Use the column convention in this tutorial. Work through each question before reading the solutions.
- There are treatments A and B. A favorable response removes one ball of the selected treatment and adds two to the other. Give both replacement vectors and state the total change for each.
- For the three-arm rule in the second worked example, what composition results from drawing C and observing an unfavorable response, starting at \((3,4,2)^\mathsf{T}\)? Why is the update the same as for an unfavorable response after drawing A?
- A vector for a selected treatment is \((1,-2,0)^\mathsf{T}\), and the current composition is \((4,1,3)^\mathsf{T}\). Is the update feasible? Calculate the total before and after.
- In the cyclic three-response rule, what is the update from \((4,3,2)^\mathsf{T}\) when B is drawn and the response is low? Give the vector and the resulting total.
Solutions. (1) The vectors are \((-1,2)^\mathsf{T}\) for A drawn and \((2,-1)^\mathsf{T}\) for B drawn. Each sums to \(1\), so each increases total size by one. (2) The unfavorable vector is \((0,1,0)^\mathsf{T}\) for every draw, so the result is \((3,5,2)^\mathsf{T}\). The rule adds one to B irrespective of the selected treatment. (3) The second treatment count would become \(1-2=-1\), so the update is infeasible. The initial total is \(4+1+3=8\); the vector sums to \(1-2+0=-1\), which would give total 7, but a nonnegative total does not make the componentwise update valid. (4) The previous treatment before B is A, so the low-response vector is \((1,0,0)^\mathsf{T}\). The new composition is \((5,3,2)^\mathsf{T}\), with total 10.