Date: Feb 18, 2013 2:47 PM
Author: Bacle H
Subject: Re: probability question about the dice game
On Thursday, February 14, 2013 5:50:27 AM UTC-8, Jussi Piitulainen wrote:

> starwayinc@gmail.com writes:

>

>

>

> > two players Ann and Bob roll the dice. each rolls twice, Ann wins if

>

> > her higher score of the two rolls is higher than Bobs, other wise

>

> > Bob wins. please give the analyse about what is the probability that

>

> > Ann will win the game

>

> >

>

>

>

> Because

>

>

>

> >>> from itertools import product

>

> >>> die = {1,2,3,4,5,6}

>

> >>> dice = set(product(die, die, die, die))

Homeland (In)security just opened a folder on you for writing

"die, die, die, die "; they believe you're threatening someone.

>

> >>> sum(int(max(a,b) > max(c,d)) for a,b,c,d in dice)

>

> 505

>

> >>> sum(int(max(a,b) <= max(c,d)) for a,b,c,d in dice)

>

> 791

>

>

>

> I'd say her odds are 505 for and 791 against. I hope my gambling

>

> vocabulary is not too far off.