Creating the Testing Sample

Figure 1. Compute Variable dialog box
Compute Variable dialog box
  1. Recall the Compute Variable dialog box.
  2. Type partition - rv.bernoulli(0.2) in the Numeric Expression text box.
  3. Click If.
    Figure 2. Compute Variable: If Cases dialog box
    Compute Variable: If Cases dialog box
  4. Select Include if case satisfies condition.
  5. Type partition>0 in the text box.
  6. Click Continue.
  7. Click OK in the Compute Variable dialog box.

This resets the values of partition that were greater than 0 so that approximately 20% take the value 0, and 80% remain valued at 1. Overall, approximately 100*(0.7*0.8)=56% of the customers previously given loans will be in the training sample, and 14% will be in the testing sample. Customers who were originally assigned to the holdout sample remain there.

Next