# 1.7. Probabilities Add Up to 1

Last updated: May 26th, 2020
In [1]:
import pandas as pd

# Probabilities Add Up to 1¶

Another important property we are going to learn is that the probabilities of events that make the whole sample space will add up to $1$. For example:

In [2]:
dataset =  pd.DataFrame({
'Person #':[1,2,3,4,5,6,7,8,9,10],
'City':['SF','SF','NY','NY','NY','SF','NY','SF','SF','SF'],
'Age':[41,26,28,53,32,51,65,49,25,33]
})
dataset
Out[2]:
Person # City Age
0 1 SF 41
1 2 SF 26
2 3 NY 28
3 4 NY 53
4 5 NY 32
5 6 SF 51
6 7 NY 65
7 8 SF 49
8 9 SF 25
9 10 SF 33
In [3]:
dataset.sample(1)['City'].values[0]
Out[3]:
'SF'

In this experiment, if we think of the events $E=$ "the person chosen is from SF" and $F=$ "the person chosen is from NY", we can notice that toghether they make the whole sample space $\Omega=\{SF,NY\}$.

So, even though we don't know yet how much each probability is, we can tell that: