wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> easy >> Dice throw
(Message started by: almost dead on Jan 14th, 2010, 3:39am)

Title: Dice throw
Post by almost dead on Jan 14th, 2010, 3:39am
we have a dice that we can throw up to three times , after each time , we have the option to go ahead and try again or stick to the number which showed up. What is the best strategy to maximize our expected gain?

Title: Re: Dice throw
Post by towr on Jan 14th, 2010, 4:51am
[hide]I would guess, throw once, then if you expect to get higher with two dice, throw again, then if you expect higher with one die, throw again.

So if you get a 5 or higher keep it else throw again, if you get a 4 or higher keep it, else throw again.[/hide]

Title: Re: Dice throw
Post by pscoe2 on Jan 14th, 2010, 5:04am

on 01/14/10 at 03:39:31, almost dead wrote:
we have a dice that we can throw up to three times , after each time , we have the option to go ahead and try again or stick to the number which showed up. What is the best strategy to maximize our expected gain?


I think we can use probability here...

Like.. assume the person got 6 before...the probability of getting better is null so he wont for sure...

If he gets 5...the probability to get a 6 in the next 2 turns is 1/6+5/36 = 11/36

something on these lines...wht do u ppl think???

Title: Re: Dice throw
Post by MathsForFun on Jan 14th, 2010, 5:19am
[hide]If the first throw is either 5 or 6, then hold. If the second throw is 4, 5 or 6 then hold.

The expected value of the last die is (1/3 * 5.5) + (2/3 * 1/2 * 5) + (2/3 * 1/2 * 3.5) = 14/3 (approx 4.66)[/hide]

Title: Re: Dice throw
Post by ThudanBlunder on Jan 14th, 2010, 5:57am
How can you 'maximise gain' if you don't know the payoffs, eg. what is the cost of throwing?

Title: Re: Dice throw
Post by towr on Jan 14th, 2010, 6:21am
I think it is fairly safe to assume he means to maximize the expected value of his final dice roll.

Title: Re: Dice throw
Post by mmgc on Jan 17th, 2010, 7:11pm

on 01/14/10 at 05:19:56, MathsForFun wrote:
If the first throw is either 5 or 6, then hold. If the second throw is 4, 5 or 6 then hold.

The expected value of the last die is (1/3 * 5.5) + (2/3 * 1/2 * 5) + (2/3 * 1/2 * 3.5) = 14/3 (approx 4.66)


Can you please explain your answer, I have following doubts regarding this :

1. Based on what logic 5, 6 is decided for first throw and 4,5,6 decided for second throw ?
2. Since, all three throws are independent events --how come the expected value of last throw is dependent on earlier throws.

I think the expected value of any throw is 3.5, so any time he gets more than this ( 4, 5,6 ), he should stick to it.

Title: Re: Dice throw
Post by pex on Jan 17th, 2010, 8:42pm

on 01/17/10 at 19:11:25, mmgc wrote:
I think the expected value of any throw is 3.5, so any time he gets more than this ( 4, 5,6 ), he should stick to it.

You've got the right idea here, you just need to take it one step further.

- The expected value of one throw is 3.5, nothing we can do about that.
- Assume we have two throws. If we discard the first throw, the expected value will be 3.5; thus, we discard only lower values: 1, 2 or 3. The expected value is now 1/2 * 5 + 1/2 * 3.5 = 4.25.
- Finally, if we have three throws, we know that the expected value will be 4.25 if we discard the first throw. Therefore, we will discard any lower value (1, 2, 3 or 4) on the first throw; the expected value is 1/3 * 5.5 + 2/3 * 4.25 = 14/3.

Title: Re: Dice throw
Post by Ant_Man on Jan 18th, 2010, 2:00pm
I don't think pex's expected values are right. You should look at the probabilities for getting each value if you throw 2 dice and keep the highest value. For example, you can get a six if both dice give sixes (1/6*1/6=1/36) or if one gives a six and the other gives anything lower (1/6*5/6*2=10/36). So the total probability of getting a 6 is 11/36. You can find probabilities for the other values and then get an expected value. For rolling two dice the expected value is ~4.47. For three, it is ~5.25. For one die it is obviously 3.5. Thus towr's strategy is right.

Title: Re: Dice throw
Post by Obob on Jan 18th, 2010, 6:25pm
Except you don't throw the 2 dice at the same time.  Pex's analysis seems right.

Title: Re: Dice throw
Post by mistaken_id on Jan 18th, 2010, 11:26pm
How are they different(pex and towrs solutions)

Title: Re: Dice throw
Post by Obob on Jan 19th, 2010, 12:50am
Pex and towr's solutions are the same (although towr's analysis isn't complete); antman's is different.

Title: Re: Dice throw
Post by towr on Jan 19th, 2010, 2:07am
I don't quite remember if I used the right analysis. But I did double-check with a brute-force search ;D

Title: Re: Dice throw
Post by mmgc on Jan 19th, 2010, 3:18am

on 01/17/10 at 20:42:28, pex wrote:
You've got the right idea here, you just need to take it one step further.

- The expected value of one throw is 3.5, nothing we can do about that.
- Assume we have two throws. If we discard the first throw, the expected value will be 3.5; thus, we discard only lower values: 1, 2 or 3. The expected value is now 1/2 * 5 + 1/2 * 3.5 = 4.25.
- Finally, if we have three throws, we know that the expected value will be 4.25 if we discard the first throw. Therefore, we will discard any lower value (1, 2, 3 or 4) on the first throw; the expected value is 1/3 * 5.5 + 2/3 * 4.25 = 14/3.


Got your point...Thanks...But how do we say that 4.66 is the maximum expected value we can get ...
May be with some other combination the expected value is more than this

Title: Re: Dice throw
Post by pex on Jan 19th, 2010, 3:23am

on 01/19/10 at 03:18:53, mmgc wrote:
Got your point...Thanks...But how do we say that 4.66 is the maximum expected value we can get ...
May be with some other combination the expected value is more than this

Given that we take the optimal decision at every point, I don't see how it could be improved.

Title: Re: Dice throw
Post by towr on Jan 19th, 2010, 3:41am

on 01/19/10 at 03:18:53, mmgc wrote:
Got your point...Thanks...But how do we say that 4.66 is the maximum expected value we can get ...
May be with some other combination the expected value is more than this


You can look at it this way, if you reroll the die for certain numbers, it's equivalent to replacing those numbers on the die with the expected value of the new roll.

So for 2 dice rolls, we start with (1,2,3,4,5,6) and replace some of those numbers with 3.5 (the expected value of the next roll). Which numbers do we replace to get the maximum expected value?
If we replace a number greater than 3.5 the average goes down, so we shouldn't do that. If we replace numbers smaller than 3.5 the average goes up, so we should do that.
So our new "die" is (3.5, 3.5 ,3.5, 4, 5, 6), with expected value (average) of 4.25. We can't get any higher, because there are no more numbers on the die that we can replace without decreasing the value of the die.

For three dice rolls, you similarly get (4.25, 4.25, 4.25, 4.25, 5, 6) with the average of 4.66...

Title: Re: Dice throw
Post by Ant_Man on Jan 19th, 2010, 5:15am
I agree with towr and pex now. I forgot that if you roll again, you have to take that roll. Guess I am a noob.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board