Expectation of random sum of non-random numbers I have a continuous random variable $\tau$ and I want to evaluate
$$
E\left(\sum_{i=1}^{\lfloor \tau \rfloor} Y_i\right),
$$
where $Y_i$ are known, non-random, and $\lfloor . \rfloor$ is the floor function. If $Y_i$s were iid I know I could use Wald's equation, for instance, but that is not the case. I am able to solve this through Monte Carlo, as I can simulate different $\tau$s. However, this will be very time-consuming since $Y_i$ can be big and the Monte Carlo samples can be large. It would be significantly easier if I could approximate the expectation above with
$$
\sum_{i=1}^{\lfloor E(\tau) \rfloor} Y_i.
$$
Is there a theoretical guarantee of this approximation?
Note on support: The vectors $Y_i$ are typically not large in magnitude, but they can be large in dimensions. The domain of $\tau$ is fixed to be $(1,N)$, where $N$ is known in advance, and it is unimodal.

Let me change a little notation (so we use uppercase for random variables)
We want $E[Z]$ where
$$Z = \sum_{i=0}^{\lfloor T \rfloor} a_i = \sum_{i=0}^\infty a_i h(T-i) \tag 1$$
where $h()$ is the Heaviside step function. We assume $T$ is continuous, non-negative, with density $f_T$ and CDF $F_T$. Let $G(t)=P(T>t)=1-F_T(t)$
Then
$$E[h(T-i)]=P(T > i) = G(i) \tag 2$$
and
$$E[Z] = \sum_{i=0}^{\infty} a_i G(i) \tag 3$$
We know $E[T]=\int_0^{\infty} g(t) dt  $. This suggests that your approximation is fair only when the $a_i$ are (almost?) constant and $f_T$ is quite smooth.
Edit: alternatively, using summation by parts
$$E[Z] = \sum_{i=0}^{\infty} g_i A(i) \tag 4$$
where $g_i = P( i \le T < i+1)$ (probability mass function of $\lfloor T \rfloor$ ) and $A_i=a_i + a_{i+1}$
