Calculates the expected value as Σ(value × its probability), together with the variance and the standard deviation. The probabilities must add up to 1.
Explanation
The expected value is the average of outcomes weighted by their probabilities. Multiply each value by the chance of getting it and add everything up.
E[X]=i∑xipi=x1p1+x2p2+⋯+xnpn
Think of it as the average per trial if you repeated the experiment many times. The variance and standard deviation come with it.
V[X]=i∑pi(xi−E[X])2
Example
Take a loaded die where 1 and 2 each come up with probability 0.1, while 3 through 6 each come up with probability 0.2.