What is Monte Carlo?

  Рет қаралды 219,918

Leios Labs

Leios Labs

8 жыл бұрын

Here's a video describing programming magic: Monte Carlo integration!
It's a super cool algorithm that is used all the time (in physics at least), so it was good to cover it here. We'll have more algorithms coming up, so be sure to check them out as they come along!
Information on the Batman Curve:
mathworld.wolfram.com/BatmanCu...
math.stackexchange.com/questio...
I also did a small write-up on integrating the Batman Curve:
leios.github.io/Batman_Montecarlo
As always, the simulations were done live on:
/ leioslabs
/ @leioslabslive
Feel free to follow me on Twitter!

The code is available here:
github.com/leios/simuleios/bl...
And the music is from Josh Woodward (sped up 1.5 times):
www.joshwoodward.com/
Thanks for watching!
Also, discord:
/ discord

Пікірлер: 284
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Since making this video, we have created a new project called the Algorithm Archive and have added a chapter on Monte Carlo: www.algorithm-archive.org/chapters/monte_carlo/monte_carlo.html Please go there for information on how to code this up yourself!
@ananyapamde4514
@ananyapamde4514 6 жыл бұрын
Thank you sir
@yolofapper9668
@yolofapper9668 8 жыл бұрын
this is the best mathematical education video I ever saw,short,simple,no overcomplicated shit,just straight to the point
@LeiosLabs
@LeiosLabs 8 жыл бұрын
That is exactly how I want the videos to be: As short as possible while still conveying the point. It takes forever to make 3 minutes of content, but that's alright.
@raqueloliveiramotivacional2348
@raqueloliveiramotivacional2348 5 жыл бұрын
Yolo Fapper Monte Carlo
@J_46
@J_46 4 жыл бұрын
Totally!
@AdnanKhan-so1ey
@AdnanKhan-so1ey 6 жыл бұрын
After wasting an hour trying to understand an algorithm that shouldnt take more than 3 minutes to understand, I finally came across your video. You explained it perfectly. Thanks a lot
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad it was helpful! =)
@AnujGupta-wp2ww
@AnujGupta-wp2ww 4 жыл бұрын
Einstein once said "If you can't explain it to a 6 year old kid, your education about that topic in incomplete". Great explanation
@phythematics2188
@phythematics2188 3 жыл бұрын
Einstein himself couldn't make understand scientists the Theory of relativity let alone a 6 years old kid.
@samuraijosh1595
@samuraijosh1595 3 жыл бұрын
@@phythematics2188 Lol.
@jameshuang9568
@jameshuang9568 4 жыл бұрын
I've been running through all youtube videos about his topic for hours and even the professor from MIT didn't answer my question. You are brilliant
@jrwkc
@jrwkc 7 жыл бұрын
Keep it up, you will hit youtube fame soon. Probably one of the best educators out there.
@LeiosLabs
@LeiosLabs 7 жыл бұрын
Thanks! I really appreciate it!
@rishabtirupathi9431
@rishabtirupathi9431 Жыл бұрын
I was so scared that this video would be too complicated. Thank you so much for making it simple.
@victoriagee1059
@victoriagee1059 3 жыл бұрын
This is one of the best explanations for Monte Carlo I have found. Good job, James!
@DanielDuesentrieb86
@DanielDuesentrieb86 7 жыл бұрын
Monte Carlo methods are also very handy in game theory where it is easy to state the game rules, yet hard to precisely calculate the probability to win.
@AbuSayed-er9vs
@AbuSayed-er9vs 7 жыл бұрын
A lots of thanks for giving a valuable information.Please keep going on to do more and more videos with your amazing information.
@harkirehal258
@harkirehal258 4 жыл бұрын
This is an excellent explanation of a complex concept. I was glued to the video and understood every word. I wish I had you for my teacher when I was younger. I subscribed to your channel. I now want to learn everything you teach even if it just for fun. Its rare to find a teacher that explais a concpet to the core in a way that a layman understands.
@naveenchandrakumar480
@naveenchandrakumar480 5 жыл бұрын
Very Nice. This is first time I understood Monte Carlo method clearly. Thanks for the video
@Aa11qq
@Aa11qq 7 жыл бұрын
This is an amazing explanation. Thank you!
@forgettd
@forgettd 3 жыл бұрын
This is the best explanation of anything I've ever seen on youtube. Thank you!
@corporalwaffles
@corporalwaffles 7 жыл бұрын
You earned a sub today, keep up these vids (along with algorithms) :D
@kamruzzamankanon4794
@kamruzzamankanon4794 5 ай бұрын
Concise+informative+to the point+easy example = My subscription!
@charlesasmr7242
@charlesasmr7242 6 жыл бұрын
you are amazing, and also very vivid ways to tell others the simulation process.
@TheRach995
@TheRach995 3 жыл бұрын
My grandfathers research on Monte Carlo numbers was actually pretty important. Look up Martin J Berger, his world is all available online and his obituary is achieved by the Washington post, is available through a simple search. I’m so proud of him.
@Tom-sp3gy
@Tom-sp3gy 3 жыл бұрын
This is absolutely brilliant ! What a simple and short explanation ! Thankyou so much
@robertpretorius7627
@robertpretorius7627 6 жыл бұрын
Short, simple, clear. Wow! Great video! I finally understand Monte Carlo simulations!
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Yeah, it's crazy how random numbers can be so useful!
@vladscp6579
@vladscp6579 10 ай бұрын
this is the coolest algorithm videos I've ever seen, better than most stuff in my uni
@filiphradil95
@filiphradil95 7 жыл бұрын
Awesome explanation! Finaly some non-boring video for numeric methods! :)
@LeiosLabs
@LeiosLabs 7 жыл бұрын
haha, I'm glad you liked it! I actually really like Monte Carlo. It was one of the first integration methods I learned and really helped me understand integration.
@snackbob100
@snackbob100 4 жыл бұрын
you are going places my dude, keep it coming!
@PrettyMuchPhysics
@PrettyMuchPhysics 5 жыл бұрын
It's amazing how many modern application use Monte Carlo! Great introduction video :D
@lerneninverschiedenenforme7513
@lerneninverschiedenenforme7513 3 жыл бұрын
Awesome! The only video, that can deliver 4 minute content in around 4 minutes (and not 10, 20 or 50, like the other videos)
@jennis493
@jennis493 6 жыл бұрын
Great Video! After a one semester course on computational science and still not quite getting what this was all about your video really cleared things up! Thank you!
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Woo! I'm glad it was helpful! =)
@kemfic
@kemfic 5 жыл бұрын
This is the best explanation I've seen on Monte Carlo so far
@tudorversoiu8138
@tudorversoiu8138 7 жыл бұрын
Never seen a better explanation on anything, ever. Amazing videos, just found your channel :)
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad it was useful! =)
@ferdousadnan5814
@ferdousadnan5814 5 жыл бұрын
An excellent excellent video, excellent explanation. Both liked and subscribed.
@AashishMishra_Nygma
@AashishMishra_Nygma 7 жыл бұрын
This channel is gonna touch the skies! I am happy that I am such an early subscriber!
@shakilmasud
@shakilmasud 3 жыл бұрын
Thank you. Searching for so many sites but here I cleared my conception :)
@kaarla2805
@kaarla2805 3 жыл бұрын
Omg i just discover your videos and they’re amazing, thanks for share.
@ashishbastola8412
@ashishbastola8412 5 жыл бұрын
Short, sweet & amazing!
@handlenotprovided
@handlenotprovided 3 жыл бұрын
Very concise and straightforward explanation of monte carlo integration. Thank you
@abdulelahaljeffery6234
@abdulelahaljeffery6234 7 жыл бұрын
omg!! dude you are definitely one of them! a rare bread of human beings who know how to explain things really well, congrats! (clapping)
@LeiosLabs
@LeiosLabs 7 жыл бұрын
Haha, I'm glad you like the content! =) Let me know if you have any questions!
@abdulelahaljeffery6234
@abdulelahaljeffery6234 7 жыл бұрын
I most certainly will ..
@SamiyuruSenarathna
@SamiyuruSenarathna 5 жыл бұрын
You conveyed the point very clearly.
@prateekverma6873
@prateekverma6873 7 жыл бұрын
Nice video!. the explanation was easy and understandable.
@prathameshpradipdatar2003
@prathameshpradipdatar2003 3 жыл бұрын
Simple, elegant and impactful!
@bondmanu
@bondmanu 7 жыл бұрын
Very much liked it....explained the complex definition very simply ...keep up the good work! :)
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm super glad it was useful! =)
@ProXicT
@ProXicT 7 жыл бұрын
This is the best explanation on the internet, thanks a lot!!
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad it was helpful!
@ujjayantabhaumik3109
@ujjayantabhaumik3109 5 жыл бұрын
This was really cool. You explained it so nicely. Gracias :)
@OOnestly
@OOnestly 6 жыл бұрын
Dude, you explained such a concept in 3 minutes. That was amazing!
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad it was helpful!
@qiuzhishu2583
@qiuzhishu2583 7 жыл бұрын
Really nice! Easy to understand!
@greenowski
@greenowski 3 жыл бұрын
This is exactly what I was looking for! thanks :)
@JoannaBalasbas
@JoannaBalasbas 7 жыл бұрын
thank you so much for explaining so well and concisely to beginners like us!
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad it helped! =)
@khudhurm7709
@khudhurm7709 7 жыл бұрын
Amazing explanation! Subscribed :)
@srik24
@srik24 5 жыл бұрын
A thorough explanation. Thanks!!
@harshavardhan9660
@harshavardhan9660 7 жыл бұрын
Thanks a lot bro;Atlast I've found the platform for visualizing the concepts clear.Keep it up..
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad it was useful! I've been trying to get more videos out, but with work and everything, it takes a little longer then I'd like...
@kshitijkulkarni8698
@kshitijkulkarni8698 7 жыл бұрын
Thank you for making this video!!
@yassertalebi1026
@yassertalebi1026 4 жыл бұрын
Many thanks Sir, you made as easy as could have been possible, I was watching MIT 's course for 55 min wasn't that clear as you were
@ozzyfromspace
@ozzyfromspace 5 жыл бұрын
Wow, you did that in less than 4 minutes. Bravo!
@LoserHands
@LoserHands 4 жыл бұрын
I've always wanted to integrate odd shapes into a shooter videogame, for shotgun chokes. Maybe percent-error per shot can be used for boosting the unlucky shots, or the area-of-circumscribed-shape can be used to find the effectiveness of a shotgun choke, so the better ones cost more in a borderlands-style procgen. Also sometimes your videos make certain terms like integral wayyy less scary for someone like me, who has a lot of math left on their plate following high school and dropping college once. It's hard getting back into crowded class and math is totally smthn I don't want to fail. Ty
@LeiosLabs
@LeiosLabs 4 жыл бұрын
I'm happy this was useful! I'm interested to see how you work this out for your game. It could be really cool!
@peter9910
@peter9910 7 жыл бұрын
Great explanation, thanks!
@aminsn779
@aminsn779 4 жыл бұрын
great, easy, and fast explanation. exactly what I needed :)) Thank you.
@LeiosLabs
@LeiosLabs 4 жыл бұрын
Great to hear!
@aashmavlogs5512
@aashmavlogs5512 4 жыл бұрын
Thank you so much. You explained it with simplicity.
@cameronmiller4144
@cameronmiller4144 4 жыл бұрын
concise and entertaining. thanks!
@saitaro
@saitaro 6 жыл бұрын
Best Monte Carlo advertisement I've ever seen. The slogan @ 3:26 is great
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I like my videos to advertise algorithms. It's better to motivate people to learn.
@scose
@scose 6 жыл бұрын
The Batman example showed how to use Monte Carlo methods to find the area of a complex domain. More generally, we can think of integrating f(x) * p(x) where p(x) is a probability distribution. In your example f(x) is the indicator function of the batman logo and p(x) is the uniform distribution on the ellipse. But we could also extend this to something more complicated e.g. if f(x) = x and p(x) is the uniform distribution over the logo itself, we can find the center of mass of the logo. Or, if p(x) is not a uniform distribution, we can use importance sampling or Markov Chain Monte Carlo methods to compute the expected value of a function of a random variable. (commenting for other viewers - as a physicist I guess you already know this)
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Yeah. I want to cover some of this stuff in the future soon (tm)!
@matt9912
@matt9912 7 жыл бұрын
Very nicely done!
@LeiosLabs
@LeiosLabs 7 жыл бұрын
Glad it was helpful!
@tusharkush7
@tusharkush7 4 жыл бұрын
Great Explaination!
@locopepele
@locopepele 7 жыл бұрын
Great explanation! Thank you!
@bluecpp2059
@bluecpp2059 3 жыл бұрын
Thank you for this great video. I will read more about it.
@HKHasty
@HKHasty 6 жыл бұрын
Greatest explanation of Monte Carlo I've ever seen!
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad you found it useful!
@ashish6114
@ashish6114 7 жыл бұрын
You sir should have more subs. The presentation of the concepts is super intuitive and easy to absorb thanks to the proper and simple explanations provided unlike the majority of college professors who unnecessarily complicate the matter due to their inadequate teaching skills. Sometimes I think that they became professors simply because they held 'PhDs'.
@ashish6114
@ashish6114 7 жыл бұрын
I've seen the other videos of yours too. It'd be amazing if you were a professor. We need more people who teach in such simple and intuitive ways.
@LeiosLabs
@LeiosLabs 7 жыл бұрын
Honestly, I would love to be a professor. It's one of my dream jobs!
@deeptivirgo2009
@deeptivirgo2009 6 жыл бұрын
Very nice Explanation ! Thanks a lot!
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Thanks! I am glad it was useful!
@TheFitAuto
@TheFitAuto 6 жыл бұрын
I understand exactly about Monte Carlo calculation after seeing this video..many thanks!!
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Great! I am glad it was helpful! =)
@ElMakk_Med
@ElMakk_Med 4 жыл бұрын
hey there, thanks for this awesome work, i just wanna ask what is the software you used to make the simulation in the video?
@jackyxue7885
@jackyxue7885 6 жыл бұрын
I was out there reading papers and falling sleep. You saved my day. Simply and elegant ~~~
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad you liked it! When I saw this for the first time, I thought it was magic!
@Rotwh7
@Rotwh7 7 жыл бұрын
Sir, I hope you read this comment. You are brilliant and kind. GOD bless You! Keep educating us like this Sir!
@thyagtubes
@thyagtubes 5 жыл бұрын
Very well done
@aming.alhashim-ou6032
@aming.alhashim-ou6032 7 жыл бұрын
Well done! You are a great teacher.
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad you found it useful!
@Aa-tf1li
@Aa-tf1li 6 жыл бұрын
I made a long research to understand this topic and I can't reach to the nut... your video is very helpful , it summarise whole idea in simple concepts, thanx for ur efforts
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Yeah, there are a lot of concepts that seem super complicated at first glance, but are much easier after you get used to them a little.
@arturotorreslopez4283
@arturotorreslopez4283 5 жыл бұрын
And that's another precious way of calculating pi :D
@GBWF1984
@GBWF1984 5 жыл бұрын
I just want to thank you for this great video. Also, I took sometime to visit the Arcane Algorithm Archive, very nice work!! Congratulation!!
@theinstigatorr
@theinstigatorr 7 жыл бұрын
Nice video. I'm surprised it doesn't have more views
@abubakerbarenis
@abubakerbarenis 6 жыл бұрын
very nice explanation, appreciated..
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad it was helpful!
@FamMeierundCo
@FamMeierundCo 4 жыл бұрын
Oh my god awesome video!
7 жыл бұрын
I should've found this video several hours ago! Nice!
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad it was helpful!
@Ravikumar_Sharma
@Ravikumar_Sharma 5 жыл бұрын
Excellent!
@IanFarias00
@IanFarias00 5 жыл бұрын
Amazing video! ^^
@aln447
@aln447 5 жыл бұрын
Brilliant!
@karimaelouahmani7078
@karimaelouahmani7078 2 жыл бұрын
i am soooo thankful
@AhmedHatem1996
@AhmedHatem1996 6 жыл бұрын
Awesome Explanation .. Thank you so much
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad it was useful!
@kishangovind8499
@kishangovind8499 6 жыл бұрын
Thanks a lot . Nicely explained
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad it was useful!
@bharatkukreti8449
@bharatkukreti8449 6 жыл бұрын
Very well explained the Jargon.
@LeiosLabs
@LeiosLabs 6 жыл бұрын
I'm glad it was useful!
@reinia127
@reinia127 4 жыл бұрын
Thank you so much sir!!
@md.abdullahal-alamin8059
@md.abdullahal-alamin8059 7 жыл бұрын
At last I understood monte carlo simulation. Thanks :)
@LeiosLabs
@LeiosLabs 7 жыл бұрын
I'm glad it was helpful!
@pman-codes
@pman-codes 5 жыл бұрын
short and awesome
@kenroyadams2762
@kenroyadams2762 5 жыл бұрын
Thank you! Liked and subbed
@Rightwing789
@Rightwing789 3 жыл бұрын
I love this!!!!!
@NERMIENKH
@NERMIENKH 5 жыл бұрын
very useful thank you!
@Manu-sz4mo
@Manu-sz4mo 6 жыл бұрын
Simply AWESOME
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Yeah, batman took a while...
@GeorgeSandle
@GeorgeSandle 6 жыл бұрын
Very well explained :)
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Thanks! The point is to provide quick, intuitive descriptions of things.
@Foba_Bett
@Foba_Bett 6 жыл бұрын
Cool Video, Thank you :)
@MrZouzan
@MrZouzan 5 жыл бұрын
2 sec of this vid and u got a new suscriber !
@vincenthuang5228
@vincenthuang5228 3 жыл бұрын
So how does the program know whether a random point is in the region we what to integrate over?
@walidwalid9991
@walidwalid9991 7 жыл бұрын
Thank you so much for this explanation. your student from Algeria
@cupofkoa
@cupofkoa 6 жыл бұрын
You're one of the few that don't say 'click like and subscribe'. Its because you don't need to because you're stuff is good. Hitting that subscribe button now.
@LeiosLabs
@LeiosLabs 6 жыл бұрын
Ah, thanks man! I don't tell people to like and subscribe because I hate watching people who say that. People know what to do. I don't need / want to tell them. I would honestly feel bad if people only subscribed to me because I told them to.
@ProCipher
@ProCipher 3 жыл бұрын
you are a hero :)
@juusokorhonen1628
@juusokorhonen1628 4 жыл бұрын
I have one question. If thinking about more complex function (still in xy-plane for simplicity) how do we know if the randomly selected dot is under the curve or over it? Like ofc we as humans can see it, but how to tell computer about it, how to code it in? Probably it is a stupid question, but it just popped into my head
What is an Eigenvector?
4:01
Leios Labs
Рет қаралды 429 М.
How to: Monte Carlo Simulation in Python (Introduction)
27:23
Mr. P Solver
Рет қаралды 57 М.
Please be kind🙏
00:34
ISSEI / いっせい
Рет қаралды 77 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 84 МЛН
3 wheeler new bike fitting
00:19
Ruhul Shorts
Рет қаралды 43 МЛН
Approximating Pi ( Monte Carlo integration ) | animation
2:08
Think Twice
Рет қаралды 93 М.
Tree-house Numbers - Numberphile
12:25
Numberphile
Рет қаралды 52 М.
Monte Carlo Simulation
10:06
MarbleScience
Рет қаралды 1,4 МЛН
Monte Carlo Integration In Python For Noobs
15:32
Andrew Dotson
Рет қаралды 149 М.
Estimating Pi using Monte Carlo Simulation
4:45
Vincent Knight
Рет қаралды 91 М.
Coding Challenge 176: Buffon's Needle
25:04
The Coding Train
Рет қаралды 97 М.
6. Monte Carlo Simulation
50:05
MIT OpenCourseWare
Рет қаралды 2 МЛН
Importance Sampling
12:46
Mutual Information
Рет қаралды 55 М.
Teaching myself C so I can build a particle simulation
11:52
Gradience
Рет қаралды 192 М.
I'm Coding an Entire Physics Engine from Scratch
9:19
Gonkee
Рет қаралды 1,6 МЛН
Неразрушаемый смартфон
1:00
Status
Рет қаралды 1,2 МЛН
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 2,4 МЛН
Мечта Каждого Геймера
0:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,5 МЛН