# Wald's equation for a sum of functions of random variables

Suppose that we have an i.i.d. sequence of random varaible $$(X_n)_{n\in \mathbb{N}}$$, $$M$$ is a stopping time for $$S_n = \sum_{i=1}^n X_i$$, and that all the assumption for the validity of Wald's equations are verified so that

$$\mathbb{E}\left\{\sum_{i=1}^M X_n\right\} = \mathbb{E}\left\{M\right\}\mathbb{E}\left\{X\right\}$$.

If $$f$$ is a continuous, deterministic function so that $$f(X)$$ is always limited, the following

$$\mathbb{E}\left\{\sum_{i=1}^M f(X_n)\right\} = \mathbb{E}\left\{M\right\}\mathbb{E}\left\{f(X)\right\}$$

is valid ??

If the random variable $$f(X_1)$$ is integrable (beware it is not enough to be finite, as your use of the word "limited" may suggest), the sequences $$(f(X_n))_n$$ will still form an i.i.d. sequence of random variables, and $$T$$ will again be a stopping time for the same filtration you started with, so yes, the theorem will apply likewise.