Java version of source code included in Think Bayes book by Allen B. Downey