VERY HARD Puzzle: What Is The Distance Between Two Random Points In A Square?

  Рет қаралды 1,572,326

MindYourDecisions

MindYourDecisions

Күн бұрын

What is the average distance between two randomly chosen points in a square with a side length 1? The video presents how to estimate the answer and also derives the exact answer using integrals. Per suggestions in the comments, I have modified the title to indicate the difficulty level is VERY HARD (a college level calculus course and probability theory course are necessary background).
Blog post
wp.me/p6aMk-4FA
Simulation
docs.google.co...
Sources and further reading
Quadruple integral
math.stackexcha...
Difference of two uniform variables
www.math.wm.edu...
Difference of two uniform variables and solving the double integral
www.quora.com/...
Solving the double integral
math.stackexcha...
Mean distance polar coordinates change
www.mathpages.c...
Integral secant cubed
en.wikipedia.o...
Mean distance square
mathworld.wolfr...
Cleve Moler's blog post
blogs.mathwork...
Thanks to Patrons! A video like this takes a lot of research and you guys make it possible.
Kyle
Alberto Nishikawa
Brian M. Mooney
If you like my videos, you can support me at Patreon:
/ mindyourdecisions
Connect on social media. I update each site when I have a new video or blog post, so you can follow me on whichever method is most convenient for you.
My Blog: mindyourdecisi...
Twitter: / preshtalwalkar
Facebook: / 168446714965
Google+: plus.google.co...
Pinterest: / preshtalwalkar
Tumblr: / preshtalwalkar
Instagram: / preshtalwalkar
Patreon: / mindyourdecisions
Newsletter (sent only for big news, like a new book release): eepurl.com/KvS0r
If you buy from the links below I may receive a commission for sales. This has no effect on the price for you.
My Books
"The Joy of Game Theory" shows how you can use math to out-think your competition. (rated 3.9/5 stars on 32 reviews)
amzn.to/1uQvA20
"The Irrationality Illusion: How To Make Smart Decisions And Overcome Bias" is a handbook that explains the many ways we are biased about decision-making and offers techniques to make smart decisions. (rated 4.6/5 stars on 3 reviews)
amzn.to/1o3FaAg
"Math Puzzles Volume 1" features classic brain teasers and riddles with complete solutions for problems in counting, geometry, probability, and game theory. Volume 1 is rated 4.4/5 stars on 13 reviews.
amzn.to/1GhUUSH
"Math Puzzles Volume 2" is a sequel book with more great problems. (rated 4.3/5 stars on 4 reviews)
amzn.to/1NKbyCs
"Math Puzzles Volume 3" is the third in the series. (rated 3.8/5 stars on 5 reviews)
amzn.to/1NKbGlp
"40 Paradoxes in Logic, Probability, and Game Theory" contains thought-provoking and counter-intuitive results. (rated 4.3/5 stars on 12 reviews)
amzn.to/1LOCI4U
"The Best Mental Math Tricks" teaches how you can look like a math genius by solving problems in your head (rated 4.7/5 stars on 4 reviews)
amzn.to/18maAdo
"Multiply Numbers By Drawing Lines" This book is a reference guide for my video that has over 1 million views on a geometric method to multiply numbers. (rated 5/5 stars on 3 reviews)
amzn.to/XRm7M4

Пікірлер: 3 600
@MindYourDecisions
@MindYourDecisions 5 жыл бұрын
Happy 3 year anniversary! I'm honored the video was linked by Cleve Moler (creator of MATLAB). blogs.mathworks.com/cleve/2017/09/25/how-far-apart-are-two-random-points-in-a-square/
@zohar99100
@zohar99100 4 жыл бұрын
I did the same but with a circle of radius R instead of a square. That's a harder problem and I solved it. The answer is 128R/45π. No computer no excel no rows. Just a pure and accurate mathematical solution. For R=1 the answer is 0.905414787....... A computer solution (using a sample of 40,000 points) gives the same result. A very simple problem is to find the average length of a cord in a circle of radius R and the answer is 4R/π ( π= 3.141592654...)
@satyaanshu
@satyaanshu 4 жыл бұрын
I remember solving this in grade 12, for JEE prep
@tomz1364
@tomz1364 4 жыл бұрын
I challenge you to argue that this is not correct: the average = sqrt(2)/2. The longest distance =sqrt(2), the shortest = 0, therefore answer= (sqrt(2) + 0)/2 :)
@ketan9318
@ketan9318 4 жыл бұрын
Actually the term random should be mentioned explicitly as uniform distribution in this case. In general the answer to 'random' cannot be given.
@alexdemoura9972
@alexdemoura9972 4 жыл бұрын
According to _RANDOM POINTS ASSOCIATED WITH RECTANGLES_ (A.M. MATHAI, P. MOSCHOPOULOS, G. PEDERZOLI) published in _RENDICONTI DEL CIRCOLO MATEMATICO DI PALERMO_ , SERIE II - TOMO XLVIII (1999), pages 163-190 The average distance between random points in a rectangle is 1/15•( Lw³/Lh² + Lh³/Lw² + + d•(3 - Lw²/Lh² - Lh²/Lw²) + + 5/2• •( Lh²/Lw log [(Lw+d)/Lh] + + Lw²/Lh log [(Lh+d)/Lw] ) ) where: Lh - height length; Lw - width length; Diagonal d = √(Lw² + Lh²) In this specific puzzle Lh = Lw = 1 d = √2 1/15•( 1 + 1 + + √2•(3 - 1 - 1) + + 5/2• •( 1 • log (1+√2) + + 1 • log (1+√2) ) ) = = 1/15•( 2 + √2 + + 5/2•(2•log(1+√2)) ) = = 1/15•( 2+√2 + 5•log(1+√2) ) = = 0.52140543316472...
@ImranZakhaev9
@ImranZakhaev9 8 жыл бұрын
"Did you figure this out?" :l
@pornpori
@pornpori 8 жыл бұрын
"Who do you think watches these videos? Paul Dirac? Karl F. Gauss?
@peterlindner3283
@peterlindner3283 8 жыл бұрын
I was going to do it with excel and use 1million rows. He [Presh Talwalkar - the author] gets the answer using 10,000 rows. But I was stumped in his 2nd solution, even though I figured it would use integration. ...
@derciferreira7211
@derciferreira7211 8 жыл бұрын
I figured out!
@dropyghost
@dropyghost 8 жыл бұрын
Yes, Im my way to get my nobel prize, I solve this in a napkin.
@mpperfidy
@mpperfidy 8 жыл бұрын
Me too! Though I'd also just used the napkin to blow my nose, and its contents, including the solution to this problem, were broadly indistinguishable from one another.
@carryon5021
@carryon5021 4 жыл бұрын
"Did you figure this out?" - - I find this question to be mildly humiliating.
@joso5681
@joso5681 4 жыл бұрын
"mildly"
@___kavistaan___440
@___kavistaan___440 3 жыл бұрын
I found the answer in 3 minutes
@MaxGuides
@MaxGuides 3 жыл бұрын
I mean... there are several approaches to the exact right answer on this problem.
@mihitmahanta1850
@mihitmahanta1850 2 жыл бұрын
@@MaxGuides Hi I know i'm a year late, but could you briefly explain a few of the alternative approaches for this problem? I'd really appreciate it.
@666wurm
@666wurm 4 жыл бұрын
I immediately thought “about 0.5“. Turns out I was off only by
@jp4431
@jp4431 4 жыл бұрын
High five bro
@barneybarney3982
@barneybarney3982 4 жыл бұрын
I was like, well it something in between 0 and sqrt2 (so average is ~0.7) and smaller numbers should be more often, so lets multiply it by about 66%, and from head it was ~0.5
@DavyCDiamondback
@DavyCDiamondback 4 жыл бұрын
And now the warranty period on your product is cut in half. I’m an actuary, so I profit and the customer is screwed by your laziness
@jaishkhan7442
@jaishkhan7442 4 жыл бұрын
Lol same bruh I thought that since it has area of 1 so taking a line that divides it in two is 0.5
@heretolevitateme
@heretolevitateme 4 жыл бұрын
Pretty sure a circle with a radius of 0.5 would be 0.5. A square needs to be slightly larger due to the corners.
@CollinInGame
@CollinInGame 7 жыл бұрын
I'll never solve this. it took me 3 and a half minutes before I realised I could just close the video and not have to worry about it.
@Aethgeir
@Aethgeir 7 жыл бұрын
Your comment coupled with your profile pic is perfect!
@georgewashington6012
@georgewashington6012 7 жыл бұрын
+Real.Piece.Of.Work The laugh of loud.
@eboomer84
@eboomer84 7 жыл бұрын
It took me a minute or two using the Monte Carlo method he described first. Before I clicked, I was hoping there was some cleaver solution though, not just two obvious, conventional, brute-force methods.
@JohnDoe-kg5zm
@JohnDoe-kg5zm 5 жыл бұрын
I'll never [your weakness placeholder]. it took me [short period for micro despair] before I realised I could just close the video and not have to worry about it.
@fivish
@fivish 5 жыл бұрын
I guessed it was 0.5 and it was close to that.
@unvergebeneid
@unvergebeneid 8 жыл бұрын
"This doesn't look too hard. I'll just have to ... wait ... ok, now this is a bit more complicated than I .... uh. Holy ..."
@ryanmike9833
@ryanmike9833 8 жыл бұрын
Every damn video... :P
@michaelbauers8800
@michaelbauers8800 8 жыл бұрын
I have a minor in math, and I found it quite tricky. You really have to ensure you follow each step. If you didn't understand a step, I would post your question to some of the online math forums. That way you can maybe figure out where you got lost. For example, while I understood the concept of converting from rectangular to polar coordinates, I did not quite follow how that allowed a single integral. So in this example, I would have to go back to that step I failed to connect to dots, and start trying to get from A to B. Another thing to know is that some integrals are very hard to derive - you will note he glosses over the integrals, by just saying they are well known. It's like that in math classes too - sometimes you just use known integrals and such and they don't prove them to you. That's about as complex of an integral as I would personally like to deal with, heh
@justanothergirl__
@justanothergirl__ 8 жыл бұрын
+Gearbox: Focus on just regular, single variable integral calculus for now. Build your foundation in that before looking at multiple variables (and multiple integrals) with Jacobian transformations (changing your coordinate system(s) mid problem).
@dejaimeneto6093
@dejaimeneto6093 8 жыл бұрын
you just have to type that on wolfram alpha.
@justanothergirl__
@justanothergirl__ 8 жыл бұрын
Dejaime Neto well, C's do get degrees, so if that's what you want to do then I won't stop you from not learning.
@sigitrendang5195
@sigitrendang5195 4 жыл бұрын
No one: Automatic translator: *"Hey this is pressure locker"*
@megalul4141
@megalul4141 4 жыл бұрын
LULW
@g.l.rakesh8548
@g.l.rakesh8548 4 жыл бұрын
Yeah!
@xBZZZZyt
@xBZZZZyt 3 жыл бұрын
lol
@jamiehenson3385
@jamiehenson3385 3 жыл бұрын
Haha
@igxniisan6996
@igxniisan6996 3 жыл бұрын
Lmao
@rohitg1529
@rohitg1529 8 жыл бұрын
0 < average distance < 1.414...
@mb98765
@mb98765 8 жыл бұрын
hahaha lol
@YmohTheFrog
@YmohTheFrog 8 жыл бұрын
wow your teachers must have been pretty generous. I would have never received half credit just for that. my math teacher all through high school would have called it "bare minimum".
@lawrence8299
@lawrence8299 8 жыл бұрын
that's if you only consider the points that lie on the diagonal
@YmohTheFrog
@YmohTheFrog 8 жыл бұрын
Lawrence Mok Hmmmm nope. Any two points inside a square will be at a distance between 0 and length of side multiplied by sqr(2)
@siddharthajain9978
@siddharthajain9978 8 жыл бұрын
Actually we can say 0
@geovaniraffaelli4508
@geovaniraffaelli4508 7 жыл бұрын
I lost you at ''Consider a square...''
@camerongray7767
@camerongray7767 5 жыл бұрын
Nanika ahahaahah
@XICO2KX
@XICO2KX 4 жыл бұрын
😂
@lightsaberproductions8592
@lightsaberproductions8592 4 жыл бұрын
I lost him when reading the title: "What is the distance between 2 random points"
@That_One_Guy...
@That_One_Guy... 4 жыл бұрын
I lost it when i saw "mindyourdecision" name pop up
@lefterismagkoutas4430
@lefterismagkoutas4430 4 жыл бұрын
Why would I consider a square when the square never considers me?
@ФилиппЛыков-д8е
@ФилиппЛыков-д8е 5 жыл бұрын
The quadrupe integral _is_ tractable but it took me five A4 pages. And I have miscalculated the coefficients somewhere. So yes, your solution is better than what I could figure out.
@General12th
@General12th 5 жыл бұрын
Why did you specify A4 paper? Do you often use other sizes?
@ФилиппЛыков-д8е
@ФилиппЛыков-д8е 5 жыл бұрын
@@General12th As a rule, I just snatch a couple of sheets from my home printer. And they happen to be A4 :)
@shyambuddh5546
@shyambuddh5546 4 жыл бұрын
@@General12th without specifying A4 size we wouldn't have any idea of how much work it is. Of course, we still don't have the full idea because we don't know handwriting size and whether Filipp used both sides.. but we're a bit closer.
@ФилиппЛыков-д8е
@ФилиппЛыков-д8е 4 жыл бұрын
@The Absolute Madman But what size is a "piece of mind", I wonder? ;)
@YOM2_UB
@YOM2_UB 4 жыл бұрын
@@ФилиппЛыков-д8е A "Piece of Mind" is about 6 minutes 22 seconds.
@AltumNovo
@AltumNovo 7 жыл бұрын
Now do a cube.
@ewdlop1
@ewdlop1 7 жыл бұрын
It proably gets an extra intergal dz. The experission under sqrt becomes(x^2+y^2+z^2) and another factor of 2(1-z) inside this triple integral.
@renerpho
@renerpho 7 жыл бұрын
Thanks for the challenge, +Altum Novo. It turns out that the integrals get a lot more complicated. To allow the use of spherical coordinates, I place the cube centred at the origin. The first part of the problem is similar to the square case, and you get the integral over 8*sqrt(x²+y²+z²)(1-x)(1-y)(1-z) dx dy dz with limits -1/2
@renerpho
@renerpho 7 жыл бұрын
Oh, I was bet by half an hour... Well, still fun ;-)
@renerpho
@renerpho 7 жыл бұрын
Now, to answer that problem for any dimension: mathworld.wolfram.com/HypercubeLinePicking.html It turns out 7 is the lowest dimension where the answer is larger than 1. It actually goes to infinity with increasing number of dimensions.
@BenedictIrwin
@BenedictIrwin 7 жыл бұрын
The paper on box integrals in the references is a good read.
@FilipeSantos-wg9pd
@FilipeSantos-wg9pd 6 жыл бұрын
You know the maths are hard when Preshtal Walker stutters while explaining xD
@parikshitmusic510
@parikshitmusic510 6 жыл бұрын
Lol
@unknownknown347
@unknownknown347 5 жыл бұрын
It's Presh talwalker. Talwalker is an Indian surname.
@manumalhotra3520
@manumalhotra3520 5 жыл бұрын
you butchered his namd flip santa
@benoitschwob3498
@benoitschwob3498 5 жыл бұрын
Preshtal Walker ??? Do you know his brother Lukesky?
@bhojjadamotabanda
@bhojjadamotabanda 5 жыл бұрын
And Talwalkar is actually pronounced as Tull-vull-kurr, as in "hull" of the ship and the first "T" is pronounced as it is pronoucned in Spanish. Talwalkar's is a big health company in India with a chain of gyms and other fitness products. Named after its founder, Vishnu Talwalkar. "Kar" is suffix in the Marathi language which is preceeded by a place name, usually ancestral village and signifies a person from that place. Just like LondonER, New YorkER. Talwalkar is someone from "Talwal". People from Mumbai are referred to as Mumbaikars.
@mrWade101
@mrWade101 8 жыл бұрын
This is my math skills: Shortest length 0 Longest length Sqrt 2 so sqrt 2 / 2 ? (≈0.707106781)
@96hugoS
@96hugoS 8 жыл бұрын
But there's only 2 ways of making a length of sqrt 2 and many more for other combinations
@HYEOL
@HYEOL 8 жыл бұрын
but is the distribution of lengths bell shaped?
@parkers.8748
@parkers.8748 8 жыл бұрын
That's what I thought
@victor6543211
@victor6543211 8 жыл бұрын
in the lottery you eitheir gain 1 million dollars or 0 dollars, so, in average, you gain 500k dollars. Congrats!
@GraveUypo
@GraveUypo 8 жыл бұрын
this would only work for a sphere.
@FelixNielsen
@FelixNielsen 8 жыл бұрын
Did I figure it out? Who do you think I am? Stephen Hawking?
@Noah-fn5jq
@Noah-fn5jq 8 жыл бұрын
This is much lower level then Stephen Hawking
@FelixNielsen
@FelixNielsen 8 жыл бұрын
That wasn't really the point was it? For many people, myself included, even though I'm actually rather good at math, integrals and differentials is advanced stuff. Personally I've had the opportunity to learn at least, but there's simply too much to remember for my defective memory. It's not simply a matter of understanding the concepts, like with say trigonometry.
@Noah-fn5jq
@Noah-fn5jq 8 жыл бұрын
Felix Nielsen For some people this level of problem is as "simple" as trigonometry (whether due to trigonometry being foreign or a comfort with calculus). You comparing this problem to Stephen Hawking level analysis insults all those that are ambitiously attempting to solve his standard problems but sometimes falling short. It's like saying "everything you've done before is SO SIMPLE (and those that haven't gotten them are dumb)... but NO ONE can get this one because I can't. So stop teaching us and give us more problems that make me feel good about myself!" In the end, I just found your opening post a bit insulting.
@FelixNielsen
@FelixNielsen 8 жыл бұрын
You're not listening. You made something big out of something small, and I explained why it is in fact objectively very difficult. That's that. There's nothing else to is. Furthermore you proclaim that I'm insulting people, when nothing could be further from the truth. That in itself is an insult. You then go on to tell em what to do and not to do, and implying that I'm stupid. You can't put it however you like. It is you who are in the wrong and it is you who have made an insult. As for the problem, I have no issue with it on it's own, but asking "Did you figure it out?" as that is in anyway likely, is rather stupid I think, though that was not at all why I posted what I posted. It was simply a proclamation that I didn't have a chance in hell of figuring it out. I wouldn't even know what to Google for, and though you obviously will find it hard to believe, I am actually rather intelligent, I simply don't have the ability to remember a bunch of complicated formulas that have no use in everyday life.
@Noah-fn5jq
@Noah-fn5jq 8 жыл бұрын
Felix Nielsen As a comparison, I found it fairly simple... so how would you like it if this was his standard difficulty (my guess is you wouldn't watch his videos then) and you still tried them to further your mind, but then at some point someone (me for an example) wrote "this puzzle is ridiculous!" even after he explained it. You can take offence to my description or the fact that I called you out... honestly I don't care. I'm just trying to inform you that your comment could be taken offensively (although I was trying to do that discretely to begin with.. but you didn't seem to understand).
@flamingpaper7751
@flamingpaper7751 5 жыл бұрын
I mean I dont get what happened but it looked cool and seems real
@Toopa88
@Toopa88 7 жыл бұрын
my guess was 0.5 without watching
@petethewrist
@petethewrist 7 жыл бұрын
Me two but, those corner got me..
@Trias805
@Trias805 7 жыл бұрын
My guess was ~0.7 (square root of 0.5)
@PickyMcCritical
@PickyMcCritical 7 жыл бұрын
My guess is 1/3 of sqrt(2) EDIT: Yep, wasn't even close lol
@mrigayu
@mrigayu 7 жыл бұрын
same
@SeanR794
@SeanR794 7 жыл бұрын
ToFu right? Just say the longest distance possible was 1 and the smallest distance possible is really minute and is practically 0. So it's about .5 or just a little over since you know the distance could never be exactly 0.
@Kenlimepie
@Kenlimepie 7 жыл бұрын
"Did you figure it out?" What am I? Einstein?
@majorinconvenience
@majorinconvenience 4 жыл бұрын
LMAO when the question was posed I said to myself: “About 0.5?” Then after complex mathematical disambiguation it turned out to be just ABOUT that
@falseee4445
@falseee4445 4 жыл бұрын
We r both haha
@kjsaggu
@kjsaggu 4 жыл бұрын
Haha same
@RosidinAli
@RosidinAli 4 жыл бұрын
Lmao
@Anthropomorphic
@Anthropomorphic 4 жыл бұрын
Same here.
@KNhunterX
@KNhunterX 4 жыл бұрын
Same here. Sometimes intuition is really powerful.
@nicholasw996
@nicholasw996 8 жыл бұрын
Please do more videos like this, not the primary school level mathematics in many recent videos.
@afrofaust1913
@afrofaust1913 8 жыл бұрын
Then he'd just be doing videos for math-heads, and that's a terrible viewerbase ;)
@Czeckie
@Czeckie 8 жыл бұрын
I agree with you! I've considered to unsubscribe before watching this new video.
@empmachine
@empmachine 8 жыл бұрын
i 2nd that.. drop the easy ones, this video was awesome! it's been awhile since I've been totally stumped by MYD. normally i either get it, or fall for the trick.. i guess i did realize the numerical brute force approach, but that doesn't really count. geeze I forgot a lot of calc. Thanks again MYD for the fantastic puzzle!
@dropyghost
@dropyghost 8 жыл бұрын
Maybe he should have two separated channel. I understand like 30% of the mathematics. Wasnt really that fun.
@kckcmctcrc
@kckcmctcrc 8 жыл бұрын
lol...I was just thinking the exact opposite of what you posted. This was way over my head. I am however glad there are bright math folks like you.
@AnstonMusic
@AnstonMusic 8 жыл бұрын
I thought that there have been too many easy questions in the past weeks, but this was really top notch! Loved every moment of it. I'm gonna miss maths a little going to Med School, but hey, I'll find my own problems that need mathematical modeling. Thanks for quenching my thirst and keeping up the drive!
@AnstonMusic
@AnstonMusic 8 жыл бұрын
Never mind, I apparently forgot about the harder ones. Whoops.
@strangelic4234
@strangelic4234 8 жыл бұрын
Please defend your lust for math recklessly. I don't know how often I had to explain the rule of three to a "doctor", when I used to work as an EMT.
@carsonbarlow348
@carsonbarlow348 8 жыл бұрын
That was a bit sadistic.... Good thing I'm a bit masochistic. ;)
@lagalil
@lagalil 8 жыл бұрын
Medicine has maths.
@strangelic4234
@strangelic4234 8 жыл бұрын
lagalil Many physicians haven't.
@HakanTheUltimateHoca
@HakanTheUltimateHoca 6 жыл бұрын
Just guessing before the video, is it (2+√2+5ln(√2+1))/15 ?
@commelinales
@commelinales 6 жыл бұрын
Hakan Çakıcı You're the Lottery Terminator.
@arthurg.machado6803
@arthurg.machado6803 6 жыл бұрын
Hakan Çakıcı pretty good intuition you've got there ,huh?
@アヤミ
@アヤミ 6 жыл бұрын
Jesus christ it’s Jason bourne.
@6subswith0vids80
@6subswith0vids80 6 жыл бұрын
Hakan Çakıcı u cheated
@bencasica4047
@bencasica4047 6 жыл бұрын
YipHyGaming - Minecraft Agario Cytus and more! goteem
@tennicktenstyl
@tennicktenstyl 7 жыл бұрын
I came here just to watch some smart numbers popping on the screen lol.
@PickyMcCritical
@PickyMcCritical 7 жыл бұрын
Smartest thing I've read so far lol
@mortkebab2849
@mortkebab2849 6 жыл бұрын
While enjoying a glass of slivovitz.
@6subswith0vids80
@6subswith0vids80 6 жыл бұрын
S m a r t n u m b e r s
@yousefghanem5108
@yousefghanem5108 5 жыл бұрын
So friken accurate 😂
@_bender4143
@_bender4143 8 жыл бұрын
That was interesting. Here is a much simpler version: what is the average length between two points on a line segment length 1?
@xXxBladeStormxXx
@xXxBladeStormxXx 8 жыл бұрын
1/3 and that one is only much simpler as a mechanical calculation. There, you have to think about which domain is the absolute value |x1 - y1| positive / negative and split the integral accordingly.
@BurninAss
@BurninAss 8 жыл бұрын
Can you explain this in a little more detail? I don't really understand your explanation. My numerical approach to solving this sees everything as absolute values and still spits out 1/3 as an answer.
@xXxBladeStormxXx
@xXxBladeStormxXx 8 жыл бұрын
BurninAss Well, you have two random variables X and Y ~ Uniform(0, 1) distributed as uniform between the range 0 and 1. What you wanna find out is the expected value (average) of the random variable say S = |X - Y|. To get this average distance, you integrate over |x-y| dx dy with limits of double integration being x going from 0 to 1 and y going from 0 to 1. To do this integral, you have to get rid of the absolute value bars. |x-y| is just (x-y) for all values of y x. So you split the double integral into these two parts (or just 2 times the first part since it's symmetric), and change the limits for y integral from y = 0 to 1, to y = 0 to x (since this is the region where y (x-y)). From there onward it's an easy double integral. It will make a lot more sense if you just write the steps down on a piece of paper.
@BurninAss
@BurninAss 8 жыл бұрын
wow that was fast! Having to get rid of |x-y| for an integral was the part that I was missing. Thanks.
@_bender4143
@_bender4143 8 жыл бұрын
xXxBladeStormxXx I actually worked it completely different: If we divide the segment to N equal segments, say 10, and the points can only be between segments - the expected value is 2*1 + 2*0.9*0.1 + 2*0.8*0.2 +2*0.7*0.3 ...(combinatorics) Now, if When N approaches to infinity this sum becomes the integral 2*x*(1-x) dx from 0 to 1 which is 1/3.
@zixuan1630
@zixuan1630 5 жыл бұрын
So infinite many possibilities, I'm going to use calculus. (a few minutes later) Ugh, this is hard.
@BixbyConsequence
@BixbyConsequence 7 жыл бұрын
"Did you figure it out"? Yeah, I did it in my head.
@dummdmdyummmmmmmmmme
@dummdmdyummmmmmmmmme 7 жыл бұрын
"Did you figure it out?" Really... you actually asked that question?
@MathAdam
@MathAdam 4 жыл бұрын
4:21 Simplifies into a double integral. This is going to be a long haul.
@andrewmurphy5310
@andrewmurphy5310 3 жыл бұрын
This is the point I started reading the comments.
@firelow
@firelow 8 жыл бұрын
How the fuck am i supposed to know how hard this is for regular people if its not written in the title?
@androidkenobi
@androidkenobi 8 жыл бұрын
you flip to the back pages in your Book of Life for the answers, duhhhh
@ar_xiv
@ar_xiv 8 жыл бұрын
I guess you have to watch the video while being a regular person
@TechnoCreeper2016
@TechnoCreeper2016 8 жыл бұрын
You should know by now this is a channel for smart people.
@SOLAR_WillToWin
@SOLAR_WillToWin 8 жыл бұрын
Thinking about it is a good exercise even if you don't come up with the answer yourself.
@JohnAlexiou
@JohnAlexiou 8 жыл бұрын
I was wondering what percent of population could easily follow. I could, but I bet only a tiny fraction could even do the polar coordinate transform.
@whozz
@whozz 7 жыл бұрын
What is the average distance between two random points in a unit circle?
@Robobrine
@Robobrine 7 жыл бұрын
0.905
@whozz
@whozz 7 жыл бұрын
Robobrine How did you calculated that? 128/(45pi)
@Robobrine
@Robobrine 7 жыл бұрын
I wrote a small program to brute force calculate it.
@carlossoto9511
@carlossoto9511 7 жыл бұрын
I calculated the integral (probably wrong), and it yielded pi / 4
@whozz
@whozz 7 жыл бұрын
Unfortunately, you're wrong. The answer is 128 / (45 * Pi) ~ 0.9054147...
@VivekSingh-ts1ec
@VivekSingh-ts1ec 5 жыл бұрын
First i thought that its a tough question...... Soon i realized that i can't even understand the solution part
@Mobin92
@Mobin92 8 жыл бұрын
I guessed 0.5 at the beginning.... That totally counts ._.
8 жыл бұрын
I gussed a littlebit over 0.5 :D
@HubrisInc
@HubrisInc 8 жыл бұрын
Yeah, gut instinct lead me to .5 as well.
@CloudeAytr
@CloudeAytr 8 жыл бұрын
No, no it doesn't.
@neptez
@neptez 8 жыл бұрын
Somehow i felt intuitively that the answer is 0.5...
@Uranya7x
@Uranya7x 8 жыл бұрын
the SAME
@rinthh5477
@rinthh5477 8 жыл бұрын
Me to!
@turun_ambartanen
@turun_ambartanen 8 жыл бұрын
nice, but it isn´t
@kotzzz9
@kotzzz9 8 жыл бұрын
if you model it with continuous uniform distribution thats the answer you ll get but its too simple unfortunately
@kotzzz9
@kotzzz9 8 жыл бұрын
+kotzzz9 since its assuming that the points are across a line rather than along a square
@onenameleft
@onenameleft 6 жыл бұрын
Wow.. Even when I don't come up with the answer myself, I can usually follow your explanations. this one was just beyond. I took Calculus in college 20 years ago, but I'm clearly rusty. I understood the estimate process, but the double integrals and how you got the numbers you did when you switched to absolute values of delta instead of calculating distances between all points... that was beyond me. I guess that happens when you take something that could be a class long lecture and instead of having time to teach it, you have to condense it down to a 10 minute follow me while I do the problem. It's still enjoyable to watch. And it make sense to me that the average would be lose to .5. I'm not sure i can explain why, but i just expected the average to be close to half the distance of the lengths of the legs. since the hypotenuse of a right triangle with sides 1 is only 1.4 does that help the average stay closer to half the legs. Would the average distance of a square with sides 3 be way larger than 1.5? and would it get further away from the middle as the sides got bigger because distances can go diagonally?
@christyjestin
@christyjestin 2 жыл бұрын
No, I think the answer for a square with side length n should just be n times Presh's answer. Suppose we gave this problem a concrete unit like yards. The average distance should be x yards where x is the value Presh found. Now if we instead considered each side as being 3 feet = 1 yard, we'd have the problem you asked about. The side length hasn't actually changed, so the answer should still be x yards and when we convert that to feet, we get 3x feet. Since this logic works for any two units of measurements (w/ any ratio), the average distance should always be nx for a square with side length n.
@電腦騙徒剋星
@電腦騙徒剋星 2 жыл бұрын
I think the hard part here is not even the integral , it is how you break down the problem of doing expected values
@ximecreature
@ximecreature 8 жыл бұрын
Well, mentally I got this : Minimal distance : 0 Maximal distance : Sqrt (2) (the diagonal) Average? Sqrt(2)/2 Which is within boundaries. Then I saw your video and felt stupid. Someone with me?
@holonaut
@holonaut 8 жыл бұрын
I think this would be correct for a line of the length sqrt(2).
@superdau
@superdau 8 жыл бұрын
I started with that as well, but then immediately saw that the number of "possibilities" increases the shorter the distances are.
@ximecreature
@ximecreature 8 жыл бұрын
Indeed. I think this is were I missed the point of the question and the "very hard" pqrt
@1Joren
@1Joren 7 жыл бұрын
Started with sqrt(2)/2 as well. Didn't imagine the problem to be this complicated
@ramacanda
@ramacanda 7 жыл бұрын
PositiveANegative i thought the same as you. i got 0.7
@slateflash
@slateflash 7 жыл бұрын
"did you figure it out?" *HEEEELLLL NOOOO*
@MindYourDecisions
@MindYourDecisions 6 жыл бұрын
I'm grateful whenever someone features my work. Now I'm returning the favor by featuring some of the places MindYourDecisions is showing up. I'm honored to be mentioned by Cleve Moler (creator of MATLAB) in this post: How Far Apart Are Two Random Points in a Square? Check it out! Link: blogs.mathworks.com/cleve/2017/09/25/how-far-apart-are-two-random-points-in-a-square/
@neelakshmishra9614
@neelakshmishra9614 6 жыл бұрын
MindYourDecisions it was a bounce..... I did not understand it 😅😅
@sanskaracharya3585
@sanskaracharya3585 6 жыл бұрын
Hi,presh ..I have a great question...How can I mail you?
@xyz.ijk.
@xyz.ijk. 6 жыл бұрын
He estimated >0.52 to start ... I thought it would be just over 0.6 based upon an average of the maximum diagonals and the maximum straights.
@ManHeyuan
@ManHeyuan 6 жыл бұрын
I beg to differ. Why is it so complicated, yet illogical? To calculate the average value of the distance between all the possible 2 random points, we first need to map out, a near infinite number of pairs of points. The closer the distance between any 2 points, the higher the chance of occurrence. This will logically produce a near infinite pairs of infinitely close points. Therefore, the principles of probability dictate that, the average distance between 2 random points in the square, should give an approximate value infinitely close to 0. The longest possible distance between any 2 points in the square, are the lengths between its diagonal ends. The points that produce the shortest possible distance (which is near 0), meanwhile, will fill up every space in the square. Final answer has to be close to 0. ☺️
@katzenMaul
@katzenMaul 6 жыл бұрын
Yi Jiun , I think that the reason why the result is not 0 is that, due to the uniform distribution of the points, the probability to get a very small distance for example < 0,002 = pi*0,002^2 is smaller than to get an more bigger distance 0.002< 0.5 = pi*0,5^2 - pi*0,002^2
@TheRocketRaider
@TheRocketRaider 8 жыл бұрын
Why am I watching this? I have to wite a paper for college... and I don't even know how to math
@Trynottoblink
@Trynottoblink 8 жыл бұрын
I hear you. One time I binge-watched math videos to avoid studying for a physiology exam.
@NicoA47
@NicoA47 8 жыл бұрын
Ah good, so I'm not the only one.
@hattenkofer
@hattenkofer 8 жыл бұрын
Luckily you know how to English.
@Reylaymon
@Reylaymon 8 жыл бұрын
i don't even know how i got to this video why am i here
@mrvampire7577
@mrvampire7577 8 жыл бұрын
I concluded 0.6 in a (less than) 10 second estimate... close enough for a lazy man.
@Tomahawk1999
@Tomahawk1999 5 жыл бұрын
Did you figure this out? Me: .... only part i figured out is i cant figure it out
@finnkoepke2250
@finnkoepke2250 8 жыл бұрын
solved it using python am i good at maths now?
@112BALAGE112
@112BALAGE112 8 жыл бұрын
He's better than you cuz he solved it in Excel.
@richarddangle6516
@richarddangle6516 8 жыл бұрын
No, I'd definitely choose Python over Excel.
@yuvalgat4163
@yuvalgat4163 8 жыл бұрын
The question is, did you run a big test and took the average, or actually calculated the math?
@tinyman392
@tinyman392 8 жыл бұрын
How many repetitions did you run, and how did you come up with the number of religions to run?
@finnkoepke2250
@finnkoepke2250 8 жыл бұрын
i calculated the average using 2000 small tests.
@ElitAcilan
@ElitAcilan 7 жыл бұрын
I set up the quadruple integral and then let computer solve it for me :D
@monkeyCh27
@monkeyCh27 5 жыл бұрын
This doesn 't look that hard *sees solution* What the f...
@Jotakumon
@Jotakumon 8 жыл бұрын
Figured it out until the quadruple integral. Then got stuck. Also had the idea of using the Delta(x) and Delta(y) as variables, but I thought that would just give me much more work, finding the distribution etc., but it turns out to be easier.
@5eurosenelsuelo
@5eurosenelsuelo 8 жыл бұрын
Could explain me why using that integral? Or tell me a webpage with related information. I'm looking forward to understand it
@Jotakumon
@Jotakumon 8 жыл бұрын
5eurosenelsuelo I used a result from probability. We have that tge average of the value of an event is the sum of all the possibilities times their respective probabilities. For instance the average when you throw a die is: 1/6*1 + 1/6*2 + ... + 1/6*6 = 7/2 Now this is for a discrete space, i.e. we can count those events. The problem above is that the points can be everywhere in the square, and their coordinates a real, so they coule be any irrarional number. But the idea is basically the same. You take the sum of all possible values times their respective probability. In this case it will be an infinite sum of infinitely small terms (as the probability of getting one point among infinitely many is infinitesimally small). So we'll get an integral. Here the event is getting two points P and Q, and the value is the event. The probability of getting two particular P and Q is infinitesimally small. But we have discretisise the square. We can draw a grid that splits it into n columns and n rows. Each intersection of the grid is the possible points that we could get randomly. In that case we get the same problem, but with a finite number of points for a fixed n. So we can use our formula for the average in discrete spaces, i.e. the sum of all possible values times their probabilities. Then we let n tend to infinity and we get our result. If we fix the point P and the first coordinate of Q, then we just move the second coordinate of Q. Then we'll get a sum from k= 0 to n of terms dependent on n (and k). By rewriting it a bit, we can use Riemann integration to write the limit of a sum as an integral, namely: lim (n->0) 1/n*sum(k = 0 to n) of f(k/n) = integral (from 0 to 1) of f(x)dx. The 1/n will come from the probability of the second coordinate of Q being one of the n possible values, f will be the length of the segment [PQ]. So you get the first integral. By doing that now for each coordinate we get four of these. There are some other ways to explain it, the same principle though. The second method he uses after realising that 4 integrals is a lot is actually the same. Just now he takes the different lengths Delta(x) can have instead of the different values the coordinates can have. All he has to do is to adapt the probability, namely adding the probability that the segment has length Delta(x). And same for Delta(y).
@5eurosenelsuelo
@5eurosenelsuelo 8 жыл бұрын
That's a nice explanation You helped me so much. Thank you:)
@5eurosenelsuelo
@5eurosenelsuelo 8 жыл бұрын
All right I thought I got it but when I tried in a paper I realizided I can't yet. The example with the die is nice and I totally understand it. I'll try to write with math but it's very hard here (value of the event 1)*(prob of the event 1)+(value of the event 2)*(prob of the event 2)+etc In this case the event is the distance between PQ which numerical value can be calculated by pythagoras and can take any value from 0 to sqrt2 for this square. Then I have to multiply each event by its probability and here is when I get lost and mad. I see I'll need to integrate to do that multiplication because we're working with infinite values but I just don't see how to know what's the probabilitie of each event. I understand you already tried to explain to me so if you think you did all you could is totally perfect if you redirect me to some book or webpage. Thanks anyway:)
@Jotakumon
@Jotakumon 8 жыл бұрын
5eurosenelsuelo I'll try to write it mathematically. Imagine you have split the square into n rows and n columns, by painting a grid into the square. Now you don't accept all points on the square, but only the intersections of the grid. So you get (n+1)² points, or n² or (n-1)², depending on whether you take the the border of the square into consideration. To make it easier let's say we have n² points, that is if we take the points on the left and bottom border, but not the ones on the right and upper one. So the points have for x-coordinate one of the following: 0/n, 1/n, 2/n, 3/n, ... (n-1)/n; and for y-coordinate: 0/N, 1/n, 2/n, 3/n, ... (n-1)/n. For instance points on that set would be (1/n, 5/6), (0,2/6) for n = 6. Points that are *not* in that set would be for example: (0, 2/5), (3/6, pi), (0,1). Let's call that set A_n. So here you have finitely many points: n² to be precise. I name you any two points B and C. What is the probability, if you take two random points of that set A_n, to get B and C? That's 1/n² * 1/n² = 1/n⁴ (B and C can be equal). We have that A_n² ist the set of all pair of points in A_n, right? For any pair in A_n², we have consider it's length, i.e. the distance between the two points. So now to calculate the average length, we can take the sum of the lengths of all pairs in A_n² times the probability that they appear, which is 1/n⁴. So the average would be: sum over all pairs p of A_n² of [1/n⁴ * length(pair)] = 1/n⁴ * sum over all pairs p of A_n² of length(pair) Now we can split that into 4 encapsulated sums, the 1st sum makes varying the x-coordinate of the point A, the 2nd sum makes varying the y-coordinate of the point A, the 3rd sum makes varying the x-coordinate of the point B, and the 4th sum makes varying the y-coordinate of the point B. Eventually we can split the 1/n⁴ into four 1/n, each one will be put in front of a sum. So the inner sum will be: 1/n * sum 0 to n of [lenght(pair)] and the length of the pair can be described by the coordinates of the points. This will give us a Riemann integral if we let n tend to infinity. So we'll get the integral from 0 to 1 of the length(pair)dy_B . Then by doing the same with the other sums we will get the four integrals and dy_B*dx_B*dy_A*dx_A in the end. Another way, and maybe an easier one too, is to see this it the following way: Let be A the set of all points in the square (so [0,1]²), then A² is the set of all pairs of points in the square ( = [0,1]⁴). Let be p in A² a pair of points. Let d be the distance function, so d(p) gives the distance between the two points that form p. You see that we don't really talk about distance of two points (which are two objects), but length of a pair p (one only object) in A². The average length in the square is then given by: integral over A² of [d(p) (dμ)] (dμ defines the measure, not important for now, it's like the dx in a one-dimensional integral). That's a result from probability. Actually it derives directly from the definition of the average in probability (in continuous spaces). So you go over all A² and integrate the length. You can also take you variables x_1,x_2,y_1,y_2 to describe the points (x_1,y_1) and (x_2,y_2). So to go over all A² = [0,1]⁴, you can go for x_1 over [0,1], then for x_2 over [0,1], for y_1 over [0,1] and y_2 over [0,1], and your dμ will become dx_1*dx_2*dy_1*dy_2. So you'll get the integral that we looked for.
@ElleTGC
@ElleTGC 8 жыл бұрын
I said 0.5 technically I won
@17Murkin
@17Murkin 8 жыл бұрын
Yeah the most lines you can make that are unique are about half since you can have 2x as many as full length lines and u can have more 3rds 4ths etc, but the opposite value of larger lines balances it our 2/3rd lines etc... makes sense in my head... lol.
@ElleTGC
@ElleTGC 8 жыл бұрын
+.AIQ. I get it, but it's 3:05AM right now and I can't be bothered with da maths.
@michaelmolter6180
@michaelmolter6180 8 жыл бұрын
I was able to plot the distribution of lengths, and it 'balances out' as you assumed; however, it is right skewed. I wish there was a way to post it in the comments.
@szech246
@szech246 8 жыл бұрын
Me to
@StephenButlerOne
@StephenButlerOne 8 жыл бұрын
My guess was just over 0.5, seemed obvious.
@koldovalnya
@koldovalnya 4 жыл бұрын
Max: Root of 2 Min: ~ 0 Avg: ~ r2/2
@cbmajor6017
@cbmajor6017 4 жыл бұрын
that what i did lol
@mrsamsun912
@mrsamsun912 4 жыл бұрын
Unfortunatly for...all of us, maths do not work like that. Damn.
@paolofederici
@paolofederici 4 жыл бұрын
I also thought in this way There are infinite points, so infinite distances between two points. The max is root of 2 ... agree The min is 0,0000000000000000....1 So that (root of 2 plus 0,000000000... 1) / 2 should be the answer. 1,41421356237 + 0,00000000001 = 1,41421356238 : 2 = 0,7071 ...
@nikitakipriyanov7260
@nikitakipriyanov7260 4 жыл бұрын
0.707, too bad estimate
@MottBotMinecraft
@MottBotMinecraft 4 жыл бұрын
I also jumped to root(2)/2 but I believe the min could be zero if the two points you generate have the same coordinates
@ophello
@ophello 8 жыл бұрын
"Did you figure it out?" FUCK no.
@morning5tarr
@morning5tarr 4 жыл бұрын
Imagine this question being asked in Computer science interview.
@bennettkrack9247
@bennettkrack9247 4 жыл бұрын
The Monte Carlo solution he showed first would probably be the correct answer in any CS interview.
@peterpan408
@peterpan408 3 жыл бұрын
Agree, keep iterating until the result stabilizes to the desired precision.
@bjrnarflate5884
@bjrnarflate5884 3 жыл бұрын
"I'm guessing it's about 0.5, but a bit off" "This probably has some analytical solution I would not think of in a hundred years" "Eh, just simulate the thing numerically"
@gertoppermann9230
@gertoppermann9230 3 жыл бұрын
True, I knew I couldnt solve that Problem but 5 lines of python and a 2-minute wait gave an even more accurate solution :)
@asiamies9153
@asiamies9153 3 жыл бұрын
What is your reasoning for the "a bit off" part, though?
@asiamies9153
@asiamies9153 3 жыл бұрын
@@gertoppermann9230 How many simulations did you do?
@gertoppermann9230
@gertoppermann9230 3 жыл бұрын
@@asiamies9153 I think for about 100 million. After that the average was steady enough that i concluded the result should be very close to the real answer, which was enough for me.
@asiamies9153
@asiamies9153 3 жыл бұрын
@@gertoppermann9230 okay
@kyc269
@kyc269 7 жыл бұрын
"We have now simplified the integral" I have no idea what's going on.
@AlchemistOfNirnroot
@AlchemistOfNirnroot 7 жыл бұрын
Just gonna guess sqrt(2)/2
@AlchemistOfNirnroot
@AlchemistOfNirnroot 7 жыл бұрын
Yh, I had no chance :P I can do integration for basic functions using rudimentary methods(IBP,u-sub etc), but chancing coordinates for a quadruple integral? Nah.
@TheDGomezzi
@TheDGomezzi 7 жыл бұрын
This was my guess too! Did you get this by starting from the 1 dimmensional version and putting that into the distance formula?
@pimakpimak
@pimakpimak 7 жыл бұрын
I estimated that by doing what you just said
@muriloferreira6307
@muriloferreira6307 7 жыл бұрын
But is it right? That was also my guess o/
@kennethfuher1686
@kennethfuher1686 7 жыл бұрын
I thought root(2)/2. What I did is I said: What's the maximum possible distance? Well that'd be 1 squared plus one squared and then the sqrt of that. So root(2) is the maximum distance. If the minimum possible distance is zero, just average them out. root(2) plus zero is root(2), then divide it by two.
@TaleshicMatera
@TaleshicMatera 3 жыл бұрын
My first guess was about 0.561 so I'm pretty happy with that My solution, vaguely, was that the answer had to be bounded between 0 and sqrt(2), but more realistically, between 1/2 and sqrt(2)/2 Since those two extremes were when my line crossing the square was horizontal (theta=0) or diagonally (theta=45 degrees), I just averaged them according to theta (integral 0.5/cos(x) dx from 0 to pi/4)/(pi/4 - 0) = about 0.5611.... I only swept out 1/8th of the square because all the other 8ths would've been the same.
@newplayer3259
@newplayer3259 2 жыл бұрын
I got same answer by imagining. I imagined a square with 16 points in he shape of a square and drew a diagonal cutting the square into 2 triangles and I chose one of it, starting at one of its vertex there are 9 outcomes and 9/16 tuns out to be 0.5625. Idk why but it worked that way.
@newplayer3259
@newplayer3259 2 жыл бұрын
As the points keep increasing in the shape of a square that is 16, 25, 36 the answer by this method is approaching 0.52
@KeyserSoseRulz
@KeyserSoseRulz 7 жыл бұрын
You should have labeled this video with WARNING GRAPHIC VIDEO instead of very difficult.
@dominikzivanovic1200
@dominikzivanovic1200 5 жыл бұрын
07:30 is that a rhetorical question 😂
@arrogantuser
@arrogantuser 4 жыл бұрын
This exact problem was a question on a homework set in my probability theory course. Our textbook covered a similar problem that I referenced heavily while working on it and it still took a good part of an hour to finish. This video makes it seem so simple, well done.
@nikolaytsvetkov4661
@nikolaytsvetkov4661 8 жыл бұрын
I don't know the answer yet but would like to solve it for the circle (with a d=1) as well.
@Vladislavchooo
@Vladislavchooo 8 жыл бұрын
fellow bulgarian :?
@pairot01
@pairot01 8 жыл бұрын
r=1 *
@Nivaldo85
@Nivaldo85 8 жыл бұрын
I tried the spreadsheet method, for a circle of radius 1 or diameter 2, and i got about 0.72, so for a circle of diameter 1, from my calculations, it should be 0.36. Not really sure 100%.
@DC-wv2zg
@DC-wv2zg 8 жыл бұрын
Hm, I tried something with MatLab and got 0.453. I created to sets of Points with coordinates between -0.5 and +0.5 and then removed all points with a distance to the origin greater than 0.5. After that I calculated the distance between two points, one from each set, and took the mean. But maybe I'm wrong.
@pairot01
@pairot01 8 жыл бұрын
11011100DC Seems like you only used points a line (a diameter of the circle) and not the whole space of it
@andrasfogarasi5014
@andrasfogarasi5014 8 жыл бұрын
Since I have no idea on how to approach this problem, so I wrote a python script that calculates the avarage of random arrangements. I've got 0.52.
@rspandit4786
@rspandit4786 5 жыл бұрын
I wrote a PHP script that iterated through every line in an n x n grid and came out with 0.5214575816589 (for n=9999) - higher values of n would give me higher accuracy but not a great deal of point due to the time it takes to brute force this. Would never have been able to do that integral
@battleryeet7936
@battleryeet7936 5 жыл бұрын
Difficulty: 1+1 Easy Normal Hard Very hard *Asian*
@insanitycubed8832
@insanitycubed8832 7 жыл бұрын
facebook baby stuff one day and rocket science the next, I will never understand you.
@GermansEagle
@GermansEagle 8 жыл бұрын
Just use analitical geometry and make it so x+y=1. And (x1 - x2)squared + (y1 - y2)squared = (the result)squared. It's literally pitagorium, sorry for the awesome english, I am black.
@GermansEagle
@GermansEagle 8 жыл бұрын
Oh shit, he did that. Well goly, was that a waste of time... Oh boy, time to get the rope ready.
@ChrisJaesun
@ChrisJaesun 8 жыл бұрын
wait why would x+y=1
@michaelbauers8800
@michaelbauers8800 8 жыл бұрын
Because penguins don't play D&D. Do I have to explain everything to you Floradragon? ;)
@michaelbauers8800
@michaelbauers8800 8 жыл бұрын
hockey player or emperor?
@FireyDeath4
@FireyDeath4 3 жыл бұрын
Right, this went so completely far over my head that I don't even care at this point.
@PaulSmith-pr7pv
@PaulSmith-pr7pv 3 жыл бұрын
Yeah it relied on a lot of background knowledge. A university mathematics course helps, though you can always teach yourself. 3brown1blue channel has a load of great videos.
@asiamies9153
@asiamies9153 3 жыл бұрын
@@PaulSmith-pr7pv Which courses would be enough? calc 1, 2, 3?
@christianbarnay2499
@christianbarnay2499 8 жыл бұрын
Reduction from quad integral to double using p.d.f. is thrown without a single explanation as to why it works. One important thing I've learned in my school days (before and after graduation) is that reducing nested integrals is never trivial. This seems like someone did all the computation the hard way, then found out a simpler similar looking integral leading to the same result, and then gave the name p.d.f. to the factor that converts one to the other. So this video is just reversed reasoning using a fact as proof of it's own definition.
@Epoch11
@Epoch11 8 жыл бұрын
You seem to go from puzzles that are incredibly easy to ones that are nearly impossible.
@orngng
@orngng 6 жыл бұрын
7:30 Well UUH I would never thought of that.
@DaKnightsofawesome
@DaKnightsofawesome 8 жыл бұрын
Well in a circle the answer is a half. In a square I guess it would be slightly bigger because of corners.
@anteeee8
@anteeee8 8 жыл бұрын
why is the answer in a circle =.5?
@cheongziyong8871
@cheongziyong8871 8 жыл бұрын
+Ante Renic Maximum distance=1 (diameter), minimum distance=0 (touching), average=0.5
@Robobrine
@Robobrine 8 жыл бұрын
Well, I don't think it's that easy... I tested it and it was around 0.453 for a d=1 circle. (Though this might be wrong xD ) Still, 0.5 looks like too good of an answer to be true!
@MichaelDeeringMHC
@MichaelDeeringMHC 8 жыл бұрын
He's right, it's a half because all points are equally probable and have an equal probability of their distance from the center. That's why the square is so hard, the probability of a corner point is less than a point in the unit circle.
@Robobrine
@Robobrine 8 жыл бұрын
***** As there are distances bigger than 1 I guess you used d=2? Sorry, but 0.32 seems a bit too small for a circle that big... I used java to calculate the average and I get 0.905 for d=2. I'm not quite sure how you calculated your points inside the circle. I just generated points from -1
@NotYourAverageNothing
@NotYourAverageNothing 8 жыл бұрын
I understood everything, except 4:04 and 6:50.
@okrajoe
@okrajoe 6 жыл бұрын
The dreaded polar coordinates.
@micki500
@micki500 7 жыл бұрын
Brute forced in python since I didn't wanna watch the video and I don't know math. NAILED IT! Solution: repl.it/Eyyb/0
@Reivivus
@Reivivus 7 жыл бұрын
I used R. I used the uniform distribution to construct 1 million random points, and I used 10 iterations because I found that using iterations and calculating the averages of average distances leads to the 4th digit of the approximation being closer to the true value. Okay, I watched the video. www.r-fiddle.org/#/fiddle?id=pst3xBAF&version=2
@Fiyaaaahh
@Fiyaaaahh 8 жыл бұрын
I have no idea why you made things so complicated and did not map this onto the 1D variant. Let E(delta(x)) denote the expected difference between two points chosen at random in the interval [0,1]. If you know this value, and use the fact that E(delta(x)) = E(delta(y)) for the 2D variant, then the answer is simply sqrt((2*E(delta(x)))^2).
@Fiyaaaahh
@Fiyaaaahh 8 жыл бұрын
***** The chance of randomly choosing two points in the [0,1] interval which lie distance 0 apart (i.e. exactly the same point, with infinite precision) is zero. Hence the expected difference -- which I called E(delta(x)) -- is definately > 0.
@Der1Metzler
@Der1Metzler 8 жыл бұрын
+AnotherBrickSPB I watched the video just now and used exactly the same approach. Can you tell me why this is wrong if you have figured it out by now?
@chrisquevedo1345
@chrisquevedo1345 8 жыл бұрын
Yes I figured if you knew the average value of deltax and deltay then you can just put those into distance formula and get an average distance but I guess not. Still can't wrap my head around why it doesn't work and why it's a bit smaller than the actual answer
@chrisquevedo1345
@chrisquevedo1345 8 жыл бұрын
Then again if the same idea is applied to average distance between two points on a line then the formula for that is just |x1-x2| and the average value of x1 or x2 would be .5 which would make the average distance 0 which is wrong. It's harder to see where it fails in the square but seeing it fail on the line it's not surprising that it gives the wrong answer
@Fiyaaaahh
@Fiyaaaahh 8 жыл бұрын
Except it is not 0.5. The expected distance of a single point to 0 (or 1) is a half, but the expected distance of 2 random points *to each other* is a completely different number.
@igxniisan6996
@igxniisan6996 3 жыл бұрын
I rly love how the subtile always says something like, “Hey this is pressure Locker...”
@matejljubicic6370
@matejljubicic6370 8 жыл бұрын
This is what happens when people in the comments complain... GREAT JOB, PRESH! I LOVE THIS!
@natevanderw
@natevanderw 3 жыл бұрын
Perfect video for the next time I teach a senior level probability course! I will make sure to read the top rated comments out during class for extra humor.
@Michal235
@Michal235 3 жыл бұрын
Too bad you didn't explain further the thread of probability density and why it made you use 1-x and 1-y, I'd love to hear more
@felipegiglio8101
@felipegiglio8101 4 жыл бұрын
I thought it was (1 + sqrt2)/4 and i was feeling very smart
@GameInOne
@GameInOne 4 жыл бұрын
Came here for the problem Revised distance formula 🤷‍♂️
@ddunseo
@ddunseo 3 жыл бұрын
"THIS IS MATHEMATICS"
@HAPPYChaU123
@HAPPYChaU123 7 жыл бұрын
"Did you figured that out?" hmmm...dafuq?
@jonathanfowler2932
@jonathanfowler2932 8 жыл бұрын
Wow. This sure was a good one. I have to admit, this was way beyond me. Do you think it would be a good idea to have like a difficulty rating at the start so that people with less classroom experience could pick out the ones which have emm... fewer quadruple integrals? I absolutely loved the video and that such a simple problem can have such a complex solution, but when the easier problems come along, I'm never sure if I want to even start in case it's like impossible.
@architsrivastava203
@architsrivastava203 5 жыл бұрын
I got till integration. But that jump of logic to convert x1,y1,x2,y2 to del x del y and then to polar coordinates was pure genius. But to be honest, I am rather pleased with myself for reaching as far as I did.
@dhruvthakur1036
@dhruvthakur1036 6 жыл бұрын
*jumpscare warning* If you haven't watched the video Just go to 4:28 to have a jumpscare
@oscarr0_794
@oscarr0_794 6 жыл бұрын
?
@onokr705
@onokr705 5 жыл бұрын
wha
@dreadpiratetjoris
@dreadpiratetjoris 3 жыл бұрын
“With just horizontals and verticals, it’s going to be 0.5 , but there’s also diagonals so it’s going to be a bit more” is what I thought. No idea if that makes sense but it’s close enough to the answer to make me feel happy.
@combatwombat8581
@combatwombat8581 Жыл бұрын
The average distance between 2 random points on a line with length 1 would be 1/3, not 1/2 in fact. But good try ;)
@davidjames1684
@davidjames1684 3 жыл бұрын
Very easy to solve on a computer. I just ran 100 million random point pairs and averaged the distance of them. I got about 0.521423. Also, if this is "very hard" to solve mathematically, then what about the average distance between 2 points in a unit cube? Is that harder or easier? I simply added the Z component for the 3D version program and it gave me about 0.66173. Following the pattern for distance between 2 points in 2D, then 3D, I tried a 4D simulation by giving each coordinate 4 components. For that I got about 0.7777 as the average distance but used only 10 million iterations to compute it.
@batman3698
@batman3698 Жыл бұрын
Interesting. I wonder what sort of effect it has if you keep adding dimensions. Maybe it approach one
@JasonKaler
@JasonKaler 7 жыл бұрын
If it was a circle and not a square, would the answer be 0.5 ?
@ophello
@ophello 7 жыл бұрын
Jason Kaler I wonder that same thing.
@iWinGamer
@iWinGamer 7 жыл бұрын
Jason Kaler yes
@Robobrine
@Robobrine 7 жыл бұрын
No, it would be ~0.453 for a d=1 circle.
@leavemealonedamnyou
@leavemealonedamnyou 7 жыл бұрын
Robobrine why is that
@Robobrine
@Robobrine 7 жыл бұрын
+djahid abdelmoumen because I tested it? You can also do it mathematically and you'll get the same result, but it's just way faster to write a short program to calculate it. For the why it's not 0.5: The chance of the points being closer together is higher than them being farther apart, so the result is
@AltumNovo
@AltumNovo 7 жыл бұрын
What if it's a 1 by 1 by 1.... hypercube of infinite dimensions? What is the average length then? is it infinite?
@aless13260
@aless13260 7 жыл бұрын
that's creepy but it's a good question
@freshrockpapa-e7799
@freshrockpapa-e7799 7 жыл бұрын
Of course it isn't infinite. You will have a bounded region, and you are taking an average. There is no way it is going of to infinity...
@andrewmeyer8783
@andrewmeyer8783 7 жыл бұрын
Altum Novo the consensus online seems to be that as the dimension "n" goes to infinity the solution approaches sqrt(n/6), which would mean that the points would be "infinitely far apart," although this has no meaningful analog. This result is possible because an infinite dimensional hypercube is not "bounded space" in any conventional sense.
@AltumNovo
@AltumNovo 7 жыл бұрын
Yes unfortunately the average length for a hypercube of infinite dimensions is infinite because as long as 1 of the lines you can make inside the cube is infinite in length, then the average of all the lines has to also be infinite. The longest line you can make in the object is sqrt(n) = sqrt(infinity) = infinity. The hypercube of infinite dimensions all having length 1 is a very strange object, almost like an infintely spiky ball, a line from one side to the other equals 1, but going from corner to corner it equals infinity.
@freshrockpapa-e7799
@freshrockpapa-e7799 7 жыл бұрын
Altum Novo You know... Infinity isn't a number, right? So you can't use it like that in an equation. It doesn't matter how many dimensions you have, it will still be a region defined as [0,1]^n, which clearly is bounded, so there is no way that the distance between 2 points is infinite. Btw: The maximum distance between 2 points will be d=sqrt(n), which means that the average can't be infinity. It has to be less than d.
@2robotguy
@2robotguy 5 жыл бұрын
If the box size changes what happens to the average length? Fox example what is the average length between two random point in a 5X5 box and a 5x8 rectangle? Is the average length a linear solution as the box size increases?
@navneet7075
@navneet7075 5 жыл бұрын
I don't have computer to excel... I don't have knowledge of integration.... As my teacher tells that every math question have at least 3 ways to solve... Have u that third option....?????
@nicbajito
@nicbajito 5 жыл бұрын
I guess watch this video is the third xd
@navneet7075
@navneet7075 5 жыл бұрын
@Mario thanks bro..👍👍👍👍👍👍👍👍👍👍👍👍👍👍👍
@firelow
@firelow 8 жыл бұрын
Holy shit, if my nerd friend could speak English I'd so show him this video
@turun_ambartanen
@turun_ambartanen 8 жыл бұрын
explain it to him in your foreign language
@kiraleskirales
@kiraleskirales 8 жыл бұрын
A nerd who doesn't speak English? Definitely not a nerd!
@mrhappy192
@mrhappy192 8 жыл бұрын
Language of math is universal, you could show this video regardless :)
@firelow
@firelow 8 жыл бұрын
MrHappy i guess
@uremawifenowdave
@uremawifenowdave 8 жыл бұрын
Explain it to him in Klingon.
@grandexandi
@grandexandi 6 жыл бұрын
I came up with a very, VERY simple geometric and visual approach to this, super clean, and got 0.555555... Then when I saw the answer I felt like some kind of a genius, lol. But then I looked again at my very VERY simple math and found a very VERY silly mistake. So I got pretty close to the right answer via nonsensical math. Now I feel stupid, but also a little stupidly proud.
@megatabdullah4169
@megatabdullah4169 6 жыл бұрын
"give this problem a try and..." i was like , how to start
@HaynerVideos
@HaynerVideos 5 жыл бұрын
One method to estimate the answer is to divide the square into n = 2x2 = 4 blocks and then consider only the center points of the blocks. The average distance between the center points is about 0.57 - a pretty good estimate for not much work! The estimate can be refined by increasing the number of n blocks with (n-1)*n/2 unique distances to average.
@huisbaasbob1923
@huisbaasbob1923 5 жыл бұрын
import random from scipy.spatial import distance punt1 = [0,0] punt2 = [0,0] totaal = 0.0 iteraties = 10000000 for i in range(0,iteraties): punt1 = [random.random(),random.random()] punt2 = [random.random(),random.random()] dst = distance.euclidean(punt1, punt2) totaal += dst if i % (iteraties / 10) == 0: print i print totaal / iteraties Quick nasty code but you can hit run, get a coffee and when you return 5 minutes later 0.521593365241 shows up on screen
@albertrenshaw4252
@albertrenshaw4252 8 жыл бұрын
Did anyone else guess sqrt(2)/2 at the start? I had a feeling it would use 4 nested integrals but didnt want to work it out on paper and just assumed it would be as easy as midpoint formula of furthest distance and smallest distance after simplification. Haha
@jabbso
@jabbso 8 жыл бұрын
I definitely just thought that. How silly do i feel?!
@MattC0ates
@MattC0ates 8 жыл бұрын
Yes. That was my first thought, but then I came up with this approach: If the first point is in one of the corners, the maximum distance is sqrt(2). If the first point is dead centre, then the maximum distance is sqrt(2)/2. In both cases, the minimum is zero and the midpoints of these ranges are sqrt(2)/2 and sqrt(2)/4 respectively. Half way between these midpoints is sqrt(2)*3/8, which is about 0.53. Close enough?
@xyz.ijk.
@xyz.ijk. 6 жыл бұрын
That was an amazing solution. Thanks! I was looking for something much more mundane.
@uelssom
@uelssom 4 жыл бұрын
You know? I really paused the video and went to try it myself. FOR FOUR YEARS. Ok, i just actually worked on it every now and then. I knew it would come down to a complicated integral, but i wasnt very interested in that. Actually, i was more interested in how many ways this could be approached, by geometric constructs, by intuition, by a "lazy statistical" approach, and of course, by programming a bunch of random points and averaging (though i wanted to leave this option to be the last as it would give me the number and interfere with my intuitive methods i was constructing) I got some interesting results out of these methods, which im much more proud than the more precise number i got from the simulation and from the exact calculus.
@williamg9695
@williamg9695 7 жыл бұрын
I can usually follow along on these types of videos, but this shit is hard
@snugglyhugs8698
@snugglyhugs8698 3 жыл бұрын
Yup! Even as a math-major I had a hard time with this one. I knew it was going to require some integration, but once I saw that it'd require a quadruple integral I said "No thank, I'd rather play with my kids." Ah, time management at its best. (Also this is a Calculus III or Advanced Calculus level problem, so 4th year of a math major program, possibly low masters level due to not everyone going into probability fields for their elective math courses.)
@oOBeagleOo
@oOBeagleOo 7 жыл бұрын
I got close didnt think to use polar coordinates though, i just tried to integrate da ting
@nancygoel1594
@nancygoel1594 3 жыл бұрын
The answer should be 0.707 (approx.) I can prove it Average length between the two points = Average of shortest & longest length = Average of 0 & diagonal = (0 + √2)÷2 = √2÷2 ≈ 0.707 If you agree with me, then like or comment If not then tell my mistake in comments/reply
@lutascheier
@lutascheier 7 жыл бұрын
Eeeeeveryone's panhandling on KZbin now. Thanks patreon!
@JohnSmith-sk7cg
@JohnSmith-sk7cg 7 жыл бұрын
lutascheier Honestly, I'm fine with that. I'd rather have more/higher quality content (the level of quantity and quality are generally proportional to time spent) via donations than more interruptions due to embedded advertisements. Not to mention that signing embedded ad deals not only require a high viewership threshold to be a viable source of income, but also time spent negotiating and producing them.
@Icenri
@Icenri 3 жыл бұрын
Method to avoid using distributions: Any two points from S=[0,1]x[0,1] define a distance vector V of modulus D with D^2 = |Dx|^2 + |Dy|^2. Let's also define an associated rectangular area A=[1-|Dx|, 1-|Dy|] for any of these vectors. All possible origin points of vectors parallel to V, Vi = Pi + V = (x+Dx, y+Dy) are contained in an area with the size of A. Take into account that flipping the origins and ends of these vectors yields a similar set with the area on the opposite corner. For any pair of positive deltas that define D in the formula above, there are four combinations of Dx and Dy due to signs and absolute values. We've taken already two of these combinations already and there are two more that can be obtained by reflecting horizontally or vertically our original vector V. This means that for any pair of positive deltas that yield these sets of vectors, there are 4 copies of the same area. With all this all possible vectors are now taken into account. To get the average distance, we want to add up the distance D of any of these vectors with positive deltas, so it will be D times A for each vector, hence integrate 4DAdA over S.
@ultimatedeatrix9149
@ultimatedeatrix9149 2 жыл бұрын
very neat! thanks for the alternate explanation, i didn't get the probability density function part in the video.
@user-cj8gy6it6b
@user-cj8gy6it6b 3 жыл бұрын
Using the fact that the average distance between two points along a line is length/3, I did sqrt(2 x (1/3)^2) by reasoning the average distance in x would be 1/3 and average distance in y would be 1/3. However, this gives an answer of 0.47. Why does that give me an incorrect answer?
@SrikanthSrinivasamadhavan
@SrikanthSrinivasamadhavan 3 жыл бұрын
Tough one. 👍. It will be interesting to know, the average distance between points across circle and regular n sided figures. How about a cube?
Evil Geometry Problem
3:23
MindYourDecisions
Рет қаралды 1,6 МЛН
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 69 МЛН
Офицер, я всё объясню
01:00
История одного вокалиста
Рет қаралды 4,4 МЛН
Spongebob ate Patrick 😱 #meme #spongebob #gmod
00:15
Mr. LoLo
Рет қаралды 18 МЛН
What is the average distance of two points in a disc? (PART 1)
8:55
I used to hate QR codes. But they're actually genius
35:13
Veritasium
Рет қаралды 1,5 МЛН
Most US College Students Get This Wrong
7:14
MindYourDecisions
Рет қаралды 7 МЛН
The average distance between points on a square
20:54
Michael Penn
Рет қаралды 58 М.
The internet is truly puzzled by this homework question
4:52
MindYourDecisions
Рет қаралды 117 М.
6 Impossible Puzzles With Surprising Solutions
12:46
MindYourDecisions
Рет қаралды 592 М.
Why 7 is Weird - Numberphile
12:03
Numberphile
Рет қаралды 1,8 МЛН
Impossible Logic Puzzle from Indonesia!
13:46
MindYourDecisions
Рет қаралды 117 М.