Probability, statistical optics, and data testing