# The probability function

The probability function is the random variable $X$ that associates a probability $p_i$ to every possible value of $X$ $(x_1,x_2,\ldots,x_n)$. We also need: $$\begin{matrix}0 \leq p_i\leq 1 \\ p_1+p_2+p_3+ \ldots +p_n= \sum_{i} p_i=1\end{matrix}$$

Let the random variable $X$ be the result of throwing a dice. Supposing that it has six equiprobable faces, the probabilities of every result are: $$\displaystyle p(X=1)=P(X=2)=\ldots=P(X=6)=\frac{1}{6}$$ It is possible to prove that we have $$\displaystyle \sum_{i} p_i=6 \cdot \frac{1}{6}=1$$ The graph of the above mentioned function is a bar chart: