An Application of Ergodic Theory to Probability Theory