my question is
Why multiply f(x)?
If $M$ is some discrete R.V., then $E[M]$ is the sum of all the different values $M$ can take, weighted by the probabilities. So $$E[M]=\sum_m m\times P(M=m)$$Here, $m(x)$ is some continuous distribution, so the sum is replaced by an integral.
Copyright © 2021 JogjaFile Inc.
If $M$ is some discrete R.V., then $E[M]$ is the sum of all the different values $M$ can take, weighted by the probabilities. So $$E[M]=\sum_m m\times P(M=m)$$Here, $m(x)$ is some continuous distribution, so the sum is replaced by an integral.