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.

The expectation
$$
\mathbb E\left[\sum_{i=1}^{\lfloor\tau\rfloor} Y_i\right]=\mathbb E\left[\sum_{i=1}^{\infty} \mathbb I_{\tau\ge i} Y_i\right]$$simplifies into
$$Y_1\underbrace{\mathbb P(\tau\ge 1)}_{=1}+Y_2\mathbb P(\tau\ge 2)+\cdots+Y_N\underbrace{\mathbb P(\tau=N)}_{=0}$$
and since the $Y_i$'s are known, only the cdf of $\tau$ need be approximated by Monte Carlo, if I understand correctly, resulting in
$$Y_1+Y_2\hat{\mathbb P}(\tau\ge 2)+\cdots+Y_{N-1}\hat{\mathbb P}(\tau\ge N-1)$$
where $\hat{\mathbb P}$ denotes the empirical distribution. The magnitude / dimension of the $Y_i$'s thus does not impact the Monte Carlo effort.
