Sequential Sampling for
5.4 Wald’s Sequential Probability Ratio Test (SPRT)
(5.4)
Wald defined the SPRT as the rule, starting at n=1:
ii(i) continue collecting sample units while
i(ii) stop and classify µ=µ0if (iii) stop and classify µ=µ1if
Wald showed that the SPRT resulted in probabilities of action as in Table 5.3, and that the SPRT was optimum in the sense that of all potential methods that are able to provide a decision between µ0 or µ1 at the specified error rates αand β, SPRT requires the smallest average number of sample units. Wald then gave formu- lae to calculate the rest of the OC function and the whole of the ASN function (see, e.g. Fowler and Lynch, 1987). These formulae were very useful when elec- tronic computers were in their infancy, but nowadays it is better to use simulation to estimate both the OC and ASN functions, for two main reasons:
1. Wald’s formulae are approximations.
2. Wald’s formulae do not allow a minimum or maximum sample size.
The second of these disallows the formulae in practice, although they remain ade- quate approximations in general.
Classification by SPRT makes heuristic sense. Suppose, for example, that sam- pling stops with classification µ=µ1. Based on (iii) above, this means that, when sampling stops, and whatever the value of n,
(5.5)
LRn = = = −
= probability of getting the sample data if probability of getting the sample data if
µ µ µ µ
β α
1 0
˙ 1 LRn ≥1−β
α LRn ≤
− β α 1
β α
β α 1
1
− <LRn < −
n
r n r
r n r
r n r
LR n
r p p
n
r p p
p p
p
= p
( )
−
(
−)
=
−
−
−
−
−
1 1
0 0
1 0
1 0
1 1
1 1
Sequential Sampling for Classification 109
Table 5.3. The probabilities, under SPRT, of classification for the pivotal mean densities µ0and µ1(µ0< cd< µ1).
Classify as ‘acceptable’ Classify as ‘unacceptable’
(µ = µ0): action = (µ = µ1): action =
True value no intervention intervene
µ= µ0 1 α α
µ= µ1 β 1 β
where means that the equality is approximate, because the final ratio may be slightly greater than (1 β)/α. We proceed to classify µas equal to µ1, which we promised to do with probability 1 β if µ=µ1, and with probability αif µ=µ0. This is precisely what Equation 5.5 states! The reader with some knowledge of sta- tistics will by now recognize as two ‘statistical hypotheses’ the assumptions that the true mean density is either µ0 or µ1; the classification problem can be regarded as testing one hypothesis against the other.
For many distributions, the stop boundaries presented in (i), (ii) and (iii) above can be written out and reorganized into more convenient forms, involving cumulative totals, Sn, and the sample size, n. More specifically, the boundaries are parallel straight lines. This simplification works for the Poisson, negative binomial and binomial distributions. It does not work for the beta-binomial distribution;
boundaries for it are so complicated that no one has calculated and published them.
Equations for stop boundaries for the Poisson, negative binomial and binomial dis- tributions are shown in Table 5.4.
Table 5.4. Formulae for computing stop boundaries for a SPRT based on binomial, Poisson, negative binomial and normal distributions. The normal distribution can be used when the boundaries for the desired distribution (e.g. beta-binomial) are not simple straight lines. µ0< µ1and p0< p1.
Distribution and
parameters Low intercept High intercept Slope
Poisson; µ0and µ1
Binomial; p0and p1, q=1 p
Negative binomial;
µ0and µ1, k
Normal; µ0and µ1, σ2
µ1 µ0 2
σ β +
α µ µ 2ln 1
1 0
−
(
−)
σ β
α µ µ 2ln
1
1 0
−
(
−)
k k
k k k ln ln
µ µ µ µ µ µ
1 0 1 0 0 1
+ +
(
+) (
+)
ln
ln 1
1 0 0 1
−
(
+) (
+)
β α µ µ µ µ
k k ln
ln β
α µ µ µ µ
1
1 0 0 1
−
(
+) (
+)
k k
ln ln
q q p q p q
0 1 1 0 0 1
ln ln
1
1 0 0 1
−
β α p q p q ln
ln β
α 1
1 0 0 1
−
p q p q
µ µ µ µ 1
ln
−
0 1 0
ln ln
1
1 0
−
β α µ µ ln
ln β
α µ µ 1
1 0
−
As with Iwao’s procedure, SPRT stop boundaries are adjusted so that sampling must terminate when nreaches a specified maximum value, maxn. If n=maxnis reached, the estimate of mean density, Smaxn/maxn, is compared with cd, and the density is classified as greater than cdif Smaxn> cd×maxn. This same classification can be made if Sn> cd×maxn, for any n, which results in a portion of the upper boundary being a horizontal line ending at the point (maxn,cd×maxn).
The effect of SPRT parameters on the OC and ASN functions is similar to the effects noted with Iwao’s procedure. With Iwao’s procedure as originally formulated, there is only one parameter that controls the width of the stop boundaries (zα/ 2).
While two parameters could be used (zα for the lower boundary and zβ for the upper), we have retained the original formulation. With SPRT there are two para- meters, αand β, one for each boundary. Increasing either αor βdecreases the width between the stop boundaries and makes the OC flatter and reduces ASN values.
The effects are summarized in Table 5.2, but because they are not altogether intu- itive, it is worth describing how changing α affects the OC and ASN functions (the effect of changing βis similar).
Through its effect on the ‘ln’ functions in Table 5.4, increasing αperceptibly lowers the upper stop boundary and slightly raises the lower stop boundary (pro- vided that α is small). Narrowing the distance between the parallel stop boundary lines reduces the number of sample units required to reach a decision, so the ASN is reduced for all values of µ; because the upper stop boundary is lowered more than the lower one is raised, the reduction is greater for µ> cd. Therefore the ASN should be visibly reduced for µ> cd.
The relatively greater lowering of the upper stop boundary increases the rela- tive chance of exit through the upper stop boundary whatever the value of µ. In other words, the chance that true mean values less than cdare (incorrectly) classi- fied as greater than cd is increased. Therefore the OC function to the left of cdis lowered. The effect on the OC function could alternatively be deduced from Table 5.3.
Some effects of changing the parameters are illustrated in Exhibit 5.2.
Sequential Sampling for Classification 111
Exhibit 5.2. Wald’s SPRT plan: the effect of altering parameters and the distribution In this example we illustrate how αand βof Wald’s SPRT and models for the distri- bution of sample counts influence the OC and ASN functions. The example is based on sampling nymphs of the three-cornered alfalfa hopper (Spissistilus festinus (Say)), which is a pest of soybean. The adult girdles stems and leaf petioles with its sucking mouthparts, which diverts plant sugars and may allow disease entry. Sparks and Boethel (1987) found that counts of first-generation hopper nymphs from 10 beat-net samples were distributed according to a negative binomial distribution, while counts from the second generation could be adequately modelled by the Poisson distribution. Taylor’s Power Law fitted to all the data for both generations
Continued
together gave a=0.96 and b=1.26 (variance =0.96µ1.26). Sparks and Boethel esti- mated the relationship between nymph and adult numbers, and were able to deter- mine a critical density for nymphs: 11.3 per 10 beat-net samples. The sample unit was defined as 10 beat-net samples. The basic plan was SPRT with µ0 = 10.3, µ1=12.3, α=0.2, β=0.2, minn=10, maxn=40, TPL with a=0.96 and b=1.26, and negative binomial distribution with k = 14 (determined at the midpoint between µ0and µ1by Equation 5A.5 and TPL).
Changing α and β Three SPRT classification sampling plans were set up, using the above basic parameters, but with different values of αand β: α and β were both equal to 0.05, 0.10 or 0.2 for the three plans. The OC and ASN functions were determined using simulation with the sample counts distributed according to a negative binomial model and the variance modelled as a function of the mean using TPL. One thousand simulation replicates were made to estimate each OC and ASN value. Decreasing αand βcaused the stop boundaries to lie further apart, the ASN values to be higher and the OC function to be slightly steeper (Fig. 5.6).
However, the change in the OC function might be regarded as modest. Based on this finding, using larger values for αand β than those suggested by Sparks and Boethel (they used αand βequal to 0.05) might be justified because the average sample size would be reduced by almost one half over a wide range of pest densi- ties without appreciable loss in classification precision.
Different simulation distributions Sparks and Boethel found that all the sample counts obtained with the beat-net method could be described using a nega- tive binomial distribution, but also that 40% of these data sets could be described by the Poisson distribution. The authors designed a sequential classification sam- pling plan based on the negative binomial distribution: ‘it permits conservative sampling with little added effort [when counts are randomly distributed] because of the low level of clumping as indicated by the value of k(approximately 14)’. By simulation we can determine just how conservative this sampling would be and how little the ‘added effort’ actually was. Stop boundaries were created using the above basic parameters. Sample counts were simulated in three ways; using a nega- tive binomial distribution with k=14, using a negative binomial distribution allow- ing TPL to determine the value of kbased on Equation 5A.5, and using a negative binomial distribution with k=100, which essentially means using the Poisson dis- tribution (Section 4.9). The OC and ASN functions obtained for the three models for the sample counts are shown in Fig. 5.7. When the sample counts could be approx- imately described using the random distribution (Poisson), the ASN function was slightly larger and the OC function slightly steeper. There were essentially no differ- ences between the OC and ASN functions obtained when the variance was described as a function of the mean using TPL or when a fixed value of k was used.
The latter result is not surprising, because the variances among sample counts are nearly the same when k=14 as when the variances are determined using TPL.
When the stop boundaries are based on the Poisson distribution but sample counts are more aggregated, the results are similar. Stop boundaries were created using the basic set of parameters, except that k=100. The same three types of dis- tribution were used to estimate OC and ASN functions (Fig. 5.8). As before, when the variance among sample counts was greater than that used to compute the stop boundaries, the OC functions were less steep and the ASN functions were reduced.
These results indicate that, for the three-cornered hopper that infests soybeans, what at first observation might be regarded as somewhat imprecise descriptions of
Sequential Sampling for Classification 113
sample counts are in fact quite adequate for developing a sequential classification plan. Sensitivity to different values of unknown parameters, such as k, can be exam- ined by estimating OC and ASN functions for these different values. Conservative estimates of the OC and ASN functions can be obtained by using parameter values which make the sample variance greater (e.g. by using smaller values of kin the simulations than were used to set up the sampling plan).
Continued Fig. 5.6. Stop boundaries (a) and OC (b) and ASN (c) functions for an SPRT sequential classification sampling plan. The effect of changing the boundary parameters αand β: α,β=0.2 (___), 0.1 ( … ) and 0.05 (- – -). Other boundary parameters: µ0=10.3, µ1=12.3, minn=10, maxn=40, TPL a=0.96, TPL b= 1.26, kestimated by TPL. Simulation parameters: negative binomial with k estimated by TPL, 1000 simulations.
Fig. 5.7. OC (a) and ASN (b) functions for an SPRT sequential classification sampling plan. The effect of changing simulation parameters defining the negative binomial k: k=14(___), kestimated by TPL ( … ), k=100 (- – -). Boundary parameters: µ0=10.3, µ1=12.3, α= β =0.2, minn=10, maxn=40, TPL a=0.96, TPL b=1.26, kestimated by TPL. Simulation parameters: negative binomial with the above values of k, 1000 simulations.
Fig. 5.8. OC (a) and ASN (b) functions for an SPRT sequential classification sampling plan. The effect of changing simulation parameters defining the negative binomial k: k=14(___), kestimated by TPL ( … ), k=100 (- – -). Boundary parameters: µ0=10.3, µ1=12.3, α= β =0.2, minn=10, maxn=40, k=100.
Simulation parameters: negative binomial with the above values of k, 1000 simulations.
Sequential Sampling for Classification 115
Changing cd A parameter that has a large effect on the OC and ASN func- tions is the critical density. We illustrated this for batch sampling in Exhibit 3.1. We illustrate a similar effect with SPRT. Three SPRT plans were created using the basic parameters, but changing µ0and µ1: we used the pairs (10.3, 12.3), (11.3, 13.3) and (9.3, 11.3). Stop boundaries and OC and ASN functions are shown in Fig. 5.9.
These differences in µ0 and µ1 result in the OC and ASN functions being shifted either to the left or the right on the density axis. Of all the parameters studied in this example, an approximately 10% change in the critical density had the greatest effect on the OC and ASN. Often, the critical density is the least studied of all para- meters used to formulate a decision guide. Although it may be unrealistic or impractical to obtain a very accurate estimate of the critical density, it is always worth using simulation to find out the effects on the OC and ASN functions of a slightly different value.
Fig. 5.9. Stop boundaries (a) and OC (b) and ASN (c) functions for an SPRT sequential classification sampling plan. The effect of changing boundary
parameters µ0and µ1: µ0,µ1=10.3,12.3 (___), 11.3,13.3 ( … ) and 9.3,11.3 (- – -).
Other boundary parameters: α= β =0.2, minn=10, maxn=40, TPL a=0.96, TPL b=1.26, kestimated by TPL. Simulation parameters: negative binomial with k estimated by TPL, 1000 simulations.
Both Iwao’s and Wald’s methods are based in some way or other on statistical theory. But it may be possible to improve the efficiency of classification by escaping from established theoretical frameworks and concentrating on practical goals.
Iwao’s stop boundaries consist of divergent curvilinear lines and those for the SPRT are parallel lines (for most distributions of interest to pest managers). To force a decision at a maximum sample size, both sets of lines are abruptly brought together to a point. An alternative approach would be to bring the upper and lower boundaries together more gradually, to meet at the maximum sample size. This makes intuitive sense, because precision of a classification should improve as the sample size increases, so the stop boundaries should be allowed to converge. In fact, this type of boundary proved popular with the medical researchers, who found that Wald’s SPRT was not entirely ideal for their purposes (Armitage, 1975).
Converging Line stop boundaries have not to our knowledge been applied in pest management.
Converging Line stop boundaries could be developed in several ways. We use the following rationale: the boundaries consist of two straight lines, one of which meets the Sn-axis (the total count axis) above zero, and the other of which meets the n-axis (the sample size axis) above zero. The two lines converge and meet at the point (maxn, cd× maxn) (see Fig. 5.10). The question to be answered when specifying one of these boundaries is: Where should the stop boundaries meet the horizontal (n) and vertical (Sn) axes? In general, the further apart the lines are, the greater the sample size and consequently the greater the precision in classification.
An intuitive way to quantify the spread in the stop boundaries is to specify the minimum sample size, minn, and calculate classification intervals there about the critical density (as in Equation 3.11, with minnreplacing nB). This allows for sym- metric stop boundaries as well as boundaries that differentially guard against the two types of misclassification.
The upper and lower boundary points corresponding to the minimum sample size are calculated exactly as for Iwao’s method:
(5.6)
where zαLand zαUare standard normal deviates, and V is the variance when the mean is equal to cd.
The complete stop boundary consists of straight lines joining the point (maxn, cd×maxn) to each of the points (minn, Lminn) and (minn, Uminn). These lines can be extended to meet the axes, but of course the boundary is not strictly relevant below minn(Fig. 5.10).
L cd z V
U cd z V
L
U minn
minn
minn minn
minn minn
= −
= +
α
α