mam, expectation gives weighted sum. Suppose, you have sample input as $1,1,1,1,3,3,5,5,5$ then expected value will be $1*\frac{4}{8} + 3*\frac{2}{8} + 5*\frac{3}{8}$ which is also a mean.
Now, Suppose, random variable is $X$ Then
Standard Deviation(X) = $\sqrt{Var(X)}$ = $\sqrt{E(X^{2})-[E(X)]^{2}}$ which is not equal to E(X) or mean generally.