Suppose we have a random variable $X$ and a smooth function $g$. We want to calculate the expectation value $\mathbb{E}(g(X))$. To be able to write down at least an approximate solution, we perform a Taylor expansion $g_T$ of $g$ up to second order around the mean of $X$ and use $\mathbb{E}(g_T(X))$ as the approximation.

Now, what would be a reasonable estimate of how good this approximation is? Or an estimate that tells me for which $X$ the truncation after second order is justified?

Whereas for a real valued function this is clear, in this case I am looking for an adequate statistical dispersion measure. I have simulation data, so can I could actually calculate the measure and then want to make an appropriate approximation to get an analytical insight into my system.