# Probability

The study of probability is the study of uncertain events.

Probability can study the weather tomorrow, the price of a stock on the stockmarket or the outcome of a throw of dice.

We usually want to study the probability of an outcome.

The possible **outcomes** of a throwing a dice are $$\Tgreen{1}$$, $$\Tgreen{2}$$, $$\Tgreen{3}$$, $$\Tgreen{4}$$, $$\Tgreen{5}$$, $$\Tgreen{6}$$.

In statistics (unlike in everyday language), an event is a collection of one or several outcomes.

A possible **event** when throwing a dice is that the dice shows $$\Tgreen{2}$$.

Another event is that the die shows an even number, in which case the collection of outcomes contains $$\Tgreen{2}$$, $$\Tgreen{4}$$ and $$\Tgreen{6}$$.

The probability that an event $$\Tgreen{A}$$ happens is the percentage of times we observe it if we were to repeat the experiment indefinitely. The probability of $$\Tgreen{A}$$, denoted $$\Torange{P(A)}$$, is a number $$0\le \Torange{P(A)}\le 1$$.

For most exercises in probability, we assume that all outcomes have the same probability. The probability is then $$$\Torange{P(A)} = \frac{\text{Number of outcomes in event }\Tgreen{A}}{\text{Total number of outcomes}}$$$

The event $$A$$ that the number on a dice is even corresponds to $$\Tgreen{\{2,4,6\}}$$. It has $$3$$ outcomes out of $$6$$. So $$P(A)=\Torange{1/2}$$.

The probability that the event $$\Tgreen{A}$$ does not occur is the probability that the complement of $$A$$ happens. It is given by $$P(A') = 1-P(A)$$.

The probability that the dice doesn't show $$\Tgreen{5}$$ is $$\Torange{5/6}$$.

Two events are mutually exclusive if they cannot happen at the same time.

The events that a dice show $$5$$ and that it shows an even number are mutually exclusive. A dice can only show one number at a time and a number cannot be five and even at the same time.

For two **mutually exclusive** events, the probability that either occurs is the sum of the probabilities of the two events: $$$ \Torange{P(A\text{ or }B) =P(A) + P(B)} $$$

The probability that the dice shows either $$5$$ or an even number is $$$P = 1/6 + 1/2 = 4/6 = \Torange{2/3}$$$

The equality only applies if the events are mutually exclusive.

For example, the probability that a throw of a dice gives either $$\Tgreen{5}$$ or an odd number is $$\Torange{1/2}$$, not $$\Torange{2/3}$$, because $$\Tgreen{5}$$ is odd.

Two events are independent if they do not affect one another.

If you throw a dice twice, each outcome is **independent**.

If you have a bag with four balls of different colors and take two balls without replacement, the second ball is **not independent** of the first. If the first ball is blue, the second one cannot be blue.

For two **independent** events, the probability that both occur multiply. $$$ \Torange{P(A\text{ and }B) =P(A) \times P(B)} $$$

If you throw a dice twice, the probability that a first throw shows $$\Tgreen{5}$$ and a second throw shows an even number is $$$P = 1/6 \times 1/2 = \Torange{1/12}$$$

Combined events are events that depend on the combination of different outcomes.

That the sum of two dice is $$\Tgreen{8}$$ is a combined event.

A possibility diagram can help in identifying all the possible combinations of outcomes that are part of the event. We list all the possible outcomes and single out the combined event. We can cross out outcomes that are impossible.

The probability that two dice add up to $$\Tgreen{8}$$ is $$\Torange{5/36}$$. The probability that two numbered tokens add up to $$\Tgreen{8}$$ is $$\Torange{4/25}$$.

The sequence of all outcomes can be represented by a tree diagram. We write next to each branch the probability it happens. The probability of a single outcome is the product of all the probabilities of the branches leading to it. The probability of a combined event is the sum of the probabilities of the single outcomes.

The probability that the two coins show at least one heads is $$\Torange{0.75}$$.