PyCon UK 2025

Bringing Randomness to Life: Building a Python tool to tell stories about stochastic processes
2025-09-20 , Space 2

How do you explain stochastic processes without equations? You show (plot) them!
In this talk, I’ll share my experience facing this question and how it led me to build a Python tool to visualise stochastic processes in a way that builds understanding and communicates behaviour intuitively.


Stochastic processes might sound like an abstract mathematical concept, but they’re all around us—from finance and physics to seismology and epidemiology. To work with them effectively, we need tools that not only help us understand their behaviour but also communicate their dynamics clearly and intuitively.

In this talk, I’ll introduce stochastic processes from a practical perspective, emphasising the role of visualisation as both a tool for gaining insight and for communicating complex ideas. I’ll draw on my experience in two very different but equally relevant contexts:
* As an analyst in the financial industry, I often need had to explain complex models to stakeholders who are far more interested in building intuitive narratives than in mathematical formulae.
* As an educator, I’ve seen the value of visual tools in helping students to build intuition and understanding without getting lost in equations.

The talk will follow the journey from a single exploratory plot—created with Matplotlib, NumPy, SciPy, and a lot of trial-and-error—to the development of aleatory, a Python library for generating beautiful and insightful visualisations of stochastic processes. Along the way, I’ll show how a single visualisation can evolve into a broader framework for telling compelling stories with randomness.

We’ll explore how to simulate and visualise a variety of classic stochastic processes, including random walks, Brownian motion, Poisson processes, and Ornstein–Uhlenbeck models. More importantly, we’ll look at how to bring these processes to life using key visual elements —such as mean paths to show central tendencies, probability envelopes to express uncertainty, and histograms or densities of final values to show convergence or variability. These features help highlight behaviours like mean reversion, long-term drift, or volatility, turning mathematical abstractions into visual stories that resonate.

This talk is for Python developers working with stochastic simulations, educators teaching subjects like probability, statistics or quantitative modelling; data communicators explaining uncertainty to non-technical audiences, and anyone curious about how code can make randomness understandable. Whether you’re teaching, researching, or communicating with stakeholders, Aleatory gives you a way to turn simulations into stories—no stochastic differential equations required. Basic familiarity with Python is assumed, but no prior experience with simulating stochastic processes is necessary.


What level of experience do you expect from your audience for this session?:

Basic

See also:

Dialid is a mathematician and a developer with 9 years of experience as a Quant, currently working in the Front Office Quant team at Bank of America. Her expertise lies in building mathematical models for pricing and risk management, primarily in Python and C++.

She holds a PhD in Statistics from the University of Warwick, where she focused on non-linear stochastic processes, as well as an MSc and BSc in Applied Mathematics from Mexico.

Outside of work, Dialid enjoys creating open-source projects and writing about financial mathematics, programming, statistics, and data visualisation.