I have a function $s(\omega)$ that is a sum of a function with random numbers $a_m$ and looks something like the following.
$$ s(\omega) = \sum_{m = 1}^{M} f(a_m, \omega) $$ where all the $a_m$ are draws from a probability distribution.
I have the expression of the expectation of the sum when $M \to \infty$ $$ \mathbb{E}\left[\sum_{m = 1}^{M} f(a_m, \omega)\right] = M \int_{-\infty}^{+\infty} f(x, \omega) p(x) dx $$, I changed the parametrization of $x= a_m$ to write the integral.
However, in practical simulations, M is not infinity and in my simulations I suspect that this approximation doesn't give me exact results. That is the reason why I want to model the error in this approximation so that I can use it as a distribution over $g$ to fit it with the average estimate of the sum. Is there an existing way to do this?
========EDIT============
The function $f$ looks like the following
$$ f(a_m, \omega) = \exp({-a_m \omega^2 }) $$
Where $a_m \sim \mathcal{N}(0, \sigma^2)$
Now if I want to know the expected value, I write it as,
$$ \mathbb{E}\left[\sum_{m = 1}^{M}f(a_m, \omega)\right]_{M\to\infty} = M \int_{-\infty}^{-\infty} \exp({-x \omega^2 })\frac{1}{2\pi\sigma^2} \exp({-\frac{x^2}{2\sigma^2}}) dx $$
I hope the notations are clear now a bit. I’m not very confident with statistical terms, so, I say $a_m$ are random draws from a normal distribution and the function is a sum of values of a function that’s computed at these random numbers. For example, it’s a superposition of responses from $M$ different components.