## Probability 101

The probability of flipping heads (with a theoretically perfect coin) is 0.5 (50%). We pretend that the coin is perfect, and the flip will be fair, and the coin can't land on its edge. These are assumptions that are pretty close to reality. And thus, probability begins to describe the real world. What is the probability of rolling a 7 with two dice? Here is how that is calculated ("die" is the singular of "dice"):

```    first die:  1  2  3  4  5  6
------------------
second: 1   2  3  4  5  6  7
2   3  4  5  6  7  8
3   4  5  6  7  8  9
4   5  6  7  8  9 10
5   6  7  8  9 10 11
6   7  8  9 10 11 12```

As you can see, there are 36 possible rolls of the two dice. These are all equally probable (P=1/36=0.0278 rounded off). And there are 6 ways to roll 7. The probability of rolling 7 is 6/36 or 0.1667. This illustrates the very basics of probability. When we have y (36) equally likely results, and we want to know the probability that a subset of x (6) of them will occur, then P=x/y. That is the definition of P, the probability that something will happen. The probability that A will happen is written P(A). We can write the probability of rolling a 7 as P(rolling 7)=0.1667.

We have a few simple rules:

1. The probability that an impossible event (such as rolling 21 with two dice) will happen is 0.
2. The probability of an event which must happen (such as flipping either a head or a tail) is 1.
3. The probability that A or B will happen is P(A)+P(B)-P(A and B).
4. If A and B are mutually exclusive (cannot both happen at the same time), then P(A or B)=P(A)+P(B).
5. The probability of not A is 1-P(A).
6. If A and B are independent (do not effect each other, like separate flips of a coin), then P(A and B)=P(A)P(B), and vice versa (if the equation is true, then A and B are independent).

To illustrate the third rule, the probability of rolling either a 7 or a 4 is 6/36+3/36=0.25. Rule 5 can be illustrated by the probability of not rolling a 7, which is 1-6/36=0.8333. Rule 6 can be illustrated by this: the probability of rolling a 4 on the first roll of the dice, and a 7 on the second roll of the dice is (6/36)(3/36)=0.0138.

Those are the basics.