Creating the Testing Sample

- Recall the Compute Variable dialog box.
- Type partition - rv.bernoulli(0.2) in the Numeric Expression text box.
- Click If.
Figure 2. Compute Variable: If Cases dialog box - Select Include if case satisfies condition.
- Type partition>0 in the text box.
- Click Continue.
- 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.