Many computer programming languages today include a function for generating random numbers. This paper presents some background theory in basic probability theory and inferential statistics. We then present a number of empirical tests for analyzing a computer generated sequence of random numbers, and we apply these tests to several popular random number generators.
A treatise on probability theory wouldn't be complete without a number of paradoxes to thoroughly confuse you. Here are a few classic ones.
How to use the rand() random number generator.