### Advent

## Character Flaws

**by Paul Mitchener**

Aug 15,2005

# Methods of Campaign and Adventure Design 11

By Paul Mitchener

## Elementary Probability Theory

In this column I want to look at some of the basics of probability theory. Although not directly relevant to adventure and campaign design in a role-playing game, the issues that I will examine are highly relevant to the design of systems, and to making predictions as to how systems are likely to behave in actual play.

I do not plan to be excessively technical, but anyone with a complete phobia of mathematics might want to stop reading now. And leave some feedback telling me to stop what I am doing. Otherwise, feedback allowing, I plan to write further about probability theory in the next two columns. Normal service will then resume.

## Discrete Random Variables

We begin with a slightly intimidating formal definition. A *discrete
random variable*, X, is a function which assigns to numbers in a certain
set of values {a,b,c,... } various *probabilities* P(X=a), P(X=b), P(X=c),... Each probability is a number between zero and one,
and the sum of these probabilities must be equal to one.

Fortunately, in the context of RPGs, random variables are often quite simple. For example, if X is the random variable associated to a die roll of d6, then the set of values is of course {1,2,3,4,5,6}, and the probability associated to each value (assuming the die is fair) is 1/6.

More generally, given an N-sided die (ie: a dN), the range of possible values is {1,2,3,...,N}, and the probability associated with each value is 1/N.

## Expectations

The *expectation* of a random variable is what we expect the average of
the random variable to be over many different tests. Formally speaking, let X
be a random variable with set of values {a,b,c,...}. Then the expectation is
defined by the formula

E(X) = aP(X=a) + bP(X=b) + cP(X=c) + ...

If our random variable is an N-sided die, then it is easy to calculate that the expectation is equal to (N+1)/2.

## Standard Deviation

*Standard deviation* is a measure of how much values of a random variable
tend to differ from the expectation. Roughly speaking, a random variable's
standard deviation measures how random it is. For example, a `random variable'
with standard deviation equal to zero is always equal to its expectation, and
so not random at all.

To be precise, given a random variable X with set of values {a,b,c,...} and
expectation m=E(X), the
*variance* is given by the formula

var(X) = (a-m)^2 P(X=a) + (b-m)^2 P(X=b) + (c-m)^2 P(X=c) + ...

Actually, a little algebra (which I will not do here) gives us the slightly more convenient formula

var(X) = (a^2 P(X=a) + b^2 P(X=b) +c^2 P(X=c ) + ...)-m^2

The standard deviation is equal to the square root of the variance. Given an N-sided die, we can compute (not completely without difficulty) that the variance is given by the surprisingly simple expression

(N^2-1)/12

and the standard deviation is the square root of this number. To be still more precise, to one decimal place, the standard deviation of a d6 is 1.7, the standard deviation of a d10 is 2.9, and the standard deviation of a d20 is 5.8.

As we will see in next week's column, these standard deviations are quite high compared to those of random variables with similar sets of values coming from adding several dice together.

## Wrapping Up

Next column I want to look at how to calculate expectations and standard deviations in more complicated examples, and to see what happens when more than one random variable is present. However, feedback is highly appreciated, and could easily make me change my mind. In particular, I would be interested to hear if what I am doing is too simplistic or too complicated.

TQo0~^DҒt< ek&Ǿ$\۵ZFȃuwݝIŃU QYir2HR2.u3MFoعq]4#A`pP5(b&)b)ⰾp7(i<[-2gL#5[f g?*rVGf8*)s'+20ϟ̑F}KB<7wSL\gbvm9WiRބYŜvdy0'p2I_Fc2>#oA )VL[Qk?3`)<У[(*W.JH ?tXCt谙 X:@ \0w~LqĤE-rFkYj4q 5AQ6[AxG [>w|?( fХθY䝛$c=_qNĦoǸ>O_|&/_Mi7"宥CЧk0dӷLh;TmuCGU-!Ul{ h<\bQX.~"O2*yPcz!Gg### What do you think?

Go to forum!\n"; $file = "http://www.rpg.net/$subdir/list2.php?f=$num"; if (readfile($file) == 0) { echo "(0 messages so far)"; } ?>

### Previous columns

- The Campaign Proposal by Paul Mitchener, 22dec05
- Elementary Probability Theory 3 by Paul Mitchener, 26oct05
- Probability Theory 2 by Paul Mitchener, 20sep05
- Character Flaws by Paul Mitchener, 15aug05
- World-Hopping Campaigns by Paul Mitchener, 14jun05
- Puzzles and Mysteries by Paul Mitchener, 19apr05
- Enemies by Paul Mitchener, 15mar05
- Tinkering with the System by Paul Mitchener, 20jan05
- The Big Bad City by Paul Mitchener, 24dec04
- Social Advantages by Paul Mitchener, 17nov04
- Character Flaws by Paul Mitchener, 19oct04
- Designing a Fantasy Campaign by Paul Mitchener, 15sep04
- Background by Paul Mitchener, 23aug04
- Introduction by Paul Mitchener, 28jul04

### Other columns at RPGnet

TQo0~^DҒt< ek&Ǿ$\۵ZFȃuwݝIŃU QYir2HR2.u3MFoعq]4#A`pP5(b&)b)ⰾp7(i<[-2gL#5[f g?*rVGf8*)s'+20ϟ̑F}KB<7wSL\gbvm9WiRބYŜvdy0'p2I_Fc2>#oA )VL[Qk?3`)<У[(*W.JH ?tXCt谙 X:@ \0w~LqĤE-rFkYj4q 5AQ6[AxG [>w|?( fХθY䝛$c=_qNĦoǸ>O_|&/_Mi7"宥CЧk0dӷLh;TmuCGU-!Ul{ h<\bQX.~"O2*yPcz!Gg