Expected value and standard deviation of discrete random variables