What does the term "expected value" mean?
For real life data the mean of the frequency distribution is calculated by the formula
for a probability distribution the expected value is the corresponding calculation; the theoretical mean if you like.
For discrete distributions
for continuous distribution
in both cases since the total probability is