Jump to content
Sign in to follow this  
XBear

a quick primer on probability when rolling dice

Recommended Posts

 

Okay I can do the distribution well enough, even to include focus and Target Lock.

 

I can do the distribution on Green Dice, even with focus too.

 

But

A) How do I calculate the odds of both.

X Red Dice to X Green Dice = x%

 

B) How do I add the Evade?

 

A) You change the sign on the distribution of successes on the green dice, and take the convolution sum of the two distributions (with negative results set to 0).

 

B) It depends. If you're interested in just the outcome of a single attack, just add 1 to all the possible results (instead of a minimum of 0 evades, you have a minimum of 1 evade). If you're interested in the value of the evade token across several attacks, it's best to build a computer simulation.

 

 

A) I just add the respective distributions together?

If I have an 82.40% of all three scoring a hit as above.

And a 52% chance of scoring three evades.

 

Together they produce a 30.4% chance of scoring a hit with three dice.

 

B) Well that was simple.

Share this post


Link to post
Share on other sites

 

 

Okay I can do the distribution well enough, even to include focus and Target Lock.

 

I can do the distribution on Green Dice, even with focus too.

 

But

A) How do I calculate the odds of both.

X Red Dice to X Green Dice = x%

 

B) How do I add the Evade?

 

A) You change the sign on the distribution of successes on the green dice, and take the convolution sum of the two distributions (with negative results set to 0).

 

B) It depends. If you're interested in just the outcome of a single attack, just add 1 to all the possible results (instead of a minimum of 0 evades, you have a minimum of 1 evade). If you're interested in the value of the evade token across several attacks, it's best to build a computer simulation.

 

 

A) I just add the respective distributions together?

If I have an 82.40% of all three scoring a hit as above.

And a 52% chance of scoring three evades.

 

Together they produce a 30.4% chance of scoring a hit with three dice.

 

B) Well that was simple.

 

It is slightly more complicated than you are making it seem, because if you get that

  • 0.02% of scoring no hits at all or 1 out of 4096

Then every green roll receives no damage.

 

If the red rolls 2:

  • 16.48% of two of three scoring a hit

Then two evades + three evades receive no damage.

 

You need to do a little bit of a complicated sum to find out the partial results and over-defenses, but your idea is there.

Share this post


Link to post
Share on other sites

 

 

Okay I can do the distribution well enough, even to include focus and Target Lock.

 

I can do the distribution on Green Dice, even with focus too.

 

But

A) How do I calculate the odds of both.

X Red Dice to X Green Dice = x%

 

B) How do I add the Evade?

 

A) You change the sign on the distribution of successes on the green dice, and take the convolution sum of the two distributions (with negative results set to 0).

 

B) It depends. If you're interested in just the outcome of a single attack, just add 1 to all the possible results (instead of a minimum of 0 evades, you have a minimum of 1 evade). If you're interested in the value of the evade token across several attacks, it's best to build a computer simulation.

 

 

A) I just add the respective distributions together?

If I have an 82.40% of all three scoring a hit as above.

And a 52% chance of scoring three evades.

 

Together they produce a 30.4% chance of scoring a hit with three dice.

 

B) Well that was simple.

 

You can't "just" add two distributions. You actually have to take a discrete convolution sum, which in the most technical sense is a double integral.

Fundamentally, you can think of the problem like this: you have two six-sided dice. You roll them and add the two dice together. In order to figure out how likely it is that the answer is (say) 8, you have to figure out all the different ways the dice can get to 8. (I could roll 2 and 6, or 3 and 5, or 4 and 4.) Then you figure out how likely each combination is, and add their probabilities together to get the answer.

The convolution sum is a shortcut through all that labor, as long as you know the complete distribution for both variables. I'd go into it further, but I'm slammed at work today. The Wolfram article is okay, and I'll try to remember to come back to this thread this evening or tomorrow.

Edited by Vorpal Sword

Share this post


Link to post
Share on other sites

I necro'd this thread to give credit to those who contributed. 

 

I used material from this thread in my Algbra 2 classes I teach to help explain Binomial Distributions. I will be using XWM dice to do the experiments in my classes. Here's to hoping it goes well. 

And maybe a few kids get interested in XWM for our school's Wednesday Gaming Club meetings...

Thanks all!

Share this post


Link to post
Share on other sites

So...I was doing a little prep and thought I'd share. I found this work interesting. It's work done for an experiment looking at paints vs. no paints on 4 dice. 

Obviously, the two sets display similar results, although the two graphs display data for different experiments. So, that brings me to my question: 3 dice (comparing hits to misses where a focus counts as a miss; see OP) can create a symmetric distribution (again, see the OP and his work for 3 dice, ignoring the stuff after it as that horse is dead), but 4 do not? I found that curious. Anyone have any observations/thoughts? I am certain I am missing something, but I don't see it. Sorry for the file quality. 

 

Edited by Scopes
Removed file; would not open; and correction

Share this post


Link to post
Share on other sites
1 hour ago, Scopes said:

So...I was doing a little prep and thought I'd share. I found this work interesting. It's work done for a binomial experiment looking at paints vs. no paints on 4 dice. 

Obviously, the two sets display similar results, although the two graphs display data for different experiments. So, that brings me to my question: 3 dice (comparing hits to misses where a focus counts as a miss; see OP) can create a symmetric distribution (again, see the OP and his work for 3 dice, ignoring the stuff after it as that horse is dead), but 4 do not? I found that curious. Anyone have any observations/thoughts? I am certain I am missing something, but I don't see it. Sorry for the file quality. 

Binomial Distributions- 4 XWM Dice.pdf

 

Site says I don't have access to download the PDF.

 

If each die has a 50% chance of occurrence, then the binomial distribution is always going to be symmetric, it is just a question of how many data points there are. With an odd number of dice the binomial distribution has an even numbered length; with an even number of dice the binomial distribution has an odd numbered length.

 

Specifically, the first 5 distributions are:

1 dice: [0.5000    0.5000]

2 dice: [0.2500    0.5000    0.2500]

3 dice: [0.1250    0.3750    0.3750    0.1250] 

4 dice: [0.0625    0.2500    0.3750    0.2500    0.0625]

5 dice: [0.0313    0.1563    0.3125    0.3125    0.1563    0.0313]

 

All are symmetric.

Share this post


Link to post
Share on other sites

 

14 minutes ago, MajorJuggler said:

 

Site says I don't have access to download the PDF.

 

If each die has a 50% chance of occurrence, then the binomial distribution is always going to be symmetric, it is just a question of how many data points there are. With an odd number of dice the binomial distribution has an even numbered length; with an even number of dice the binomial distribution has an odd numbered length.

 

Specifically, the first 5 distributions are:

1 dice: [0.5000    0.5000]

2 dice: [0.2500    0.5000    0.2500]

3 dice: [0.1250    0.3750    0.3750    0.1250] 

4 dice: [0.0625    0.2500    0.3750    0.2500    0.0625]

5 dice: [0.0313    0.1563    0.3125    0.3125    0.1563    0.0313]

 

All are symmetric.

Right, but my work (sorry if it isn't clear) is for 4 dice, paints vs. not paints. I'll try to upload the file again. Not sure why you got that message. 

Binomial Distributions- 4 XWM Dice.pdf

Edited by Scopes
Attempt 2 to upload File

Share this post


Link to post
Share on other sites
33 minutes ago, Scopes said:

 

Right, but my work (sorry if it isn't clear) is for 4 dice, paints vs. not paints. I'll try to upload the file again. Not sure why you got that message. 

Binomial Distributions- 4 XWM Dice.pdf

 

Yeah, still can't get at the link.

 

The first five distributions for any paint are:

1 dice: [0.2500    0.7500]

2 dice: [0.0625    0.3750    0.5625]

3 dice: [0.0156    0.1406    0.4219    0.4219]

4 dice: [0.0039    0.0469    0.2109    0.4219    0.3164]

5 dice: [0.0010    0.0146    0.0879    0.2637    0.3955    0.2373]

 

None of these are symmetrical. You'll only get a symmetrical binomial distribution if you have a 50-50 chance for one result. You can proof this to yourself by deriving the general case binomial distribution from repeated convolution of the same dice result:

 

1 dice: [1-x    x]

2 dice: [(1-x)^2    2x*(1-x)    x^2]

3 dice: [(1-x)^3    3x*(1-x)^2    3x^2*(1-x)   x^3]

 

 

Edited by MajorJuggler

Share this post


Link to post
Share on other sites
2 hours ago, MajorJuggler said:

 

Yeah, still can't get at the link.

 

The first five distributions for any paint are:

1 dice: [0.2500    0.7500]

2 dice: [0.0625    0.3750    0.5625]

3 dice: [0.0156    0.1406    0.4219    0.4219]

4 dice: [0.0039    0.0469    0.2109    0.4219    0.3164]

5 dice: [0.0010    0.0146    0.0879    0.2637    0.3955    0.2373]

 

None of these are symmetrical. You'll only get a symmetrical binomial distribution if you have a 50-50 chance for one result. You can proof this to yourself by deriving the general case binomial distribution from repeated convolution of the same dice result:

 

1 dice: [1-x    x]

2 dice: [(1-x)^2    2x*(1-x)    x^2]

3 dice: [(1-x)^3    3x*(1-x)^2    3x^2*(1-x)   x^3]

 

 

Oh, duh. Of course...yeesh.  We've been using the formula (nCr)(p^r)(1-p)^(n-r), which is the same as what you have above, but only doing it on a "term by term" basis, if that make sense (vs. your expansions). 

Interesting side note: We generated Pascal's Triangle yesterday. My students  spent a few minutes looking (and finding!) some of the patterns hidden within the array. It was a neat review. 

Your values are exactly the same as mine for the paints vs. non paints experiment. If I combine the two experiments, the distribution is symmetrical:

4 dice: [0.0039    0.0469    0.2109    0.4219    0.3164    0.3164   0.4219   0.2109   0.0469   0.0039]

My classes do the hits vs. misses experiment tomorrow as that's the binomial experiment, but I've enjoyed working on the other numbers. It's been a good review of the maths invovled. Thanks for your help!

Edited by Scopes
Got schooled by the master. However, did learn something new.

Share this post


Link to post
Share on other sites
18 minutes ago, Scopes said:

4 dice: [0.0039    0.0469    0.2109    0.4219    0.3164    0.3164   0.4219   0.2109   0.0469   0.0039]

 

Note sure how you're computing that convolution, but it has to be wrong since the sum is equal to 2, not 1!

 

Convolving 4 red dice with focus as blanks, with 4 red dice with focus as hits:

conv([0.0039    0.0469    0.2109    0.4219    0.3164], [0.0625    0.2500    0.3750    0.2500    0.0625]) =

 [0.0002    0.0039    0.0264    0.0977    0.2163    0.2930    0.2373    0.1055    0.0198]

 

What you really want to do is convolve your 4 red dice with the PDF of green dice. The trick is to realize that the first index on a 1-green-die PDF represents a successful evade roll, which counters a successful hit roll. That way when you convolve red dice and green dice, the rightmost indexes represent hits that get through. For example:

1 unmodified green die = [0.3750    0.6250]

3 unmodified green dice = [0.0527    0.2637    0.4395    0.2441]

4 unmodified red dice = [0.0625    0.2500    0.3750    0.2500    0.0625]

 

conv(4 unmodified red dice, 3 unmodified green dice) = 

(0.0033    0.0297    0.1132    0.2372    0.2950    0.2179    0.0885    0.0153)

 

The first three indexes represent negative net hits,. Lumping them into the 4th index (representing  0 hits):

[0.3833    0.2950    0.2179    0.0885    0.0153]

 

By inspection, the last index (4 hits) must be equal to (4/8)^4 * (5/8)^3 =  0.0153, which it is.

Share this post


Link to post
Share on other sites
22 minutes ago, MajorJuggler said:

 

Note sure how you're computing that convolution, but it has to be wrong since the sum is equal to 2, not 1!

 

Convolving 4 red dice with focus as blanks, with 4 red dice with focus as hits:

conv([0.0039    0.0469    0.2109    0.4219    0.3164], [0.0625    0.2500    0.3750    0.2500    0.0625]) =

 [0.0002    0.0039    0.0264    0.0977    0.2163    0.2930    0.2373    0.1055    0.0198]

 

What you really want to do is convolve your 4 red dice with the PDF of green dice. The trick is to realize that the first index on a 1-green-die PDF represents a successful evade roll, which counters a successful hit roll. That way when you convolve red dice and green dice, the rightmost indexes represent hits that get through. For example:

1 unmodified green die = [0.3750    0.6250]

3 unmodified green dice = [0.0527    0.2637    0.4395    0.2441]

4 unmodified red dice = [0.0625    0.2500    0.3750    0.2500    0.0625]

 

conv(4 unmodified red dice, 3 unmodified green dice) = 

(0.0033    0.0297    0.1132    0.2372    0.2950    0.2179    0.0885    0.0153)

 

The first three indexes represent negative net hits,. Lumping them into the 4th index (representing  0 hits):

[0.3833    0.2950    0.2179    0.0885    0.0153]

 

By inspection, the last index (4 hits) must be equal to (4/8)^4 * (5/8)^3 =  0.0153, which it is.

So I <ahem> edited my post to reflect the knowledge gained and correct the error.

 

  

Share this post


Link to post
Share on other sites
16 minutes ago, Scopes said:

So I <ahem> edited my post to reflect the knowledge gained and correct the error.

 

  

 

Rule #1, make sure you can do a discrete convolution by hand for a small number of data points (like a 1 die PDF convolved with 2 PDF). Then you can use clever tricks or a convolution calculator (MATLAB in my case) to compute it faster. Good instruction for your students, understand the basics first even if it's tedious. :)

Edited by MajorJuggler

Share this post


Link to post
Share on other sites

The single statistics are irrelevant without an understanding of the difference between what the two sides are actually probable to roll.

X-Wing butchers probability better than most games in dice design.  X-Wing, emphasizes more heavily than any game I personally know, a structural difference between attack and defence dice.  Then add action economy, and there's no point trying to teach a layman about X-Wing probabilities because no two situations are alike in terms of the modifiers to the attack dice.  What we know is that the modifiers to defense dice don't amount to anywhere near as good the modifiers to attack dice.

This is all you need to know about probabilities in X-Wing: hits are probable, evades are incidental.  The more attack dice, the better you'll feel.  The more evade dice, the greater you're level of disappointment...

There's an app for seeing the probabilities of #of hits and #of evades out on app sales sites.  Go look at what 4 dice with a TL and a focus look like compared to 4 evade dice with a focus and an evade action.  The probable differences are what you need to understand.

Harpoon... ruins... the... game... (in combination with other meta elements like LRS, point cost, etc.).

Share this post


Link to post
Share on other sites
11 hours ago, MajorJuggler said:

None of these are symmetrical. You'll only get a symmetrical binomial distribution if you have a 50-50 chance for one result.

That's the only one actually symmetrical.  Get n large enough for a given p, and it'll be close enough to symmetrical around n*p.  Central Limit Theorem and all.

Damnation, I'm so rusty.  This doesn't really add anything, other than making me me feel like my degree mattered a little today.

Share this post


Link to post
Share on other sites
11 hours ago, theBitterFig said:

That's the only one actually symmetrical.  Get n large enough for a given p, and it'll be close enough to symmetrical around n*p.  Central Limit Theorem and all.

Damnation, I'm so rusty.  This doesn't really add anything, other than making me me feel like my degree mattered a little today.

Are you reading my PMs??? ;-) Scopes and I were just PM'ing about the Central Limit Theorem. Gaussian distributions for the win! Yes, eventually if you convolve enough PDFs together, everything becomes Gaussian and can be approximately described as having a mean and a standard deviation.

Edited by MajorJuggler

Share this post


Link to post
Share on other sites
12 hours ago, heliodorus04 said:

There's an app for seeing the probabilities of #of hits and #of evades out on app sales sites.  Go look at what 4 dice with a TL and a focus look like compared to 4 evade dice with a focus and an evade action.  The probable differences are what you need to understand.

Why download an app to do that when I have already written >10k lines of MATLAB code? :D

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...