r/visualizedmath

Formalizing Uncertainty: The Foundations of Conditional Probability and Bayes' Theorem
▲ 7 r/visualizedmath+2 crossposts

Formalizing Uncertainty: The Foundations of Conditional Probability and Bayes' Theorem

I just made a video diving deep into the math of belief and how we rigorously update our assumptions using conditional probability. It covers why all probabilities are conditional, and the real-world traps we fall into when we get the math wrong.

We cover:

  • The Prosecutor’s Fallacy: How juries and lawyers routinely confuse the probability of the evidence given innocence with the probability of innocence given the evidence, leading to catastrophic wrongful convictions.
  • Simpson's Paradox: How a developer can have a worse success rate on every individual type of task, yet somehow have a better overall success rate than their coworker. (Spoiler: it's about hidden data volume and confounding variables).
  • Bayes' Rule & The Monty Hall Problem: Why switching doors mathematically doubles your win rate from 1/3 to 2/3, and how Bayes' rule proves Monty's choice destroys the 50/50 symmetry.

If you want a visual masterclass on Bayes' Rule, the Law of Total Probability, and the mathematical machinery we use to navigate an uncertain world, I'd love for you to check it out and let me know your thoughts.

youtu.be
u/Ki-Chao — 3 days ago

A 3D Helical Resonator That Visualizes Primes as Standing-Wave Nodes

What if prime numbers appear as constructive interference peaks in a 3D cylindrical standing-wave system?

I built a purely geometrical model: imagine a cylinder with two helical “strings” spiraling in opposite directions (forward and backward). When their phases align, they create sharp amplitude peaks along the axis — and those peaks correspond remarkably well to the locations of prime numbers.

The Core Idea (Simplified Equations)

Prime candidates = local maxima of Amp(n). The perturbations come from the imaginary parts of Riemann zeta zeros (t_k). Counter-rotation creates much sharper nodes.

**Exact Formula**

\[

\begin{aligned}

\theta_{\rm fwd}(n) &= 2\pi \frac{n}{23} + 0.2 \sum_{k=1}^{5} \sin(t_k \ln n) \\

\theta_{\rm bwd}(n) &= -2\pi \frac{n}{23} + \pi - 0.2 \sum_{k=1}^{5} \sin(t_k \ln n) \\[6pt]

{\rm Amp}(n) &= \bigl|\cos(\theta_{\rm fwd}(n)) + \cos(\theta_{\rm bwd}(n))\bigr|

+ 0.1 \Bigl|\sum_{k=1}^{5} \sin(t_k \ln n)\Bigr|

\end{aligned}

\]

where the first five imaginary parts of the Riemann zeta zeros are:

**t₁ = 14.134725**, **t₂ = 21.022040**, **t₃ = 25.010858**, **t₄ = 30.424876**, **t₅ = 32.935062**

Prime candidates = local maxima of Amp(n).

**3D coordinates:**

- Forward helix: \( x = \cos(\theta_{\rm fwd}), \; y = \sin(\theta_{\rm fwd}), \; z = n \)

- Backward helix: \( x = \cos(\theta_{\rm bwd}), \; y = \sin(\theta_{\rm bwd}), \; z = n \)

How Well Does It Work?

Using the first 15 zeta zeros, the model gives strong early predictions (many exact or within 1–4 units) and an overall correlation coefficient of ~0.92 with actual prime locations. Accuracy improves with more zeros.

u/GuntSmack — 6 days ago
▲ 25 r/visualizedmath+3 crossposts

Why does our intuition fail so spectacularly at probability? (And how to fix it) 🎲

Hey Reddit!

I just made a new animated video exploring why the human brain is naturally so terrible at grasping probability and how to correct it.

If you've ever been baffled by the "Birthday Paradox" (where a room of just 23 people gives you a >50% chance of a shared birthday), it comes down to how our brains struggle with scale and overcounting.

In this video, I dive into the math and logic behind uncertainty and break it down. I put a lot of work into the visual storytelling to make these complex mathematical rules easy to digest. Whether you're learning statistics or just want to stop getting fooled by randomness, I think you'll find this helpful.

I'd love to hear your thoughts and am happy to answer any questions about the math in the comments!

youtube.com
u/Ki-Chao — 7 days ago

f(z) = 1/z | Visualization of Complex Inversion for Quantum Computing

Complex Transform Functions

Available Functions f(z) = 1/z

Inversion: Maps unit circle to itself, swaps interior/exterior 
u/ishot_toshi — 12 days ago
🔥 Hot ▲ 141 r/visualizedmath

Visualizing prime numbers as a geometric resonance of concentric circles (C#/WPF)

u/kritikov — 23 days ago
▲ 7 r/visualizedmath+1 crossposts

I made an animation explaining the bizarre math behind Quake 3's "Fast Inverse Square Root" hack!

Using Manim, I wanted to tackle the mathematical intuition behind one of the most legendary workarounds in computer science: the Fast Inverse Square Root function used in Quake 3 Arena.

Back in the 90s, calculating normal vectors for 3D lighting was incredibly taxing because division and square roots took up to 40 CPU cycles. To get around this, developers figured out how to estimate the inverse square root using only fast operations.

In the video, I use animations to visually break down:

  • How treating IEEE 754 floating-point bits as an integer and bit-shifting them perfectly halves the exponent to approximate a square root.
  • The "magic" hexadecimal constant that corrects the mantissa error.
  • How applying just one single iteration of Newton's Method bumps the accuracy from 97% up to an astonishing 99.8% without ever using division.

If you enjoy the intersection of calculus and computer science, I think you'll really like this one.

Watch it here:https://www.youtube.com/watch?v=nO-Plj0KcIw

I'd love to hear your thoughts on the visual intuition!

youtube.com
u/Ki-Chao — 1 month ago

Discussion: interactive workflow for 3D math visualization

Hello,

I'm currently taking a course in linear algebra and rational mechanics, and I want to visualize what I'm learning, because that makes me understand things much better. I tried a few different programs, but each of them has some kind of bottleneck, so I wanted to kow what you guys use.

Basically, I need a quick, script-based visualization tool for 3D geometry, with an interactive scene that I can modify real-time via code or commands. What I need is a powerful environment for experimenting with the concepts that I'm studying, rather than a program that helps me generate pretty visualizations with 2000 lines of code. Ease of experimentation comes first.

What I've tried so far:

  • Mathematica: quick, powerful, intuitive symbolic calculator. Can generate nice static images and decent animations. Problems: very slow when calculations get heavy, notebook-based, so there is no real scene to interact with, just an interactive cell that you have to re-run each time you modify something. Not exactly designed for 3D animations.
  • Matlab: somewhat quicker than mathematica, but less elegant. I like that it's not notebook-based, so I can just stick a figure in the sideview. And I like that there is a command line that communicates directly to the scene that I'm working on. However, it is very hard to do animations, and I'm not sure they even turn out so well in the end. Not intuitive at all.
  • Manimgl: this one I haven't tried yet, but it could have potential, especially if combined with sympy.
  • Pyvista + pyvistaqt + pyqt6 + ipython, or, alternatively, just ipython + matplotlib. I still have to check these out, but there is definitely a learning curve.

I would love some feedback on what you guys think is "the best" for sketching out ideas and exploring mathematical concepts in 3D. I don't mind having to learn a new library or software, but I want to make sure that I'm not missing something. I mean, someone must have made a tool for this, right!? Like a more advanced geogebra, sort of. Am I missing something?

reddit.com
u/Aletag — 3 hours ago