Testing the fit of a uniform distribution


You can use PROC UNIVARIATE in Base SAS® or PROC CAPABILITY in SAS/QC® to test if a variable follows a continuous uniform distribution. A uniform distribution is a special case of a beta distribution with shape parameters α = β = 1. In any of the statements that accept distribution options, specify the beta-options ALPHA=1 and BETA=1 in the BETA distribution option to test for uniformity. Use the THETA= and SIGMA= options to specify the lower and upper bounds of support. For example, the following code tests if the variable X is distributed U(10,25):

     proc univariate data=dataset;
        var x;
        histogram x / beta(ALPHA=1 BETA=1 THETA=10 SIGMA=15);
        run;