Expectation is an average, which can be similarly understood as a weighted average. The probability corresponding to x is its weight, so ex is the sum of all xi×pi. Dx is a kind of variance, that is, the weighted average of X deviation, and the square (xi-ex) of each is multiplied by the sum of the corresponding pi. There is another skill formula to remember between dx and ex, that is, DX = E (the square of X)-(the square of EX).
It should be noted that the expected value is not necessarily equal to the common sense "expectation"-"expected value" is not necessarily equal to every result. The expected value is the average of the output values of variables. The expected value is not necessarily contained in the set of output values of variables.
The law of large numbers stipulates that as the number of repetitions approaches infinity, the arithmetic average of numerical values almost inevitably converges to the expected value.