## Probability theory

I want to go through some probability theory with you before going on with different distributions of the data. When you are working with distributions, you are dealing with probabilities. I’ll elaborate on this subject under the binomial and multinomial distribution.

You don’t have to worry; it is quite easy to work with probabilities. I’ll illustrate this using the classical heads or tails example. The probability of getting a head or tail at a coin toss is 0.5. But what if you want to calculate the probability of getting a head AND a head in two tosses where the probability of a head in every single toss is 0.5. How to calculate this?

You can use a very simple principle. You simply multiply the probability (*p*) of getting a head with getting a head; 0.5 x 0.5 = 0.5^{2} = 0.25. The magic word here is AND. AND means multiply. Of course the probability has to be lower than getting a Head once since there is a 50 % chance to get a Tail in the next toss. To do this, you multiply to get the probability of getting the same outcome (e.g. Heads or Tails) a specific number in a row. This can be expressed *p ^{n}*, where

*p*is the probability of the outcome (Heads or Tails) and

*n*is the number of times in a row you get this outcome as a result.

But, how a about getting a Head OR a Tail in every single toss? It is very simple when you think about it; it is the sum of the probability of getting a Head and a Tail, which is 0.5 + 0.5 = 1. The probability of getting either a Head OR a Tail is 1 or 100 %. Right? So when the outcome does not matter, or when you calculate the probability of getting several types of outcomes, you add the probabilities. The magic word in this case is OR.

**Example 1**

You are tossing a dice and want to calculate the probability of getting a 2 five times in a row. That is a 2 AND a 2 AND a 2, etc.

First, you need to calculate the probability of getting a 2. A dice has six sides. So the probability of getting one of the sides is or about 0.17. So the probability of getting a 2 is .

Second, to calculate the probability of getting a side with a 2 five times in a row, you multiply the probability of getting a two in a single toss ( ) by 5 (the number of tosses.) That is , which equals 0.0001.

**Example 2**

What is the probability of getting more than 4 in a single toss with the dice? That is a 5 OR six.

First you need to calculate the probability of getting one of the sides. That is ( ) as in the previous example.

Then sum the probabilities of the sides of the side with more than 4. That is two sides, the ones with 5 and 6. The result is or 0.33.

**Important to remember**

(1) When you calculate the probability of the same outcome several times in a row (Heads AND Heads) you multiply.

(2) When you calculate the probability of different outcomes at the same event (or toss), Heads OR Tails) you add.