In probability theory, the sum of all probabilities must equal one. Whether there are $2$ possible outcomes or $1~000$ possible outcomes of an experiment. When all possibilities are considered and all probabilities are calculated, the total must sum to $1$. This is the underlying principle when discussing discrete random variables.

There are $2$ types of random variables discussed in the IB curriculum. Discrete random variables and continuous random variables. In the A&I SL course, only discrete random variables will be discussed, with the exception of the Normal Distribution. It is natural to ask the question “What does discrete mean?” Discrete refers to the fact that there are a finite number of outcomes. For example, when rolling a fair six sided die, there are a finite number of outcomes, namely $1$, $2$, $3$, $4$, $5$ or $6$. It is not possible to roll a $3.5$ or a $4.29$ or $1$, $276368$… As opposed to the number of different weights a person could weigh. A person could weigh $\rm 46~kgs.$, $\rm 46.1~kgs.$, $\rm 46.001~kgs.$, $\rm 46.0001~kgs.$, and so on. Obviously there are infinitely many weights a person could way. This is an example of a continuous random variable; one in which there are infinitely many possibilities.

Example 1: Consider an unfair die with 6 possible outcomes. The probability distribution of rolling a certain number face up is shown below:

$x$ $1$ $2$ $3$ $4$ $5$ $6$
$\mathrm P(x)$ $\dfrac{2}{20}$ $\dfrac{1}{20}$ $\dfrac{3}{20}$ $\dfrac{3}{20}$ $\dfrac{9}{20}$ $\dfrac{6}{20}$

Clearly, the most likely event to occur is rolling a $5$ and the least likely event to occur is rolling a $2$. However, when all possibilities are considered, the sum is $1$. In other words:

$ \rm P(1)+P(2)+P(3)+P(4)+P(5)+P(6)=1$

Expectation is what you can “expect” to happen in an experiment. In mathematics, the expected value is calculated as the product of each individual probability multiplied by the value of that event occurring. These products are then summed together.

Example 2: Determine the expected value of the previous example of rolling an unfair die.

$x$ $1$ $2$ $3$ $4$ $5$ $6$
$\mathrm P(x)$ $\dfrac{2}{20}$ $\dfrac{1}{20}$ $\dfrac{3}{20}$ $\dfrac{3}{20}$ $\dfrac{9}{20}$ $\dfrac{6}{20}$

$\rm E(x)=1\left(\dfrac{2}{20}\right)+2\left(\dfrac{1}{20}\right) + 3\left(\dfrac{3}{20}\right)$ $+$ $4\left(\dfrac{3}{20}\right)+5\left(\dfrac{9}{20}\right)+6\left(\dfrac{2}{20}\right)$ $\rm E(x) = \dfrac{2+2+9+12+45+12}{20}$
$\rm E(x)=\dfrac{82}{20}=4.1$

Thus, if you were to roll this unfair die, you can expect to roll a $4.1$, or most likely a $4$.