Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 82 83 [84] 85 86 ... 123  All

Author Topic: Random Stuff Part III  (Read 650499 times)

0 Members and 2 Guests are viewing this topic.

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Random Stuff Part III
« Reply #2075 on: December 04, 2016, 09:01:03 pm »
+1

The expected value of 1d10 is

1*1/10+2*1/10+...+10*1/10 = (1+2+...+9+10)/10=55/10 =5.5

The expected value of (1d8 + 1) is

(2+3+4+...+8+9)/8 = 44/8 = 5.5

So the mean is the same.  Variance, though, is relevant, which depends on the second moment

sum(x_i^2*P(x_i))

Logged

heron

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1055
  • Shuffle iT Username: heron
  • Respect: +1183
    • View Profile
Re: Random Stuff Part III
« Reply #2076 on: December 04, 2016, 09:04:08 pm »
+1

In the past people have been able to answer my questions about dice, but I think this one is more difficult.

Which one is more likely to win, a D10 or a D8+1? Which one is 'better?'

They are equally likely to win, and there is a 1/10 chance of a tie. The probability of a the D8 + 1 rolling the value k is equal to the probability of the D8+1 rolling a value of 11 - k.
Logged

Roadrunner7671

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1845
  • Shuffle iT Username: Roadrunner7672
  • Forum Mafia Record: 18-33-2
  • Respect: +1346
    • View Profile
Re: Random Stuff Part III
« Reply #2077 on: December 05, 2016, 07:48:47 am »
0

Huh. Okay.

What about if you were facing a roll of a D12? Which would be better?
Logged
Oh God someone delete this before Roadrunner sees it.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11809
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12847
    • View Profile
    • Birds of Necama
Re: Random Stuff Part III
« Reply #2078 on: December 05, 2016, 08:15:35 am »
0

Huh. Okay.

What about if you were facing a roll of a D12? Which would be better?

The D12.

In less mathy terms, D10 has a range of 1-10 with each result being equally likely. D8+1 has a range of 2-9 with each result being equally likely. Looking at it from that perspective, it's not difficult to see that they would have the same average roll. D12 has a range of 1-12 with each result being equally likely, so it's better.
« Last Edit: December 05, 2016, 08:18:20 am by Awaclus »
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3499
  • Multiediting poster
  • Respect: +3838
    • View Profile
Re: Random Stuff Part III
« Reply #2079 on: December 05, 2016, 09:21:48 am »
+2

I think the fact that the probability distributions are symmetric about their mean, and have te same mean, is a sufficient condition to conclude that both are equally likely to win (because for each possible result, the opposite one is equally likely). With dice, the probability distributions are always symmetric, so the only thing that matters is the mean.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

Roadrunner7671

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1845
  • Shuffle iT Username: Roadrunner7672
  • Forum Mafia Record: 18-33-2
  • Respect: +1346
    • View Profile
Re: Random Stuff Part III
« Reply #2080 on: December 05, 2016, 10:09:06 am »
0

Huh. Okay.

What about if you were facing a roll of a D12? Which would be better?

The D12.

In less mathy terms, D10 has a range of 1-10 with each result being equally likely. D8+1 has a range of 2-9 with each result being equally likely. Looking at it from that perspective, it's not difficult to see that they would have the same average roll. D12 has a range of 1-12 with each result being equally likely, so it's better.
No, I meant would you rather roll a D10 or D8+1 against a D12?
Logged
Oh God someone delete this before Roadrunner sees it.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11809
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12847
    • View Profile
    • Birds of Necama
Re: Random Stuff Part III
« Reply #2081 on: December 05, 2016, 10:10:32 am »
0

Huh. Okay.

What about if you were facing a roll of a D12? Which would be better?

The D12.

In less mathy terms, D10 has a range of 1-10 with each result being equally likely. D8+1 has a range of 2-9 with each result being equally likely. Looking at it from that perspective, it's not difficult to see that they would have the same average roll. D12 has a range of 1-12 with each result being equally likely, so it's better.
No, I meant would you rather roll a D10 or D8+1 against a D12?

Doesn't matter.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

Roadrunner7671

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1845
  • Shuffle iT Username: Roadrunner7672
  • Forum Mafia Record: 18-33-2
  • Respect: +1346
    • View Profile
Re: Random Stuff Part III
« Reply #2082 on: December 05, 2016, 10:12:08 am »
0

Huh. Okay.

What about if you were facing a roll of a D12? Which would be better?

The D12.

In less mathy terms, D10 has a range of 1-10 with each result being equally likely. D8+1 has a range of 2-9 with each result being equally likely. Looking at it from that perspective, it's not difficult to see that they would have the same average roll. D12 has a range of 1-12 with each result being equally likely, so it's better.
No, I meant would you rather roll a D10 or D8+1 against a D12?

Doesn't matter.
Really? But they have different ranges
Logged
Oh God someone delete this before Roadrunner sees it.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11809
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12847
    • View Profile
    • Birds of Necama
Re: Random Stuff Part III
« Reply #2083 on: December 05, 2016, 10:38:46 am »
0

Huh. Okay.

What about if you were facing a roll of a D12? Which would be better?

The D12.

In less mathy terms, D10 has a range of 1-10 with each result being equally likely. D8+1 has a range of 2-9 with each result being equally likely. Looking at it from that perspective, it's not difficult to see that they would have the same average roll. D12 has a range of 1-12 with each result being equally likely, so it's better.
No, I meant would you rather roll a D10 or D8+1 against a D12?

Doesn't matter.
Really? But they have different ranges

They have the same average roll.
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

Roadrunner7671

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1845
  • Shuffle iT Username: Roadrunner7672
  • Forum Mafia Record: 18-33-2
  • Respect: +1346
    • View Profile
Re: Random Stuff Part III
« Reply #2084 on: December 05, 2016, 10:41:23 am »
0


The D12.

In less mathy terms, D10 has a range of 1-10 with each result being equally likely. D8+1 has a range of 2-9 with each result being equally likely. Looking at it from that perspective, it's not difficult to see that they would have the same average roll. D12 has a range of 1-12 with each result being equally likely, so it's better.
No, I meant would you rather roll a D10 or D8+1 against a D12?

Doesn't matter.
Really? But they have different ranges

They have the same average roll.
Is there any instance where you'd rather have 1D8+1 over a D10, or vice versa?

Obviously when rolling a one sided die. But what about with a D4? Would you maybe want the D8+1 instead of the D10?
Logged
Oh God someone delete this before Roadrunner sees it.

Awaclus

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 11809
  • Shuffle iT Username: Awaclus
  • (´。• ω •。`)
  • Respect: +12847
    • View Profile
    • Birds of Necama
Re: Random Stuff Part III
« Reply #2085 on: December 05, 2016, 10:54:33 am »
+1

Is there any instance where you'd rather have 1D8+1 over a D10, or vice versa?

Obviously when rolling a one sided die. But what about with a D4? Would you maybe want the D8+1 instead of the D10?

For D4, you'd want D8+1. For D4+5, you'd want D10. That's because the numbers 1-10 are symmetric in such a way that D10 has the advantage for the higher numbers and D8+1 for the lower numbers (and it all adds up so that they're both just as good against anything that rolls numbers between 1 and 10 symmetrically).
Logged
Bomb, Cannon, and many of the Gunpowder cards can strongly effect gameplay, particularly in a destructive way

The YouTube channel where I make musicDownload my band's Creative Commons albums for free

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2219
    • View Profile
Re: Random Stuff Part III
« Reply #2086 on: December 05, 2016, 11:13:53 am »
0

So I saw Book of Mormon today.  It's pretty amazing.

It really is. You could not have convinced me 15 years ago that a South Park creator could be involved with such a huge Broadway hit.

I think what's interesting is that while the show does poke a little fun at the religion, the religion is just a vehicle in which to move the story about these two guys.

And the ending shows how easy it is for scripture to be warped into something else entirely.
Logged
A man has no signature

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2219
    • View Profile
Re: Random Stuff Part III
« Reply #2087 on: December 05, 2016, 11:25:39 am »
0

No, I meant would you rather roll a D10 or D8+1 against a D12?

I could calculate the probability of each die result, but I'm lazy, so I instead simulated the dice rolls in Excel with batches of 100k results.

Both the d10 and the d8+1 beat the d12 37-38% of the time whenever I ran a new simulation of 100k.

As far as whether you would choose the d10 or the d8+1, that may depend on whether or not you want a chance of a 10 or if you want no chance for a 1.
Logged
A man has no signature

theorel

  • Spy
  • ****
  • Offline Offline
  • Posts: 86
  • Shuffle iT Username: theorel
  • Respect: +57
    • View Profile
Re: Random Stuff Part III
« Reply #2088 on: December 07, 2016, 09:06:11 am »
+1

Is there any instance where you'd rather have 1D8+1 over a D10, or vice versa?

Obviously when rolling a one sided die. But what about with a D4? Would you maybe want the D8+1 instead of the D10?

For D4, you'd want D8+1. For D4+5, you'd want D10. That's because the numbers 1-10 are symmetric in such a way that D10 has the advantage for the higher numbers and D8+1 for the lower numbers (and it all adds up so that they're both just as good against anything that rolls numbers between 1 and 10 symmetrically).
To generalize:
d10 is more likely to roll less than 5, and more likely to roll greater than 6.

So considering static numbers: (define "win" as roll better and "lose" as not "win")
d8+1 "wins" against 1, 2, 3, and 4 more frequently.
d10 "wins" against 6, 7, 8, and 9 more frequently.
They win equally often against 5.
And they both always win for 0 or less, and always lose for 10 or more.

Then for any given probability distribution including numbers from 1-9, you can see how it matches up against those values.  They aren't all equivalent probability wins, but they're symmetric about 5.  Basically, if comparing against other symmetric distributions, you'll just have to consider if one side is more likely than the other.  Against a uniform distribution that's just counting:
Here are some examples.
1d4, 1-4 are lots more likely (only possible) 1d8+1 wins more.
1d4+5 6-9 lots more likely (only possible) 1d10 wins more.
1d6 more 1-4 counts than 6-9 counts, 1d8+1 wins more.
1d6+2 has 3, 4, 6, 7, 8...more 6-9 counts so 1d10 wins more.

How about, 2d4? It has values 2-8 symmetric about the mean (5)...and so, it compares equally to d8+1 (winning more frequently on 2, 3, and 4), and d10 (winning more frequently on 6, 7, and 8).

Aside: What if we include ties?  well, if we adjust our definition of "win" to be "at least tie" then:
d8+1 "wins" against 2, 3, 4, and 5 more frequently.
d10 "wins" against 7, 8, 9, and 10 more frequently.

So, d8+1 will at least tie against 2d4 much more frequently than d10.  Since they're equal for "win", we see that if getting a tie has any advantage then d8+1 is better in this case.
--

What about 2d6?  2d6 has a symmetric probability about 7.  If you know much about rolling 2d6, you know 6, 7, 8 are more likely than 2,3,4...and it doesn't include 1, so clearly d10 is better here.

What about 2d6-1 though?  this includes all the numbers in both ranges, but it's still more likely to roll in the 6-9 range than the 1-4 range. (4 and 8 have the same likelihood and it goes down as you get farther from 6).

Finally, looking at 2d6-2.  Mean is 5, probability goes down as you get away from it.  So probability of 4 is same as 6, etc...makes them equal for win again.
(and again if we consider ties, 1d8+1 wins again)

Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Random Stuff Part III
« Reply #2089 on: December 07, 2016, 10:18:48 am »
+3

Maybe just do it in general?

        P(X >= Y) = int_{x >= y} f_{XY}(x,y) dmu(X) dmu(Y),

where f_{XY} denotes the joint probability, mu(X) and mu(Y) are the measures.  If X and Y are indepenent, then f_{XY} = g*h, where g is the density function for X and h is the density function for Y.   So

        P(X >= Y) = int_{-infty}^{infty} int_y^{infty} g(x) h(y) dmu(X)dmu(Y)

Since we're dealing with dice, mu(X) and mu(Y) are just the counting measures, so

        P(X >= Y) = sum_{x >= y} p(x)*p(y) = sum_{Y range}*sum_{X range where X >= y} p(x)*p(y).

So if X is a roll from 1d10, (X is a selection of the space {1, 2, ..., 10} with uniform probability 1/10), and Y is a roll from 1d8+1, Y is a selection from (2, 3, ..., 9) with uniform probability 1/8, then

        P(1d10 >= 1d8+1) = [1/10*9 ]*1/8 +[1/10*8]*1/8 + ... + [1/10*2]*1/8 = (9+8+7+6+5+4+3+2)*1/10*1/8= 44/80= 11/20 = .55

In case that decomposition isn't clear, we're calculating

        P(1d10 >= 2)*p(Y=2) + P(1d10 >= 3)*P(Y=3) + ... + P(1d10>=8)*P(Y=9),

recalling Y stands for 1d8+1.  To find, say, P(1d10>=3), this can happen in 8 ways: rolling 3, 4, 5, 6, 7, 8, 9, 10.  Each of these has probability 1/10.  So (1/10)*8.  Note that we're including the 1d10 roll tying or exceeding the 1d8+1 roll. If we want just 1d10 > 1d8+1, then each term above has one less, so it would be

        P(1d10 > 1d8+1) = (8+7+6+5+4+3+2+1)*1/10*1/8 = 9/20 = 0.45.

Note that they are trying with probability 0.1, and so the 1d8+1 roll wins with probability 0.45 as well.  Symmetry as expected. 

To do the example of beating a d12 (let's say strictly beating),

        P(1d10 > 1d12) = (9*1/10)*1/12 + (8*1/10)*1/12 + ... + (1*1/10)*1/12

(the last term represents the d12 rolling 9, for which only one roll (a 10 on 1d10) can beat it.  The terms following (d12 rolling 10, 11, 12) give a probability of zero for the 1d10 roll exceeding them.  So this sum is

        (9+8+7+ 6+5+4+3+2+1)*1/10*1/12 = 45/120 = 0.375.

Note Kuildeous' numerical test giving 0.37--0.38.  (If you calculate P(1d10 >= 1d12), you'd get (10+9+...+2+1)/120 = 55/120 = 0.45833.)

What about the 1d8+1 roll?  We have

        P(1d8+1 > 1d12) = (1/8*8 )*1/12 + (1/8*7)*1/12 + (1/8*6)*1/12 + ... + (1/8*1)*1/12

The first term represents a roll of 1 on a 1d2, for which any roll on the 1d8+1 (span {2, ..., 9}) wins.  The second is a roll of 2 on 1d12, for which 7 rolls on the d8 win, etc.  This is

        (8+7+6+5+4+3+2+1)*(1/8)*(1/12) = 36/96 = 3/8 = 0.375.

So they are indeed the same. 
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Random Stuff Part III
« Reply #2090 on: December 07, 2016, 10:36:52 am »
+2

Note that the calculations for ndN are done the same, but the probabilities are no longer uniform.  Consider 2d6, which has a range {2, 3, ..., 12}, but the probabilities are (letting X stand for the 2d6 random variable):

P(X=2) = 1/36
P(X=3) = 2/36
P(X=4) = 3/36
P(X=5) = 4/36
P(X=6) = 5/36
P(X=7) = 6/36
P(X=8) = 5/36
P(X=9) = 4/36
P(X=10) = 3/36
P(X=11) = 2/36
P(X=12) = 1/36

So these are the probabilities you would need to use for a particular term.  For example,

     P(2d6 > 1d10) = [1/36 + ... 5/36+ 6/36 + 5/36 + .. + 1/36]*1/10 + [2/36 + ... 6/36 + ... +1/36]*1/10 + ... + [2/36+1/36]*1/10
                           = (36/360) + (35/360) + (33/360) + (30/360) + (26/360) + (21/360) + (15/360) + (10/360) + (6/360) + (3/360)
                           = 215/360
                           ~ 0.59722

(The first term is a 1 on 1d10 and any roll on 2d6, the second is 2 on 1d10 and a roll of 3 or more on 2d6, etc., and the last term is a roll of 10 on 1d10 and a roll of 11 or 12 on 2d6.)

Oh and hey, there are a lot of calculators online doing these trivial but tedious calculations.  (There are of course ways to short-hand a lot.  For example, we know 1+2+..+k = k(k+1)/2, which I used a lot in the previous example.  You could do a similar thing here.)  One such calculator is http://anydice.com/, and you can even ask 2d6>1d10:

Code: [Select]
output 2d6>1d10
And it spits out 0 with probability 40.28% and 1 with probability 59.72%.
Logged

SpaceAnemone

  • Thief
  • ****
  • Offline Offline
  • Posts: 91
  • Shuffle iT Username: SpaceAnemone
  • Correct Horse Battery Staple
  • Respect: +26
    • View Profile
Re: Random Stuff Part III
« Reply #2091 on: December 07, 2016, 10:50:50 am »
+2

@RR, if you don't like 2d integrals over the infinite plane in your die-rolling considerations, the easy way to visualise exactly what's going on with WW's example is to get some graph paper and colour in the squares. In the table below, the vertical axis is numbered for 1d8+1, and the horizontal axis is numbered for 1d10.

.123456789X
2#=OOOOOOOO
3##=OOOOOOO
4###=OOOOOO
5####=OOOOO
6#####=OOOO
7######=OOO
8#######=OO
9########=O

For any pair of dice, you're going to get the same pattern of having an equality line dividing the open "O" and closed "#" regions. Since any cell in this table is equally likely to get rolled (as long as you're using one fair die along each edge), then you just have to count up the open or closed cells and then divide by the total number (80) to get the actual probability.

You should be able to draw that kind of a diagram for any dice you like :-) It does kind of extend to having e.g. 2d6 on one edge, but then you have to worry about the area of each box (because the probabilities over the different numbers are no longer uniform), and add up areas rather than just counting cells.

PPE 1 -- ooh, hey, we're all thinking about nonuniform distributions now :-)
Logged
Congratulations! Your SpaceAnemone evolved into UniverseAnemone!
Town games: M84(L), M85(W), M86(L), M87(W), M88(L), M90(L), M92(W), M94(L), M97(L), M99(W), M100(L), M104(W), M107(W), M110(L), M112(L), RMM37(L), RMM40(D), RMM41(L), RMM43(L), RMM47(W), ZM23(W).
Scum games: M89(D), M108(L), NM8(W&MVP), NM10(L)   Mod: NM9, RMM38, RMM42.   Pronouns: they/them

Roadrunner7671

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1845
  • Shuffle iT Username: Roadrunner7672
  • Forum Mafia Record: 18-33-2
  • Respect: +1346
    • View Profile
Re: Random Stuff Part III
« Reply #2092 on: December 07, 2016, 10:51:53 am »
+1

This has turned into Random Stuff again for me. I have no idea what's happening!
Logged
Oh God someone delete this before Roadrunner sees it.

Archetype

  • Jester
  • *****
  • Offline Offline
  • Posts: 992
  • Suffers from Fancy Play Syndrom
  • Respect: +690
    • View Profile
Re: Random Stuff Part III
« Reply #2093 on: December 07, 2016, 02:01:42 pm »
0

This has turned into Random Stuff again for me. I have no idea what's happening!
Someday I hope to understand what's going on.
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Random Stuff Part III
« Reply #2094 on: December 07, 2016, 02:10:24 pm »
+4

Random stuff is going on.  Particularly, random stuff that is realized by dice rolls, or more generally as algebraic functions of discrete uniform random variables.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9411
    • View Profile
Re: Random Stuff Part III
« Reply #2095 on: December 09, 2016, 04:14:51 pm »
0

TFW Hamlet/Hamlet/Watchtower means your Watchtower draws 6 cards...
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Seprix

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5607
  • Respect: +3676
    • View Profile
Re: Random Stuff Part III
« Reply #2096 on: December 12, 2016, 05:29:04 pm »
+4

Logged
DM me for ideas on a new article, either here or on Discord (I check Discord way more often)

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2816
  • Build more Bridges in the King's Court!
  • Respect: +3347
    • View Profile
Re: Random Stuff Part III
« Reply #2097 on: December 12, 2016, 05:42:21 pm »
+5

Hi everyone. Hope your day is going well.
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7861
    • View Profile
Re: Random Stuff Part III
« Reply #2098 on: December 12, 2016, 05:42:59 pm »
+6

Hi everyone. Hope your day is going well.

Don't tell me how to live my day!
Logged

Kuildeous

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3840
  • Respect: +2219
    • View Profile
Re: Random Stuff Part III
« Reply #2099 on: December 12, 2016, 07:39:03 pm »
+2

Hi everyone. Hope your day is going well.

Don't tell me how to live my day!

Well, he didn't tell you to have a good day. He just hoped it happened to be a good day.

Have a good day.
Logged
A man has no signature
Pages: 1 ... 82 83 [84] 85 86 ... 123  All
 

Page created in 0.063 seconds with 21 queries.