Figure 1: 10 sample episodes showing extreme volatility.
Ideal vs. Constrained
Scenario A: Infinite
Theoretical Success: With infinite capital, EV converges to +$80. However, the risk (std dev) diverges, requiring infinite variance to secure the win.
Scenario B: Limited
Systemic Failure: A "hard stop" of $256 (8 consecutive losses) activates Gambler's Ruin. The cost of recovery quickly exceeds the system's error budget.
// Analytical Insight
The "Median Trap" & Fat Tail Risks
• Mode 1 (65.6%): Small Win (+$80)
• Mode 2 (34.4%): Catastrophic Loss (-$256)
Figure 5: The deceptive Median (P50)
Technical Implementation
To model 1,000 independent episodes effectively, I utilized NumPy to construct a state_matrix (1000, 1001). Instead of running nested loops (O(N²)), the simulation calculates wager outcomes across the entire episode axis simultaneously.