Statistics, Statistical Analysis, Normal Distribution, Central Limit Theorem, Cdf.
The loop that repeats the simulation R times for i in range(R): # The same code as before to generate the money after N rolls rolls = np.random.choice(outcomes, size=N, p=[p] * n) money = [M] for roll in rolls: if roll == 6: money.append(money[-1] + w) else: money.append(money[-1] + l) # The final