Coding a Web App to Simulate the Gambler’s Ruin Problem

How to Code and Deploy a Python Web App using Plotly Dash and Heroku

Claudia Ng
Towards Data Science
5 min readJul 25, 2020

--

I find that simulations are a useful way to understand mathematical concepts, so I recently coded one to illustrate the gambler’s ruin problem. I made a web app to simulate a series of games and their outcomes in Python. In this web app, users define a set of parameters (probability of success per round (p), initial amount (i), goal amount (N) and number of games), and it will return the probability of winning as well as…

--

--