Jump to content
IGNORED

Intentional bias in random numbers


senior_falcon

Recommended Posts

While looking at an old program listing (Chateau Gaillard by Tim Hartnell) I came upon this:

X=RND*6+RND*6+RND*6

This struck me as odd: why not just use X=RND*18?

It turns out that the first example heavily biases the random number toward the middle of the range. There are many more ways to get numbers around the middle than there are ways to get numbers at the low and high extremes. If it is INT(RND*6)+INT(RND*6)+INT(RND*6) there is only 1 way to get a 0 or 15; 3 ways to get a 1 or 14; 6 ways to get a 2 or 13; 10 ways to get a 3 or 12, and so on.

 

 

  • Like 2
Link to comment
Share on other sites

It's not BIAS, it's simply a different distribution.

 

Putting aside for a moment if RANDOM itself is totally RANDOM or only PSEUDORANDOM, the 18*RANDOM literally only shows a uniform distribution, while the 6*RANDOM+6*RANDOM+6*RANDOM gives you a bell curve 3d6+curve.gif

 

It has nothing to do with BIAS it's simulating different phenomena, the first is a roll of a fair 18-sided dice (if there was such a thing) the second is the sum of 3 rolls of a fair 6 sided dice (or the sum of a roll of 3 fair 6 sided dice at once if you prefer), different distributions.

 

For more dice it gets flatter relatively speaking.

 

500px-Dice_sum_central_limit_theorem.svg

  • Like 4
Link to comment
Share on other sites

The distribution issue is a big part of why the twenty-sided die was used in Dungeons & Dragons. The early game designers knew six-siders could never give them a greater range because adding more dice simply creates the bell curve of values, skewing results towards the middle values. (One game system that uses this to good effect is GURPS, where skills and checks are done on 3d6, and the average skill is 10.)

 

I read a story awhile back that they got twenty-siders because Dave Arneson had been to Great Britain with his parents and he had picked up several mini d20's at a hobby shop there as a curiosity. The big issue that TSR had in the early days was finding a supplier who could get them dice; they eventually found it in a toy company that made plastic dice in different shapes for kids. Which is where the other poly-sided dice came from, they figured, why not use all of them?

  • Like 1
Link to comment
Share on other sites

While looking at an old program listing (Chateau Gaillard by Tim Hartnell) I came upon this:

X=RND*6+RND*6+RND*6

This struck me as odd: why not just use X=RND*18?

It turns out that the first example heavily biases the random number toward the middle of the range. There are many more ways to get numbers around the middle than there are ways to get numbers at the low and high extremes. If it is INT(RND*6)+INT(RND*6)+INT(RND*6) there is only 1 way to get a 0 or 15; 3 ways to get a 1 or 14; 6 ways to get a 2 or 13; 10 ways to get a 3 or 12, and so on.

As others point out, D&D had many exotic dice that could have rolled linear random numbers, but when it came to character attributes, the idea was you didn't want many characters to be too exceptional or too weak. so you'd role a 6 sided die 3x to determine states along a bell curve. So rolling a 6 sided die 3x was the standard way to determine your characters Strength, Intelligence, Dexterity, etc.

Link to comment
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.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...