A Random Walk & Monte Carlo Simulation || Python Tutorial || Learn Python Programming

  Рет қаралды 661,220

Socratica

Socratica

Күн бұрын

𝙎𝙩𝙖𝙮 𝙞𝙣 𝙩𝙝𝙚 𝙡𝙤𝙤𝙥 𝙄𝙉𝙁𝙄𝙉𝙄𝙏𝙀𝙇𝙔: snu.socratica.com/python A random walk is a process where each step is chosen randomly. This technique has many applications. In this video we solve a random walk puzzle using Monte Carlo simulations and the random module in Python.
To learn Python, start our Python Playlist HERE:
bit.ly/PythonHelloWorld
Subscribe to Socratica: bit.ly/1ixuu9W
♦♦♦♦♦♦♦♦♦♦
We recommend:
Python Cookbook, Third edition from O’Reilly
amzn.to/2sCNYlZ
The Mythical Man Month - Essays on Software Engineering & Project Management
amzn.to/2tYdNeP
Shop Amazon Used Textbooks - Save up to 90%
amzn.to/2pllk4B
♦♦♦♦♦♦♦♦♦♦
Ways to support our channel:
► Join our Patreon : / socratica
► Make a one-time PayPal donation: www.paypal.me/socratica
► We also accept Bitcoin @ 1EttYyGwJmpy9bLY2UcmEqMJuBfaZ1HdG9
Thank you!
♦♦♦♦♦♦♦♦♦♦
Connect with us!
Facebook: / socraticastudios
Instagram: / socraticastudios
Twitter: / socratica
♦♦♦♦♦♦♦♦♦♦
Python instructor: Ulka Simone Mohanty (@ulkam on Twitter)
Written & Produced by Michael Harrison (@mlh496 on Twitter)
FX by Andriy Kostyuk
♦♦♦♦♦♦♦♦♦♦

Пікірлер: 605
@Socratica
@Socratica 2 жыл бұрын
Wear a Socratica Python shirt for good luck coding: shop.socratica.com/products/python-by-socratica
@VashaLittleMasha
@VashaLittleMasha 6 жыл бұрын
This. Is. Amazing. I never ever saw a tutorial with such a refined artistic taste
@SingingblissofRajat
@SingingblissofRajat 5 жыл бұрын
VashaLittleMasha Code can be used to create art. Try it. It's fascinating.
@vulturebeast
@vulturebeast 4 жыл бұрын
She is an actress , a very great actress that's why :)
@marsrocket
@marsrocket 4 жыл бұрын
@@vulturebeast And a dancer, and a voice artist...and probably more too.
@Socratica
@Socratica 4 жыл бұрын
@@marsrocket And a programmer!! Ulka really is amazing.
@rashayahya
@rashayahya 4 жыл бұрын
I agree
@Socratica
@Socratica 4 жыл бұрын
It's official! The Socratica Python Kickstarter was a success! Thank you to all of our supporters. Because of you, many more Python videos coming soon!! 💜🦉
@sterlinglozalee9926
@sterlinglozalee9926 4 жыл бұрын
Great update on an almost 3 year old video - thanks for the awesome content!
@SagiPolaczek
@SagiPolaczek 4 жыл бұрын
Socratica great content!
@saitaro
@saitaro 6 жыл бұрын
She's my coding dominatrix now
@ting-hsiangwang311
@ting-hsiangwang311 6 жыл бұрын
Exactly the vibe I got from her. XDD
@felixsnag9897
@felixsnag9897 6 жыл бұрын
Dont be rude
@CarlosOrtiz-ht6rn
@CarlosOrtiz-ht6rn 6 жыл бұрын
Jeez guys, keep your pants on
@mikefocal5770
@mikefocal5770 6 жыл бұрын
here name?
@thegaminghobo4693
@thegaminghobo4693 5 жыл бұрын
mike focal I can’t tell you exactly where you are but I’m in England🤷🏼‍♂️
@pursuitofcat
@pursuitofcat 6 жыл бұрын
"This concludes my gamble amble preamble" hahaha
@ChumX100
@ChumX100 4 жыл бұрын
As for the "even numbers get you closer" thing: Since the direction of the steps is evenly distributed, in the even case, we can expect the number of steps going up to be the same to those going down. But in the odd case, we can expect the number of steps in one direction to be one larger than the other, leading us further away from the origin. The same is true for the left/right dimension. This phenomenon should be less and less noticeable, as we increase the number of steps.
@saraperestrelo8377
@saraperestrelo8377 3 жыл бұрын
Yes, but this is only because it was considered the result "distance = abs(x) + abs(y)", removing the influence of the sign of x and y, which can influence your distance in each direction. Interesting.
@chukypedro818
@chukypedro818 3 жыл бұрын
Yes., Also this is dependent on the number of blocks chosen, take for instance 5 blocks away from home, We expect the even number to be further aways..
@sebastiandonickler.6715
@sebastiandonickler.6715 3 жыл бұрын
I think it is because I’m the second step you have a only a 25% chance to be 2 blocks away and 75% to be one block away or back to the starting point. For example if your first step is W only if the second step is W you will be 2 blocks away, if it is S or N you will be 1 block away and if it is E you will be back at the starting point. So this tendency will impact the subsequent results as more steps are added.
@WillChaseIV
@WillChaseIV 7 ай бұрын
Is it safe to say that with an even number of blocks, there are more chances of backtracking compared to an odd number of blocks?
@hayfordadjavor18
@hayfordadjavor18 6 жыл бұрын
There's absolutely no question about it; Socratica is a winner by every measure! Keep up the excellent work!
@CarlosOrtiz-ht6rn
@CarlosOrtiz-ht6rn 6 жыл бұрын
Thank you for this explanation of Monte Carlo simulations.
@TheSatishPatel
@TheSatishPatel 5 жыл бұрын
Please add videos for basic algorithms also. Videos on this channel are high quality and watching them is absolute satisfying.
@elghs2001
@elghs2001 2 жыл бұрын
This channel is INSANE. Thank you for providing such an in-touch way of explaining something as complex as coding in Python.
@clydecessna737
@clydecessna737 5 жыл бұрын
"Monte Carlo: A sunny place for shady people". - Somerset Maugham
@peterfarrell66
@peterfarrell66 6 жыл бұрын
Great videos, wonderful sense of humor and quality Python content!
@CarloRizzante
@CarloRizzante 6 жыл бұрын
"The city of Monte Carlo... you'll never find a more wretched hive of scum and villany." ...hahaha, pretty well said :-D
@CalifDuDad
@CalifDuDad 6 жыл бұрын
Again....... starwars.wikia.com/wiki/Mos_Eisley
@bigfootpegrande
@bigfootpegrande 6 жыл бұрын
Mos Eisley is not a real Cassino city, Canto Bight is...
@banderilllero
@banderilllero 6 жыл бұрын
what does this mean?
@bigfootpegrande
@bigfootpegrande 6 жыл бұрын
These are jokes on Star Wars ("A New Hope") and The Last Jedi...
@dirkmcnasty8585
@dirkmcnasty8585 5 жыл бұрын
Well played Socratica, very well played. Throwing my kudos on using the Star wars quote as well.
@tythedev9582
@tythedev9582 4 жыл бұрын
How have I missed this channel?? This tutorial is superb!
@SheepWaveMeByeBye
@SheepWaveMeByeBye 7 жыл бұрын
Great teaching. Love the high-tech style.
@kangjohan78
@kangjohan78 6 жыл бұрын
Did you see her dress?
@GlauberLimaBR
@GlauberLimaBR 4 жыл бұрын
Seriously, your Python videos are the best! Many thanks for the time you spent building such a beautiful and well organized material! Top-notch!
@rogrp1241
@rogrp1241 4 жыл бұрын
These are the videos I like most about python, do not stop uploading that content please, thank you very much!
@trying2adult
@trying2adult 6 жыл бұрын
Wow just came across this random video and I love this!
@pinkmolly5660
@pinkmolly5660 5 жыл бұрын
so finally I've found you. this is probably the best tutorial i've ever seen on yt.
@ashketchum7768
@ashketchum7768 6 жыл бұрын
Her way of speaking and her voice remind me of Diana from the game Hitman
@chrislam1341
@chrislam1341 4 жыл бұрын
i found it like metal gear..
@the_emmo
@the_emmo 4 жыл бұрын
I was expecting a "Good luck 47" right at the end of the tutorial lmao
@TheRealWindlePoons
@TheRealWindlePoons 3 жыл бұрын
She reminds me of Pree from Red Dwarf
@sandeepn94
@sandeepn94 3 жыл бұрын
Not at all!
@bisratgetachew8373
@bisratgetachew8373 3 жыл бұрын
Now that you brought that up, I am reminded of Hit man2
@rickall
@rickall 6 жыл бұрын
That description of Monte Carlo. She seems pretty cool AI. The 100.
@Artonox
@Artonox 10 ай бұрын
this is the kind of videos i need. Just straight up describe the problem, code in a very highly excellent presentative manner.
@TehFingergunz
@TehFingergunz 7 жыл бұрын
fantastic production value!
@burcakotlu7858
@burcakotlu7858 8 ай бұрын
Stunning!
@watson494
@watson494 7 жыл бұрын
Fantastic channel, congratulations! I wish a lot of success for you guys.
@Erotemic
@Erotemic 2 жыл бұрын
"We will perform the programer's solemn duty to write a docstring." - Preach!
@theexposer9483
@theexposer9483 2 жыл бұрын
High class material, reminds me of Morpheus explaining the Matrix. Excellent, to the point and does not waste any time of the listener. Keep the good work.
@user-lq7lg5jt4k
@user-lq7lg5jt4k 7 жыл бұрын
i love the ambiental electronic bird chirp stuff
@conanfortuna4665
@conanfortuna4665 6 жыл бұрын
Simple and a very crisp code example! Thank you!
@peristhiongo9712
@peristhiongo9712 4 жыл бұрын
Socratica, you're amazing. Just believe in that. You've been a great source of knowledge to many I included.
@Ptr-NG
@Ptr-NG 4 жыл бұрын
What a delivery! Blessed be...!!
@rashayahya
@rashayahya 4 жыл бұрын
This channel became my one of my favorite KZbin channels
@pungavaD
@pungavaD 7 жыл бұрын
if someone had taught me random walk in this way earlier, I would have been a prodigy by now. thanks for this awesome video. I have already subscribed and believe this video to be more useful for me than previous ones.
@bryanchambers1964
@bryanchambers1964 6 жыл бұрын
"You will never find a more wretched hive of scum and villainy". Ha ha. That is the greatest sentence in the English language ever.
@PunmasterSTP
@PunmasterSTP 3 жыл бұрын
Thanks so much for walking us through this!
@PeterManger
@PeterManger 4 жыл бұрын
Whenever I need to reset my programming thinking brain - just watch any of Socratica's programming videos!
@Socratica
@Socratica 4 жыл бұрын
We love this idea!! Thanks, Peter. 💜🦉
@ahmadzorjis6263
@ahmadzorjis6263 4 жыл бұрын
I fall in love with this channel.
@MinecraftLetstime
@MinecraftLetstime 3 жыл бұрын
This is how programming tutorials should be!! Exactly in that voice
@ThePowerchimp
@ThePowerchimp 7 жыл бұрын
The "high-tech virtual girl" delivery in these videos SHOULD be cringe-inducing, but somehow you guys manage to make it fun and engaging!
@syd6358
@syd6358 11 ай бұрын
Why it should be cringe
@mdrafiqul2898
@mdrafiqul2898 3 жыл бұрын
Wow! That's the best monte Carlo simulation tutorial I've ever seen.
@amoorinet..
@amoorinet.. 5 ай бұрын
This lady is not just a programmer, but she is actually a real scientist I have been searching for more than ten years for an efficient and logical way to implement Monte Carlo simulation
@kirill_good_job
@kirill_good_job 3 ай бұрын
Where's Monte Carlo ?
@amoorinet..
@amoorinet.. 3 ай бұрын
I said tool use for ​@@kirill_good_job
@iWonderOfficial
@iWonderOfficial 6 жыл бұрын
Thank you for making all those great videos! Amazing style of teaching and also very entertaining
@xanthirudha
@xanthirudha 6 жыл бұрын
OMG this is insane,super well done
@a2dxp168
@a2dxp168 6 жыл бұрын
All examples are very well selected for the topics.
@Socratica
@Socratica 4 жыл бұрын
Welcome to Socratica! You can see our entire Python Playlist here: bit.ly/PythonSocratica Subscribe to see all our new videos! bit.ly/SocraticaSubscribe
@SonuGupta-pd5dm
@SonuGupta-pd5dm 4 жыл бұрын
You are awesome I get almost all of my doubts clear by watching your videos. If possible can you make a tutorial or playlist on different python libraries like numpy pandas scipy etc
@befboi
@befboi 3 жыл бұрын
@@SonuGupta-pd5dm You are right
@tanmay094
@tanmay094 2 жыл бұрын
Why range of walk length is (1,31)
@LordCoye
@LordCoye 2 жыл бұрын
@@tanmay094 Assume that with a length greater than 30 random steps it is impossible to stay close to the origin.
@mahimsd7645
@mahimsd7645 6 жыл бұрын
I walked randomly and found Socratica ...just 0 block from my house
@ubertcoolie8694
@ubertcoolie8694 2 жыл бұрын
Thanks for the lesson
@guiray2000
@guiray2000 6 жыл бұрын
She is the best teacher ever!
@HeiderJeffer
@HeiderJeffer 3 жыл бұрын
thx 4 sharing. great tutorial well done.
@kalied3715
@kalied3715 4 жыл бұрын
Wow, this blew my mind. When I increased it to 5 blocks or less, the odd walk has a higher chance of being closer to home.
@emmanueltondikatti8754
@emmanueltondikatti8754 3 жыл бұрын
As a beginner in programming this took me a bit of time to grasp, but the way you explained was phenomenal. It really boost up my confidence. Thanks for this.!
@Socratica
@Socratica 3 жыл бұрын
Thank you so much for telling us - this really gets us excited about making more videos! 💜🦉
@macmos1
@macmos1 7 жыл бұрын
To answer @Benjamin Voll, my initial guess is that the odd distances (numbers) are not perfectly divisible by two like even distance(numbers). P.S. Great videos. I like the emphasis on computer science and not just "learning python." Also, great videos on mathematics, too.
@cjh4467
@cjh4467 5 жыл бұрын
This series is so good.
@coldarif
@coldarif 9 ай бұрын
Nice, you guys make it look simple and easy to understand
@yiliangxie8656
@yiliangxie8656 6 жыл бұрын
You are making everything so cool!
@reysombi
@reysombi 3 жыл бұрын
i really feel into video Game Mass effect when i see Socratica. Great job!!
@hv1461
@hv1461 4 жыл бұрын
I appreciate all the efforts you put into these videos. And I'm impressed with how supportive the community was for your kickstarter campaign. I wonder if that suggests a new model for how educational content will be developed. I'm also thinking about the aesthetic you've established here and the pedagogical efficacy. I wonder if you've studied whether any increased learning efficiency emerges and it generates a return on your production costs. If so, you might have a scalable business model.
@mohamedabdellahi1921
@mohamedabdellahi1921 6 ай бұрын
This tutorial is fantastic
@quazichimp
@quazichimp 7 жыл бұрын
Well done! as always....with just the right touch of deadpan humor. love it!
@zdinbalti
@zdinbalti Жыл бұрын
This is amazing and imformative
@AjeetKumar-oc8sb
@AjeetKumar-oc8sb 4 жыл бұрын
This is so fascinating, she is my programmer teacher now
@Bwyan
@Bwyan 7 жыл бұрын
Awesome stuff as always. Thanks.
@ronimiguel
@ronimiguel 7 жыл бұрын
Thanks again, you guys make it look simple and easy to understand.
@bahabwa
@bahabwa 4 жыл бұрын
This channel makes learning so easy
@toothlessinnovations8578
@toothlessinnovations8578 5 жыл бұрын
this channel is the best among others. we need more videos on python.
@peterclaassen5865
@peterclaassen5865 2 жыл бұрын
The Best Ever Tutorials, entertaining ,CLASSY, always waiting for her deadpan "The city of Monte Carlo... you'll never find a more wretched hive of scum and villany." or the like. And I actually learn a lot. Thanks!
@havarchitecture4251
@havarchitecture4251 4 жыл бұрын
I LOVE YOU! excellent presentation!
@antiquarian1773
@antiquarian1773 2 жыл бұрын
This channel is so underrated.
@rileynobles7146
@rileynobles7146 6 жыл бұрын
No better way to prove you are a tech geek than to throw in a "Star Wars" Quote. Excellent!
@ur_aditya
@ur_aditya 5 жыл бұрын
Beautifully explained
@spiderjerusalem
@spiderjerusalem 4 жыл бұрын
Great instructions. Thanks SHODAN.
@thebuggser2752
@thebuggser2752 3 жыл бұрын
What a great presentation!
@scarecrow7635
@scarecrow7635 6 жыл бұрын
just love your style @socratica
@okunolakehinde5357
@okunolakehinde5357 7 жыл бұрын
I love ..socratica...You guyz are the best online tutors...I want you to give a teaching on PHP programming as well. thanks
@MrBlpvivek
@MrBlpvivek 3 жыл бұрын
oh man.. I love the narration and the background music. Great !!
@Sa-So
@Sa-So Жыл бұрын
This was something awesome💯
@piyushsharma417
@piyushsharma417 5 жыл бұрын
Artistic work . ... great teaching thanks
@richmondkoomson3403
@richmondkoomson3403 2 жыл бұрын
Oh my gosh this woman is the best python programmer i know so farr
@sharpEAGLES
@sharpEAGLES 4 жыл бұрын
"...Our release schedule will be less random!" 😂 Atlast! a programmer with good sense of humor. This is really amazing BTW.
@PewPew_McPewster
@PewPew_McPewster 4 жыл бұрын
I wish I watched this video like 5 years ago, the Monte Carlo method is a cornerstone of many important fields of research, but I had felt locked out of it for the longest time because classrooms simply dismissed it as an abstract idea from which we derive a single average value. Whelp, time to jump back into polymer science!
@330iBook
@330iBook 6 жыл бұрын
This is addicting...the humor is great
@noahbroyles8828
@noahbroyles8828 4 жыл бұрын
Gosh that was fascinating! Great video style, good content! (Now I no longer feel guilty for being a Monte Carlo type dude 😉)
@shadowskillz1975
@shadowskillz1975 2 жыл бұрын
isnt she the best?? hands up for that explanation
@garyr1639
@garyr1639 2 жыл бұрын
Love this and your other videos, please do some more soon!! :)
@mainak_das
@mainak_das 4 жыл бұрын
wow!! it blew my mind!!!
@mrmuranga
@mrmuranga 4 жыл бұрын
please make more python videos..these videos are very informative
@dylankirk6166
@dylankirk6166 5 жыл бұрын
Gamble amble preamble... you have officially made my day.
@OlumideOni
@OlumideOni 6 жыл бұрын
Guys lets support this channel financially as much as possible. They are doing a great job here
@Socratica
@Socratica 4 жыл бұрын
We're halfway there. We still need your help! Support Socratica Python Kickstarter: bit.ly/PythonKickstarter
@stanislavivanov9817
@stanislavivanov9817 4 жыл бұрын
Phenomenal!
@michaelwood2292
@michaelwood2292 6 жыл бұрын
From what I have seen on the Socratica Channel, you have a "WINNER"... Hope you get funding to do great and wonderful things. Thank you for that "gamble" .
@davecain5406
@davecain5406 6 жыл бұрын
Laurel and hardy
@rs-tarxvfz
@rs-tarxvfz 2 жыл бұрын
Most Intelligent KZbinr!
@mysticaltech
@mysticaltech 4 жыл бұрын
What an awesome sci-fi format, love it! So the MC method as you present it is just a double for loop to run the simulation yes? I had imagined there would be a lot more to it.
@NewyJimmy
@NewyJimmy 4 жыл бұрын
Haven't seen your channel before but I quite enjoyed this video
@Lhermit9
@Lhermit9 4 жыл бұрын
Just Amazing. Thanks for sharing. :)
@rahulraj233
@rahulraj233 5 жыл бұрын
No Errors No Surprises. Thanks.
@user-df7wl5iz8z
@user-df7wl5iz8z 5 жыл бұрын
Really nice and useful.You are my favourite robot now .
@niharkashyap3897
@niharkashyap3897 4 жыл бұрын
Subbed within 2 minutes into the video!
@PraveenKumar-xq7xb
@PraveenKumar-xq7xb 6 жыл бұрын
Great teaching...Impressive
@deepakbharti2800
@deepakbharti2800 5 жыл бұрын
Superb video .......I really love scifi movies and watching this video is almost same. Great Job
Monte Carlo Simulation
10:06
MarbleScience
Рет қаралды 1,4 МЛН
Көтіңді қысып, ауылға қайт! | АСАУ | 2 серия
33:16
Зомби Апокалипсис  часть 1 🤯#shorts
00:29
INNA SERG
Рет қаралды 6 МЛН
YouTube's Biggest Mistake..
00:34
Stokes Twins
Рет қаралды 67 МЛН
NO NO NO YES! (50 MLN SUBSCRIBERS CHALLENGE!) #shorts
00:26
PANDA BOI
Рет қаралды 46 МЛН
6. Monte Carlo Simulation
50:05
MIT OpenCourseWare
Рет қаралды 2 МЛН
The Truth About Learning Python in 2024
9:38
Internet Made Coder
Рет қаралды 90 М.
The Monte Carlo Method
16:01
RandomMathsInc
Рет қаралды 79 М.
Monte Carlo Simulation of a Stock Portfolio with Python
18:23
How good is the latest version of ChatGPT? | BBC News
23:16
Көтіңді қысып, ауылға қайт! | АСАУ | 2 серия
33:16