Reply to topic  [ 25 posts ]  Go to page Previous  1, 2
Working out the average 
Author Message
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 6:44 pm
Posts: 4141
Location: Exeter
Reply with quote
I have a similar question and don't have a good way of getting a handle round it. I have very recently started playing an role-play game based around Legend of the Five Rings. All the dice rolling is on the basis of 'roll x dice, keep y of them' using D10s. As an additional part of this, if you roll a 10 on a die, you get to roll a second one to build it up (so if you roll a 10 then a 6, it counts as 16 and as only one of your kept die'.

What I'm trying to do is work out how to calculate the odds for these throws. Rolling 1 die and keeping 1 (1K1), due to the rule about 10s, gives E(x)=6 (approximately).

I've done 2K1 by brute force and ignoring the 10s rule, but other than that I'm struggling to come out with a good way of doing it...

Anyone got any suggestions?

_________________
"The woman is a riddle inside a mystery wrapped in an enigma I've had sex with."


Wed Aug 25, 2010 7:21 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
How does the "keep" rule work?

Say for instance it is 6k4 and you throw...

1, 5, 3, 8, 9, 2, 4

Which do you keep? The highest 4? etc...?

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed Aug 25, 2010 7:26 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
Also, what happens if you throw a 10 then another 10?

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed Aug 25, 2010 7:28 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
Also, are you looking for the Expected Rate of Return? i.e. the weighted average that you would expect your rolls to equal?

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed Aug 25, 2010 7:33 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
2k1 with the 10s rule E(x) = 10.9

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed Aug 25, 2010 8:03 am
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 6:44 pm
Posts: 4141
Location: Exeter
Reply with quote
Sorry, yes, one keeps the highest rolls where possible.

If you roll a second 10 you roll again and get twenty-something etc. (basically the 10 rule always applies).

I'm after how to calculate E(x) for any given x and y.

How did you do it for the 2K1, or was it just brute force?

_________________
"The woman is a riddle inside a mystery wrapped in an enigma I've had sex with."


Wed Aug 25, 2010 8:12 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
jonlumb wrote:
How did you do it for the 2K1, or was it just brute force?

Tried doing it cleverly but ended up brute forcing it :D

Ignoring 20+ (as it gets ridiculous)
Code:
roll  prob
1     0.1
2     0.1
3     0.1
4     0.1
5     0.1
6     0.1
7     0.1
8     0.1
9     0.1
11    0.01
12    0.01
13    0.01
14    0.01
15    0.01
16    0.01
17    0.01
18    0.01
19    0.01
20    0.01


::EDIT:: Cocking cock! Used the wrong numbers!

However, that second bit is a (sort of) geometric sequence where...

p(tn) = (2n-1)/100

except for the fact that n=10 is not there (i.e. p(t10) = 0).

I'll have to brute force 3k1 tonight to see what it comes up with and then I'll have more of an idea of how to do it mathematically.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Last edited by Fogmeister on Wed Aug 25, 2010 2:37 pm, edited 1 time in total.



Wed Aug 25, 2010 8:42 am
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
I'm doing something wrong and I can't work it out.

In 1k1 with 10 sided dice from 1 to 10.

p(1k1<=n) is the probability that the "kept" value is n or lower than n with 1k1 dice.

so, p(1k1<=9) = p(1) + p(2) + ... + p(9)
= 0.1 + 0.1 + ... + 0.1
= 9 x 0.1
= 0.9

p(1k1>10) is prob of rolling a 10 as any roll thereafter will make it greater than 10.

p(1k1>10) = p(10)
= 0.1

p(1k1<=9) + p(1k1>10) = 1

OK, so everything works out.

So, with 2k1.

p(2k1<=9) = p(1k1<=9) and p(1k1<=9) i.e. roll a 9 or less with both dice and your total will be 9 or less.
= 0.9 * 0.9
= 0.81

p(2k1>10) = p(1k1>10) or p(1k1>10) i.e. roll a 10 with either dice and your total will be greater than 10.
= 0.1 + 0.1
= 0.2

but that means...

p(2k1<=9) + p(2k1>10) = 1.01

That ent right.

I may be barking up entirely the wrong tree here but I'm trying to make some sense of this :D

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed Aug 25, 2010 1:02 pm
Profile WWW
Spends far too much time on here
User avatar

Joined: Thu Apr 23, 2009 6:44 pm
Posts: 4141
Location: Exeter
Reply with quote
Hmm, I'd not been working out the probability of each given total, just E(x) for each scenario.

With 1K1 it's simply:

1 x 0.1 +
2 x 0.1 +
.
.
.
9 x 0.1 +
11 x 0.01 +
12 x 0.01 +
.
.
.

etc.

Which works out as 6, give or take.

_________________
"The woman is a riddle inside a mystery wrapped in an enigma I've had sex with."


Wed Aug 25, 2010 1:25 pm
Profile WWW
I haven't seen my friends in so long
User avatar

Joined: Thu Apr 23, 2009 7:35 pm
Posts: 6580
Location: Getting there
Reply with quote
jonlumb wrote:
Hmm, I'd not been working out the probability of each given total, just E(x) for each scenario.

With 1K1 it's simply:

Which works out as 6, give or take.

I'd done that, was just trying to get it to an easier point where I can manage the numbers a bit more rather than counting the possible results.

_________________
Oliver Foggin - iPhone Dev

JJW009 wrote:
The count will go up until they stop counting. That's the way counting works.


Doodle Sub!
Game Of Life

Image Image


Wed Aug 25, 2010 2:21 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 25 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.