## 1.3.1 Random Experiments

Before rolling a die you do not know the result. This is an example of a random experiment. In particular, a random experiment is a process by which we observe something uncertain. After the experiment, the result of the random experiment is known. An outcome is a result of a random experiment. The set of all possible outcomes is called the sample space. Thus in the context of a random experiment, the sample space is our universal set. Here are some examples of random experiments and their sample spaces:

• Random experiment: toss a coin; sample space: $S=\{heads, tails\}$ or as we usually write it, $\{H,T\}$.
• Random experiment: roll a die; sample space: $S=\{1, 2, 3, 4, 5, 6\}$.
• Random experiment: observe the number of iPhones sold by an Apple store in Boston in $2015$; sample space: $S=\{0, 1, 2, 3, \cdots \}$.
• Random experiment: observe the number of goals in a soccer match; sample space: $S=\{0, 1, 2, 3, \cdots \}$.

When we repeat a random experiment several times, we call each one of them a trial. Thus, a trial is a particular performance of a random experiment. In the example of tossing a coin, each trial will result in either heads or tails. Note that the sample space is defined based on how you define your random experiment. For example,

Example
We toss a coin three times and observe the sequence of heads/tails. The sample space here may be defined as $$S = \{(H,H,H), (H,H,T), (H,T,H), (T,H,H), (H,T,T),(T,H,T),(T,T,H),(T,T,T)\}.$$

Our goal is to assign probability to certain events. For example, suppose that we would like to know the probability that the outcome of rolling a fair die is an even number. In this case, our event is the set $E=\{2, 4, 6\}$. If the result of our random experiment belongs to the set $E$, we say that the event $E$ has occurred. Thus an event is a collection of possible outcomes. In other words, an event is a subset of the sample space to which we assign a probability. Although we have not yet discussed how to find the probability of an event, you might be able to guess that the probability of $\{2, 4, 6 \}$ is $50$ percent which is the same as $\frac{1}{2}$ in the probability theory convention.

Outcome: A result of a random experiment.
Sample Space: The set of all possible outcomes.
Event: A subset of the sample space.

Union and Intersection: If $A$ and $B$ are events, then $A \cup B$ and $A \cap B$ are also events. By remembering the definition of union and intersection, we observe that $A \cup B$ occurs if $A$ or $B$ occur. Similarly, $A \cap B$ occurs if both $A$ and $B$ occur. Similarly, if $A_1, A_2,\cdots, A_n$ are events, then the event $A_1 \cup A_2 \cup A_3 \cdots \cup A_n$ occurs if at least one of $A_1, A_2,\cdots, A_n$ occurs. The event $A_1 \cap A_2 \cap A_3 \cdots \cap A_n$ occurs if all of $A_1, A_2,\cdots, A_n$ occur. It can be helpful to remember that the key words "or" and "at least" correspond to unions and the key words "and" and "all of" correspond to intersections.

 The print version of the book is available on Amazon. Practical uncertainty: Useful Ideas in Decision-Making, Risk, Randomness, & AI