Coding Challenge 170: The Monty Hall Problem
The Coding Train The Coding Train
1.68M subscribers
155,289 views
0

 Published On May 11, 2022

It's the Monty Hall Problem! In JavaScript! With p5.js! Yes, you really double your chances of winning by switching doors. I hope to convince you of this in this video! https://editor.p5js.org/codingtrain/s...

p5.js Web Editor Sketches:
šŸ•¹ļø Monty Hall: https://editor.p5js.org/codingtrain/s...
šŸ•¹ļø Monty Hall (variable speed and doors): https://editor.p5js.org/codingtrain/s...

GitHub Repo and Demo:
šŸ’» Repo: https://github.com/CodingTrain/Monty-...
šŸ’» Demo: https://codingtrain.github.io/Monty-H...

šŸŽ„ Previous video: Ā Ā Ā ā€¢Ā CodingĀ ChallengeĀ 169:Ā PiĀ inĀ theĀ SkyĀ GameĀ Ā 
šŸŽ„ All videos: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 

Links discussed in this video:
šŸ”— Game Show Problem, Ask Marilyn, Parade Magazine 1990: https://web.archive.org/web/201301211...
šŸ”— Document Object Model (DOM): https://developer.mozilla.org/en-US/d...
šŸ”— CSS Basics: https://developer.mozilla.org/en-US/d...

Other videos mentioned in this video:
šŸŽ„ The Basics of CSS - p5.js Tutorial: Ā Ā Ā ā€¢Ā 8.7:Ā TheĀ BasicsĀ ofĀ CSSĀ -Ā p5.jsĀ TutorialĀ Ā 
šŸŽ„ 8.11 - Callbacks on Multiple DOM Elements - p5.js Tutorial Ā Ā Ā ā€¢Ā 8.11:Ā CallbacksĀ onĀ MultipleĀ DOMĀ Eleme...Ā Ā 
šŸŽ„ Local Storage in JavaScript with p5.js Ā Ā Ā ā€¢Ā LocalĀ StorageĀ inĀ JavaScriptĀ withĀ p5.jsĀ Ā 

Timestamps:
0:00 What is the Monty Hall Problem?
1:50 Solution for Monty Hall Problem!
6:55 Starting the Code
8:53 Centering a DIV
10:22 Callback Events
15:40 Refactoring into Functions
23:11 Adding Stats
27:04 Playing the game!
28:21 Bayes Theorem
31:45 Goodbye!

šŸš‚ Website: http://thecodingtrain.com/
šŸ‘¾ Share Your Creation! https://thecodingtrain.com/Guides/com...
šŸš© Suggest Topics: https://github.com/CodingTrain/Rainbo...
šŸ’” GitHub: https://github.com/CodingTrain
šŸ’¬ Discord: Ā Ā /Ā discordĀ Ā 
šŸ’– Membership: http://youtube.com/thecodingtrain/join
šŸ›’ Store: https://standard.tv/codingtrain
šŸ“š Books: https://www.amazon.com/shop/thecoding...
šŸ–‹ļø Twitter: Ā Ā /Ā thecodingtrainĀ Ā 
šŸ“ø Instagram: Ā Ā /Ā the.coding.trainĀ Ā 

šŸŽ„ Coding Challenges: Ā Ā Ā ā€¢Ā CodingĀ ChallengesĀ Ā 
šŸŽ„ Intro to Programming: Ā Ā Ā ā€¢Ā StartĀ learningĀ here!Ā Ā 

šŸ”— p5.js: https://p5js.org
šŸ”— p5.js Web Editor: https://editor.p5js.org/
šŸ”— Processing: https://processing.org

šŸ“„ Code of Conduct: https://github.com/CodingTrain/Code-o...

Editing by Mathieu Blanchette
Animations by Jason Heglund
Images licensed by Getty Images
Music from Epidemic Sound

This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/websit...

show more

Share/Embed