Main idea: Expected value is the theoretical average of outcomes of a random variable. Expected value does not determine anything itself, but rather describes a model’s long-term tendency towards a value. In short, it is just an expectation.
For example, if we were modeling the number of heads in n coin tosses, we would expect n/2 heads. Obviously this does not mean that we will obtain n/2 heads, but over a large number of trials, we can expect a value that approximates it. The following slides shows code in R, a statistical programming language, that models coin flipping along with a graph of the results from hundred random trials with a line depicting expected value.