The expected value of a variable X is a generalization of the mean of said value.1 In other words, it is the weighted mean.

In the discrete case, consider a set of data X = {x_1, ..., x_N} where p_i represents the probability of x_i occuring. Here the expected value is:

\mathbb{E}[X] = \sum_{i = 1}^N p_i x_i

1

Wikipedia contributors. (2021, March 17). Expected value. Wikipedia. https://en.wikipedia.org/wiki/Expected_value