By combining all of the functions defined in the previous sections, one can write a program to simulate the generation and detection of a stochastic background of gravitational radiation having a constant frequency spectrum: for . The following example program is a simulation for the initial Hanford, WA and Livingston, LA LIGO detectors. The parameters chosen for this particular simulation are contained in the #define statements listed at the beginning of the program. By changing these parameters, one can simulate the generation and detection of a stochastic background for different stochastic backgrounds (i.e., for different values of , , and ) and for different detector pairs. The number of data points, the sampling period of the detectors, and the total observation time for the simulation, etc. can also be modified. Preliminary statistics are displayed during the simulation. In addition, a histogram and the best-fit Gaussian probability distribution for the output data are stored in two files: histogram.dat and gaussian.dat. Sample output produced by the simulation and a plot of the histogram and best-fit Gaussian data are given in Sec. .