SAS does not have a beta distribution (as of SAS 9.3). Let's use a gamma distribution to generate a beta distribution for SAS. Suppose U is a Gamma(1,a) and V is a Gamma(1,b) random variable, then W = U/(U+V) has a Beta(a,b) distribution. Write a SAS macro to generate ranbeta(seed,a,b) for Beta(a,b) distribution. Use the rangam(seed,a) command to generate Gamma(1,a) and Gamma(1,b) first. Then call the ranbeta(alpha,beta) macro to generate beta(0.5,0.1), beta(5,2), beta(2,5), beta(1,1) and beta(5,5). Again simulate 1000 samples for each case. Plot the histogram chart to examine the four distributions. Check the shapes of the four distributions. You will see that the beta distribution exhibits different shapes in these four quadrants. Note that the beta(1,1) should be uniform.