Random Variable
A random variable is a function that assigns a real number to each outcome of an experiment.
Expected Value
Suppose the random variable x can take on the n values x1,x2,x3,……..xn.
Also, suppose the probabilities that values occur are, respectively,
P1.P2,……….Pn. Then the expected value of the random variable is
E(x) = x1 p1 + x2p2+……..xnpn.