Magnitude of non-ergodicity effect on the individual's risk of bankruptcy Dr. Ole Peters presents the concept of (non-)ergodicity with the following gambling example:
You're given $\$100$ to play a game where you toss a coin once a minute. If it comes up heads, you win $50\%$ of your wager, while you lose $40\%$ if tails. Averaging over $1$ million sequences (or players) results in the plot on the left below, which shows this is a favorable game:

This is the ensemble perspective, or the idea of parallel worlds, which do not apply to the individual, who can go broke (absorbing states), and drop out of the game. Considering longer time sequences, the average over time ($1$ year) will also get rid of the noise, and result in the plot to the right above.
I am having problems reproducing these plots in R. The idea is there, but the drop is much more rapid in the time perspective plot:


Is there a much more rapid bankruptcy tendency for the individual player than led to believe by the plots on the talk? Or is it simply differences in the frequency and length of sampling in the original code from the lecture, which is not shared, as for example, less sampling points along the time line?

# ENSEMBLE PATTERN:

sam = 60                     # Sixty samples (1 per minute)
mat = matrix(0, sam, 10^6)   # The experiment is repeated 1 million times
  for (i in 1:10^6){  
    mat[1,i] = 100           # Each time the money wagered is $100
    for(j in 2:(sam-1)){     # H's wins 50% tails loses 40%
        mat[j,i] <- mat[j - 1,i] * sample(c(1.5,0.6), 1)
    }
}
plot(rowMeans(mat), type='l', main = 'Ensemble perspective', ylab='Dollars', xlab='Trials', col = 3)


# TIME PATTERN:

set.seed(0)
s = 100                       # Initial money gambled
samples = 60 * 24 * 30 * 12   # Samples at 1 per minute during 12 months
vec = 0                       # Empty vector
vec[1] = 100                  # Starting at $100
for (i in 2:samples) vec[i] <- vec[i - 1] * sample(c(1.5,0.6), 1)
plot(vec, type='l', main = 'Time perspective', ylab='Dollars', xlab='Trials', col = 2)

 A: Ole Peter's presented the same material here with minimal changes, and I tried again to replicate the code, forgetting that I had posted this question until I searched for references to Ole Peter's ergodicity in SE.
This time the code did work out to reproduce the idea, so why not share it? Here it is.
And these are the pertinent plots:
The first one corresponds to the plot to the left in the OP, showing the individual trajectories of the first $23$ individuals of an ensemble of $1$ million subjects. The pointwise average for the ensemble corresponds to the return expectation $$\frac 1 2\left(1.5 + 0.6  \right)=1.05$$
or $5$ percent: $100 (1.05)^{60}=\$1,868.$
In black the noise for the ensemble average is smoothed out using $1$ million subjects.


For the second plot I had to reduce the number of tosses from $12$ months ($518400$) to $10,000$ to avoid computationally zero values, and plotted the individual timeline of $10$ subjects:

This consistent loss over time "reflects the multiplicativity of the process", with $10$ percent loss every two rounds: $1.5 \times 0.6 = 0.9,$ or $5$ percent per round.
