# Elements of Probability: Sample space and Events

Since statistics and probability are the backbone of Data science, it is important that we understand the basics first.

**Sample space and events:**

Consider an event whose outcome is not predictable with certainty in advance. Although the outcome of the experiment will not be known in advance, let us suppose that the set of all possible outcomes is known. This set of all possible outcomes of an experiment is know as the **sample space** of the experiment and is denoted by **S**.

Eg: If the outcome of an experiment consists in the determination of sex of the new-born child then,

S={g,b}

where outcome g means girl and b means boy.

If the experiment consists of outcomes of values we get on rolling a die,

then S={1,2,3,4,5,6}

Any subset E of the sample space is known as Event. In proper definitions, Event is the set of the possible outcomes of the experiment.

Eg: E={g} then E is the event of the occurrence of a girl child while F={b} is the event of occurrence of a boy child.

Similarly, E={all even outcomes} is an event of the second example.

For any two events E and F of a sample space S,

EUF is called the union of E and F which consists of all the outcomes that are present either in E or F or in both. That is it will occur if either E or F occurs.

From the first example, EUF= {g,b} would be the whole sample space

Similarly for any two events E and F,we may also define event EF called the intersection of E and F,to consist of all outcomes that are both in E and F. Event EF will only occur if both E and F occur.

Eg: Taking the second example of rolling a die, let us assume E={all prime outcomes} and F={all even outcomes}. Thus EF={2} since 2 is the only common element in both the sets.

E={all even outcomes} , F={all odd outcomes} , Here, the event of EF= null implying that both E and F cannot occur. In such cases E and F are said to be **mutually exclusive.**

E^c is the complement of any event E. That is it only occurs only if event E doesn’t occur. Lets take the first example of S={b,g}. if E={b} then E^c={g}. Also note that the experiment must result some outcome then S^c= null.

For any two events E and F, if all the outcomes in E are also in F then we say that E is contained in F or E is the subset of F( ECF) and if E and F are identical then E=F.