3
2 Comments

Simulating and animating random walks in Python

Hi guys,

wondering how to simulate and make an animated visualization of random walks in Python. I've written a blog post on it. Check it out if you are curious!

Why random walk?

It is the foundation of many stochastic processes like the Brownian Motion which is the basis for stochastic calculus. If you are interested in these topics you should learn first the simple random walk.

Why Python?

It offers many scientific packages like SciPy, NumPy, etc. Thus, it is very straightforward to program some of these phenomena.

Why animated?

Instead of serving static charts, we can use an eye-catching animation to emphasize and more efficiently transfer the message we would like to send. This comes quite handy for time-series data. This is easily done with Matplotlib Animation API.

Here is the source code

Question for you

Have you been using or working with some of these math phenomena in Python? Have you made some cool math animations or visualizations?

I would love to see, learn, and discuss more about this. Please do share!

posted to Icon for group Developers
Developers
on April 23, 2020
  1. 2

    If someone is interested there is also MIT course 6.0002 that I recently watched where they talk about random walks. Here is a link https://www.youtube.com/watch?v=6wUD_gp5WeE&list=PLUl4u3cNGP619EG1wp0kT-7rDE_Az5TNd

    1. 2

      Thank you for sharing! I will watch this video and will share my impressions.

Trending on Indie Hackers
Three Days Before Launch, I Let My Own Tool Tear Me Apart User Avatar 37 comments I thought I was building a news visualization tool. Users thought it was a catch-up tool. User Avatar 34 comments Priorities for launching a SaaS solo, with no budget User Avatar 31 comments I Rejected a $15K Acquisition Offer for My Multi-Agent IDE — Here's the Full Breakdown User Avatar 28 comments A pattern I keep seeing in EdTech: traffic isn't usually the problem. User Avatar 23 comments What Happens When a Photo Can Carry Multiple Voices? I Built VoxPho to Find Out User Avatar 15 comments