Coding Challenge 161: Estimating Ο€ from Random Numbers with Euclids Algorithm @TheCodingTrain
Coding Challenge 161: Estimating Ο€ from Random Numbers with Euclids Algorithm  @TheCodingTrain
Uploaded March 2021 | Updated November 2026, 10 hours ago
πŸ₯§ Happy Pi Day 2021! This year I estimate the digits of Ο€ with random numbers and the probability of two integers being co-prime. thecodingtrain.com/challenges/161-estimating-pi-from-random-numbers

πŸŽ₯ Matt Parker's Generating Ο€ from 1,000 random numbers: youtu.be/RZBhSi_PwHU

🎢 Pi Day song by Will from America: willfromamerica.com
🎨 Character design and animations by Jason Heglund jasonheglund.com
🎬 Editing by Mathieu Blanchette

p5.js Web Editor Sketches:
πŸ•ΉοΈ Estimating Ο€ from Random Numbers: editor.p5js.org/codingtrain/sketches/FiOG6uajS
πŸ•ΉοΈ Estimating Ο€ from Digits of Ο€: editor.p5js.org/codingtrain/sketches/x0eikODKm

πŸŽ₯ Previous video: youtu.be/Rr-5HiXquhw?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ All videos: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH

Links discussed in this video:
πŸ”— Probability of Two Integers Being Coprime: cut-the-knot.org/m/Probability/TwoCoprime.shtml
πŸ”— Euclidean Algorithm: en.wikipedia.org/wiki/Euclidean_algorithm
πŸ”— A Million Random Digits with 100,000 Normal Deviates: rand.org/pubs/monograph_reports/MR1418.html
πŸ”— Quantum random numbers: https://qrng.anu.edu.au/

Other videos mentioned in this video:

Timestamps:
0:00 Happy Pi Day!
1:26 Explain! What does co-prime mean?
4:21 Explain! Euclid's Algorithm
8:40 Example! Finding the greatest common divisor.
9:55 Code! gcd() function with Euclid's Algorithm.
12:23 Code! Let's load the random digits.
14:39 Code! Let's use draw() for our loop.
16:13 Code! Co-prime or Co-factor?
17:44 Explain! How we are going to estimate Ο€.
18:50 Code! Estimating Ο€.
21:59 Code! Trying with digits of Ο€.
22:54 Ideas! Thanks for watching!

πŸš‚ Website: thecodingtrain.com
πŸ‘Ύ Share Your Creation! thecodingtrain.com/Guides/community-contribution-guide.html
🚩 Suggest Topics: github.com/CodingTrain/Rainbow-Topics
πŸ’‘ GitHub: github.com/CodingTrain
πŸ’¬ Discord: discord.gg/hPuGy2g
πŸ’– Membership: youtube.com/thecodingtrain/join
πŸ›’ Store: standard.tv/codingtrain
πŸ“š Books: amazon.com/shop/thecodingtrain
πŸ–‹οΈ Twitter: twitter.com/thecodingtrain
πŸ“Έ Instagram: instagram.com/the.coding.train

πŸŽ₯ Coding Challenges: youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH
πŸŽ₯ Intro to Programming: youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA

πŸ”— p5.js: p5js.org
πŸ”— p5.js Web Editor: editor.p5js.org
πŸ”— Processing: processing.org

πŸ“„ Code of Conduct: github.com/CodingTrain/Code-of-Conduct

🎢Pi Day song by twitter.com/WillFromAmerica
🎢Music by Epidemic Sound: epidemicsound.com/creator

#PiDay #PiDay2021
Coding Challenge 161: Estimating Ο€ from Random Numbers with Euclids AlgorithmCoding Train Live:  Riding the Oregon Trail 1Coding Train Live: Self-Avoiding Walk and Discord botCoding with Processing Release 0001 Alpha   Happy 20th!Coding Challenge 172: Horizontal Directional DrillingNo palettes! #genuary #genuary2Discord Bots 4: Hiding API Keys with .envCoding Challenge 179: Elementary Cellular Automata2.6 Mutual Attraction - The Nature of CodeSpooooooooky ml5.js!Use code CHOOCHOO for 25% off. Pre-ordering direct from me comes with a bonus bookmark and sticker!Preshow! ITP/IMA Spring Show 2022
The Coding Train |

Coding Challenge 161: Estimating Ο€ from Random Numbers with Euclid's Algorithm

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER