$K$ is a random variable such that $P[K=j] = p_j$ for $j\geq 0$
How do I compute $E_K[\sum_{i=1}^{K}r_i]$ where $r_i's$ are constants.
One way I could think of is brute-force the algebra and write down the whole expression wherein each term corresponds to different values of $k$. Is there any simpler way to do it?
By conditioning on $K =j$ we have
\begin{align*} \mathbf E\left[ \sum_{i=1}^K r_i\right] & = \sum_{j=0}^\infty \mathbf E\left[ \sum_{i=1}^K r_i \, \bigg| \, K = j \right] \mathbf P[K = j] \\ & = \sum_{j=0}^\infty p_j \sum_{i=0}^jr_i. \end{align*}
Without additional information, I cannot see that this can be simplified further.
In the special case that $r_i = r$ is constant, then this simplifies to
$$\mathbf E\left[ \sum_{i=1}^K r_i\right] = r \, \mathbf E [ K]$$
(which is also a simple version of Wald's Lemma)