Repository for a workshop on Bayesian statistics
"""This file contains code for use with "Think Bayes",1by Allen B. Downey, available from greenteapress.com23Copyright 2012 Allen B. Downey4License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html5"""67from __future__ import print_function, division89from thinkbayes import Suite101112class Dice(Suite):13"""Represents hypotheses about which die was rolled."""1415def Likelihood(self, data, hypo):16"""Computes the likelihood of the data under the hypothesis.1718hypo: integer number of sides on the die19data: integer die roll20"""21# write this method22return 1232425def main():26suite = Dice([4, 6, 8, 12, 20])2728suite.Update(6)29print('After one 6')30suite.Print()3132for roll in [8, 7, 7, 5, 4]:33suite.Update(roll)3435print('After more rolls')36suite.Print()373839if __name__ == '__main__':40main()414243