Quantifying Dinosaur Pee - Expressing Probabilities as Floating-Point Values in C++
summary
Reproduces the birthday problem, discovers a floating‑point trap where IEEE‑754 doubles pin the collision probability to 1 (breaks at n ≈ 184), and fixes it by reframing to compute unique birthday (probability of no collision) using Stirling’s approximation and discrete vs continuous compounding. Uses Google Calculator/WolframAlpha for checks and shows only float128 or arbitrary precision recovers the tiny values lost by double/long double. Answers: proportion of Earth’s water from dinosaur pee ≈ almost 0; probability every molecule was tainted ≈ almost 0; conditional (≈ one molecule) ≈ 1/e; chance a glass is untainted ≈ almost 0.
AI-written summary · about
chapters (30)
- 0:00Introduction
- 2:00The Birthday Problem
- 2:40Boundary Conditions
- 3:29Birthday Function
- 14:30Unique Birthday
- 16:15Observations
- 19:37Recap
- 27:51Dinosaur Pee
- 30:14Geometric Sum Formula
- 30:31Sum a finite or infinite series
- 30:53Plugging in inquiry symbols
- 31:20Alternative facts and quotes
- 32:30Bird Model
- 33:12Daily Rate
- 33:22Compounding
- 34:39Time Scales
- 35:08Plugging in Numbers
- 35:41The Result
- 37:21Example
- 41:49FloatingPoint Subtraction Algorithm
- 43:58Summary
- 46:23Discrete Probability
- 48:02Lightning Speed
- 48:32Precision
- 49:25ExpectedValue
- 50:13Symmetry
- 50:41Distribution
- 55:03Takeaways
- 55:18Delirium
- 55:30Questions
related talks
05mQuantifying Dinosaur Pee
48mDemystifying Floating Point
09mEstimating the Value of Pi with a Dartboard and (Not so Much) Luck!
50mElevating Precision in C++ - A Journey Below the Surface of Floating-Point
21mFast Confidence Estimation: Regression models
27mWhy the float did it NaN?
15mScaling Exact Inference for Discrete Probabilistic Programs
01h 01mBrief Tutorial on Probabilistic Databases
