Random Investment $\DeclareMathOperator{\E}{\mathrm{E}}$
An investor has $\$100,000$. When the current interest rate is $i$% (compounded continously so that the growth per year is $e^{i/100}$) she invests her money in an $i$ year CD, takes the profits, and then immediately reinvests the $\$100,000$. Suppose that the $k$th investment has an investment rate of $X_k$% where the $X_k \overset{\mathrm{iid}}{\sim} \operatorname{Uniform}\{1,2,3,4,5\}$. In the long run, how much money does she make per year?
My Thoughts
Modeling this as a renewal process, if I set the reward in the $i$th period $\E r_i$ and the length of the $i$th period, $\E t_i$ equal to $$\E r_i = \sum_{i = 1}^5 100,000(e^{i/100} - 1) \cdot i \approx 56,141.5 \qquad \E t_i = {1 + 2 + 3 + 4 + 5 \over 5} = 3$$ Then by one of our theorem, I should get the long-run rate at which rewards are earned as $${\E r_i \over \E t_i} = 18,713.83 $$ This should be my answer.  Is this a valid approach, or have I overlooked something?
 A: After a long period of time suppose that $n_1$ of the investments were at a rate of $1$% per year, $n_2$ at $2$%, ..., and $n_5$ at $5$%.  Each of the $n_1$ investments lasted $1$ year, each of the $n_2$ investments $2$ years, and so on.  The profit from an investment at $i$% per year, compounded continuously over $i$ years, is $\exp(i/100 \times i) - 1$ times the original capital.  Therefore the total profits taken are
$$\sum_i n_i (\exp(i^2/100) - 1)$$
times the original capital and the time period is
$$\sum_i i n_i.$$
The mean annual profit therefore equals
$$\frac{\sum_i n_i (\exp(i^2/100) - 1)}{\sum_i i n_i}.$$
Because the distribution is uniform, each $i$ eventually occurs $1/5^\text{th}$ of the time.  That is, after a sufficiently large number $n$ of investments, $n_i = (\frac{1}{5} + \varepsilon_i)n$ and all the $|\varepsilon_i|$ can be assumed as small as one likes.  In these terms the mean annual return can be expressed as
$$\eqalign{
\frac{\sum_i (\frac{1}{5} + \varepsilon_i)n (\exp(i^2/100) - 1)}{\sum_i i(\frac{1}{5} + \varepsilon_i)n} 
&=\frac{\sum_i (1 + 5\varepsilon_i) (\exp(i^2/100) - 1)}{\sum_i i(1 + 5\varepsilon_i)} \\
&=\frac{\sum_i  (\exp(i^2/100) - 1)}{\sum_i i}\left(1 + O(\sum_i |\varepsilon_i|)\right).
}$$
Thus, in the long run, because $\sum_i i = 15$ and the last factor converges to $1$, the mean annual return equals $\frac{1}{15}\sum_i  (\exp(i^2/100) - 1)$ times $\$100,000$, which is $\$4017.14$.
As a quick check, let's use R to simulate a million investments (spanning around 2.5 million years):
set.seed(17)
investments <- 1+floor(runif(10^6, 0, 5))
returns <- sapply(investments, function(i) exp(i*i/100)-1)
durations <- investments
100000 * sum(returns) / sum(durations)


4015.56

Pretty close :-).  As a further check, in the spirit of viewing this as a stochastic process, let's look at the deviations between the actual returns and the expected returns during the first $10,000$ investments (because that's at the limit of what can be plotted in detail):
k <- 10^4
time <- cumsum(durations[1:k])
plot(time, cumsum(100000 * returns[1:k]) -4017.14341774 * time, type="l",
     ylab="Deviation from expected total return",
     xlab="Years")


It looks like a random walk with no net trend, supporting the correctness of the theoretically derived answer.
