# Stratified Sampling

As suggested by the name, this type of sampling is done on various strata. More precisely, by first dividing the uniform (0,1) interval into *n* subintervals (or strata) one then samples each stratum. In practice this is done by either taking the midpoint of each stratum's interval (where *n* is chosen large enough so as to accommodate the number of uniform numbers required) or sampling randomly (using the pseudo-number generators discussed earlier) in each stratum. The motivation for this stems from the desire to have some level of homogeneity within a stratum while having the ability to have enough variation across the strata. This method produces better uniform numbers than those obtained using random sampling. Having said that, using this method to generate variates from multidimensional pdfs can become quite cumbersome – making this an inefficient way of generating multidimensional variates. The reader is referred to Glasserman (2003) for more details.

To generate a uniform number using stratified sampling, one needs to go through the following process:

Step 1: Divide the (0,1) interval into *n* equal strata () for *i =*1, 2, 3, ..., *n.*

Step 2: Generatethe required random variates in stratum *i* from the Uniform () pdf.^{[1]}

I will now discuss the implementation of a stratified sampling method when one is interested in generating two sets of triplets that are uniformly spaced in the (0,1) interval.

Going through the above process, it readily follows from step 1 that one would have three equal strata defined by the intervals (0, 1/3), (1/3, 2/_{3})? and (2/3, 1).

To apply step 2 so as to generate variables that are uniform in each stratum, the reader should first recall from the earlier section that one already is able to generate a random number in the interval (0,1) using the Microsoft Excel function = *rand*(). Hence, a uniform variable in an interval (*a,b*) can be generated using the relationship “= *a +* [(*b – a*) ** randQ*]*”*^{[2]}

**TABLE 4.2** Generation of Numbers Using Stratified Sampling

Table 4.2 shows the implementation of a stratified sampling method to obtain uniform numbers.

As can be seen from Table 4.2, while the first two uniform generated random numbers were drawn from the first stratum (0, 1/3), the second two uniform random numbers are drawn from the second stratum (1/3, 2/3 )> and the last two numbers are drawn from the last stratum (2/3>1**). **Thus the two simulated triplets are (0.1749, 0.4876, 0.7403) and (0.0043, 0.4897, 0.6683).

- [1] If X has a uniform pdf on the interval (
*a, b*)*, X*takes the form for - [2] To see this, observe that if X comes from a uniform pdf on the interval (0,1),
*f*(*x*)*=*1 for. If, for . From this, it readily follows that the pdf of Y is given by expression for . Hence, Y has a uniform pdf on the interval (*a,b*).