why does the probability function must add up to 1? Let $Y$ be a discrete random variable with the probability function $p(y)$. Then the expected value of $Y$, is define to be $\Bbb{E}(Y) = \sum_y p(y)$
(a) Briefly explain why the sum of all $y$, $p(y) = 1$.
The way I can think about this is problem is by the following : if I have a sample space that has $y = 0,1,2,.. n$, number of events and then corresponging probability of each event must add up to 1 because $1 = p(y_0) + p(y_1)+ p(y_2) + \cdots + p(y_n)$.
Is this correct? or is there a better way to explain it.

 A: Talking in its numerical aspect, the probabilities always add up to $1$.
Why ?
Suppose you have a sample space $S$, and associated events $E_1, E_2, .... $ such that each event has a single outcome in the sample space (that's where I find it easy to explain). Now, the probability of each event will be $P(E_n) = \frac{1}{\text{(Size of}\space S)}$ (remember, each event has only one outcome associated with it as per what we've taken; for easier visualisation, take the case of a coin toss . Sample space $S = \lbrace {H, T} \rbrace$, required events : {possibility of a tail, possibility of a head} . Note that we can take other probabilities as well, for example, $P(\text{Getting either tail or head})$ or $P(\text{Getting none of them})$, but the ones we've taken have only one even associated with each).
Now, if we consider the example in the comment above, we can see that each even has a probability of $\frac{1}{2}$. Summing up the probabilities, we get $1$. This is how we get it:

*

*$P(\text{Getting head}) = \frac{\lbrace H \rbrace}{\lbrace H, T\rbrace}$

*$P(\text{Getting tail}) = \frac{\lbrace T \rbrace}{\lbrace H, T\rbrace}$

*$P(\text{Getting head})+P(\text{Getting tail}) = \frac{\lbrace H \rbrace}{\lbrace H, T\rbrace} \cup \frac{\lbrace T \rbrace}{\lbrace H, T\rbrace} = \frac{\lbrace H, T \rbrace}{\lbrace H, T\rbrace} = P(\text{Getting head or tail}) $
In short , we are summing up all the outcomes (as said in the reply by @RGS ).
Do this example first to understand it properly.
If my math was wrong, sorry. I just did what I can to help you understand/ visualise the concept.
A: If we take the axiomatic definition of probability, then we have
$$P(\Omega) = 1$$
where $\Omega$ denotes the whole space of events i.e. any possible outcome is in $\Omega$.
When you sum through all the values of $y $ you are summing up through all the possible outcomes. That means you are summing through all events in $\Omega $ and as we know (because of our definition of probability), $P(\Omega) = 1$.
