cd /news/ai-tools/a-random-variable-visualizer · home topics ai-tools article
[ARTICLE · art-56688] src=terrytao.wordpress.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

A random variable visualizer

Terry Tao used a modern coding agent to build a random variable visualizer app in a few hours, turning a 2016 blog post proposal into a working tool that animates probabilistic concepts like Berkson's paradox. The app compiles a custom programming language to display random variables as animated scatterplots or numerical readouts, serving as a visual aid for understanding independence and conditioning.

read1 min views1 publishedJul 13, 2026
A random variable visualizer
Image: Terrytao (auto-discovered)

With the advent of modern coding agents, many visualization projects that I had proposed in the past, but dropped due to the time and complexity of the coding portion of the task, have now become relatively feasible, in that a reasonable quality prototype (suitable for non-mission-critical tasks such as providing secondary visual aids, where it is not absolutely necessary that the product is 100% bug-free) can now be generated in a matter of hours using such tools. I don’t immediately plan to work on my entire backlog of such projects, but I did spend a few hours this weekend on one such project, namely the proposal from this 2016 blog post to visualize random variables as animated quantities, which can be either viewed numerically or displayed as a scatterplot. After some back and forth with the coding agent, I was able to come up with a working app. Here is a screenshot of the app displaying a visualization of Berkson’s paradox, which asserts that independent variables can become correlated to each other after applying a conditioning:

The app in fact is a “compiler” for a small, custom programming language (think of a simplified hybrid of Python and Excel) which allows for the introduction of random variables, manipulates them through operations such as arithmetic operations or conditioning, and then plots them as animations or as text. (The screenshot above is static, but when the app is live, it will update at the indicated speed.)

As always, I would be happy to receive feedback on the app, which I hope can be useful as a visual aid to understand basic probabilistic concepts such as independence or conditioning.

── more in #ai-tools 4 stories · sorted by recency
── more on @terry tao 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/a-random-variable-vi…] indexed:0 read:1min 2026-07-13 ·