monte carlo simulation pascal' problem most of the early work on probability theory revolved around games using dice reputedlypascal' interest in the field that came to be known as probability theory began when friend asked him whether or not it would be profitable to bet that within twenty-four rolls of pair of dice he would roll double six this was considered hard problem in the mid- th century pascal and fermattwo pretty smart guysexchanged number of letters about how to resolve the issuebut it now seems like an easy question to answeron the first roll the probability of rolling six on each die is / so the probability of rolling six with both dice is / thereforethe probability of not rolling double six on the first roll is / / therefore the probability of not rolling double six twenty-four consecutive times is ( / ) nearly and therefore the probability of rolling double six is ( / ) about in the long run it would not be profitable to bet on rolling double six within twenty-four rolls just to be safelet' write little program to simulate pascal' friend' game and confirm that we get the same answer as pascal def rolldie()return random choice([ , , , , , ]def checkpascal(numtrials)"""assumes numtrials an int prints an estimate of the probability of winning""numwins for in range(numtrials)for in range( ) rolldie( rolldie(if = and = numwins + break print 'probability of winning ='numwins/numtrials figure checking pascal' analysis archeological excavations suggest that dice are the human race' oldest gambling implement the oldest known "modernsix-sided die dates to about bcbut egyptian tombs dating to two millennia before the birth of christ contain artifacts resembling dice typicallythese early dice were made from animal bonesin gambling circles people still use the phrase "rolling the bones as with our earlier analysesthis is true only under the assumption that each die is fairi the outcome of roll is truly random and each of the six outcomes is equally probable this is not always to be taken for granted excavations of pompeii discovered "loadeddice in which small lead weights had been inserted to bias the outcome of roll more recentlyan online vendor' site said"are you unusually unlucky when it comes to rolling diceinvesting in pair of dice that' moreuhreliable might be just what you need