PROGRAM FILE 133: CHI-SQUARE UNIFORMITY TEST FOR                                
        RND FUNCTION.                                                           
    ANSI STANDARD 8.4                                                           
                                                                                
SECTION 133.1: CHI-SQUARE UNIFORMITY TEST FOR                                   
        RND FUNCTION.                                                           
                                                                                
THIS PROGRAM RUNS A SERIES OF 60 EXPERIMENTS OF 1040 SAMPLES                    
TO DETERMINE IF THE RANDOM NUMBERS ARE EQUALLY DISTRIBUTED                      
AMONG 21 EQUAL-SIZE INTERVALS BETWEEN 0 AND 1.  CHI-SQUARE                      
IS COMPUTED AND DISPLAYED FOR EACH OF THESE EXPERIMENTS.                        
EACH CHI-SQUARE RESULT IS CATEGORIZED ACCORDING TO THE                          
PERCENTILE RANGE INTO WHICH ITS VALUE FALLS:                                    
                                                                                
CATEGORY     % RANGE                CATEGORY    % RANGE                         
    1          0-1                      6        50-75                          
    2          1-5                      7        75-90                          
    3          5-10                     8        90-95                          
    4         10-25                     9        95-99                          
    5         25-50                    10        99-100                         
                                                                                
THESE CATEGORICAL RESULTS ARE THEN EVALUATED AGAIN USING                        
CHI-SQUARE (THE FIRST AND LAST THREE CATEGORIES ARE EACH                        
CONSOLIDATED INTO ONE), AND IF THE DISTRIBUTION AMONG                           
CATEGORIES IS SUFFICIENTLY IMPROBABLE (TOP OR BOTTOM 5%),                       
THE TEST FAILS.                                                                 
                                                                                
                    BEGIN TEST                                                  
                                                                                
EXPERIMENT     CHI-SQUARE     CATEGORY                                          
                                                                                
 1              13.76          4                                                
 2              19.96          6                                                
 3              22.32          6                                                
 4              16.68          5                                                
 5              24.92          7                                                
 6              13.92          4                                                
 7              20.96          6                                                
 8              14.24          4                                                
 9              23.84          7                                                
 10             18.36          5                                                
 11             17.44          5                                                
 12             18.28          5                                                
 13             15.28          4                                                
 14             31.56          9                                                
 15             17.92          5                                                
 16             29.44          8                                                
 17             10.96          3                                                
 18             35.32          9                                                
 19             23.44          6                                                
 20             24.2           7                                                
 21             22.96          6                                                
 22             24.2           7                                                
 23             23.96          7                                                
 24             27.32          7                                                
 25             22.36          6                                                
 26             21.12          6                                                
 27             18             5                                                
 28             10.72          2                                                
 29             21.28          6                                                
 30             16.4           5                                                
 31             12             3                                                
 32             17.4           5                                                
 33             18.32          5                                                
 34             16.2           5                                                
 35             30.12          8                                                
 36             22.4           6                                                
 37             11.16          3                                                
 38             16.72          5                                                
 39             23.08          6                                                
 40             24.24          7                                                
 41             13.12          4                                                
 42             22.04          6                                                
 43             16.44          5                                                
 44             15.36          4                                                
 45             28.88          8                                                
 46             16.08          5                                                
 47             18.08          5                                                
 48             24.76          7                                                
 49             23.88          7                                                
 50             22.48          6                                                
 51             19.44          6                                                
 52             24.52          7                                                
 53             33.64          9                                                
 54             12.48          4                                                
 55             17.2           5                                                
 56             16.68          5                                                
 57             24.32          7                                                
 58             13.32          4                                                
 59             23.76          6                                                
 60             17.04          5                                                
                                                                                
                                                                                
                                                                                
SUMMARY EVALUATION STATISTICS                                                   
                                                                                
               ACTUAL         EXPECTED                                          
CATEGORY       COUNT          COUNT                                             
 1              0              .6                                               
 2              1              2.4                                              
 3              3              3                                                
 4              8              9                                                
 5              17             15                                               
 6              14             15                                               
 7              11             9                                                
 8              3              3                                                
 9              3              2.4                                              
 10             0              .6                                               
                                                                                
                                                                                
WILL CONSOLIDATE CATEGORIES 1-3 AND 8-10, SO THAT                               
EXPECTED VALUE IN EACH IS >= 5, AS REQUIRED BY                                  
CHI-SQUARE TEST.                                                                
                                                                                
FOR FIVE D.F., SHOULD HAVE 1.145476 <= CHI-SQ <= 11.0705                        
(5% TAIL AT EACH END.)                                                          
                                                                                
ACTUAL CHI-SQ =  1.55556                                                        
                                                                                
 ***  TEST PASSED  ***                                                          
                                                                                
                    END TEST                                                    
                                                                                
END PROGRAM 133                                                                 
