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/
@zohar991005 жыл бұрын
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...)
@satyaanshu4 жыл бұрын
I remember solving this in grade 12, for JEE prep
@tomz13644 жыл бұрын
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 :)
@ketan93184 жыл бұрын
Actually the term random should be mentioned explicitly as uniform distribution in this case. In general the answer to 'random' cannot be given.
@alexdemoura99724 жыл бұрын
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...
@ImranZakhaev98 жыл бұрын
"Did you figure this out?" :l
@pornpori8 жыл бұрын
"Who do you think watches these videos? Paul Dirac? Karl F. Gauss?
@peterlindner32838 жыл бұрын
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. ...
@derciferreira72118 жыл бұрын
I figured out!
@dropyghost8 жыл бұрын
Yes, Im my way to get my nobel prize, I solve this in a napkin.
@mpperfidy8 жыл бұрын
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.
@carryon50215 жыл бұрын
"Did you figure this out?" - - I find this question to be mildly humiliating.
@joso56814 жыл бұрын
"mildly"
@___kavistaan___4403 жыл бұрын
I found the answer in 3 minutes
@MaxGuides3 жыл бұрын
I mean... there are several approaches to the exact right answer on this problem.
@mihitmahanta18502 жыл бұрын
@@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.
@666wurm4 жыл бұрын
I immediately thought “about 0.5“. Turns out I was off only by
@jp44314 жыл бұрын
High five bro
@barneybarney39824 жыл бұрын
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
@DavyCDiamondback4 жыл бұрын
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
@jaishkhan74424 жыл бұрын
Lol same bruh I thought that since it has area of 1 so taking a line that divides it in two is 0.5
@heretolevitateme4 жыл бұрын
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.
@CollinInGame8 жыл бұрын
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.
@Aethgeir8 жыл бұрын
Your comment coupled with your profile pic is perfect!
@georgewashington60127 жыл бұрын
+Real.Piece.Of.Work The laugh of loud.
@eboomer847 жыл бұрын
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-kg5zm5 жыл бұрын
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.
@fivish5 жыл бұрын
I guessed it was 0.5 and it was close to that.
@unvergebeneid8 жыл бұрын
"This doesn't look too hard. I'll just have to ... wait ... ok, now this is a bit more complicated than I .... uh. Holy ..."
@ryanmike98338 жыл бұрын
Every damn video... :P
@michaelbauers88008 жыл бұрын
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__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).
@dejaimeneto60938 жыл бұрын
you just have to type that on wolfram alpha.
@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.
@ФилиппЛыков-д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.
@General12th5 жыл бұрын
Why did you specify A4 paper? Do you often use other sizes?
@ФилиппЛыков-д8е5 жыл бұрын
@@General12th As a rule, I just snatch a couple of sheets from my home printer. And they happen to be A4 :)
@shyambuddh55464 жыл бұрын
@@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е4 жыл бұрын
@The Absolute Madman But what size is a "piece of mind", I wonder? ;)
@YOM2_UB4 жыл бұрын
@@ФилиппЛыков-д8е A "Piece of Mind" is about 6 minutes 22 seconds.
@rohitg15298 жыл бұрын
0 < average distance < 1.414...
@mb987658 жыл бұрын
hahaha lol
@YmohTheFrog8 жыл бұрын
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".
@lawrence82998 жыл бұрын
that's if you only consider the points that lie on the diagonal
@YmohTheFrog8 жыл бұрын
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)
@siddharthajain99788 жыл бұрын
Actually we can say 0
@geovaniraffaelli45087 жыл бұрын
I lost you at ''Consider a square...''
@camerongray77675 жыл бұрын
Nanika ahahaahah
@XICO2KX5 жыл бұрын
😂
@lightsaberproductions85925 жыл бұрын
I lost him when reading the title: "What is the distance between 2 random points"
@That_One_Guy...4 жыл бұрын
I lost it when i saw "mindyourdecision" name pop up
@lefterismagkoutas44304 жыл бұрын
Why would I consider a square when the square never considers me?
@sigitrendang51954 жыл бұрын
No one: Automatic translator: *"Hey this is pressure locker"*
@megalul41414 жыл бұрын
LULW
@g.l.rakesh85484 жыл бұрын
Yeah!
@xBZZZZyt4 жыл бұрын
lol
@jamiehenson33853 жыл бұрын
Haha
@igxniisan69963 жыл бұрын
Lmao
@AltumNovo8 жыл бұрын
Now do a cube.
@ewdlop18 жыл бұрын
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.
@renerpho8 жыл бұрын
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
@renerpho8 жыл бұрын
Oh, I was bet by half an hour... Well, still fun ;-)
@renerpho8 жыл бұрын
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.
@BenedictIrwin8 жыл бұрын
The paper on box integrals in the references is a good read.
@FilipeSantos-wg9pd6 жыл бұрын
You know the maths are hard when Preshtal Walker stutters while explaining xD
@parikshitmusic5106 жыл бұрын
Lol
@unknownknown3475 жыл бұрын
It's Presh talwalker. Talwalker is an Indian surname.
@manumalhotra35205 жыл бұрын
you butchered his namd flip santa
@benoitschwob34985 жыл бұрын
Preshtal Walker ??? Do you know his brother Lukesky?
@bhojjadamotabanda5 жыл бұрын
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.
@MindYourDecisions6 жыл бұрын
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/
@neelakshmishra96146 жыл бұрын
MindYourDecisions it was a bounce..... I did not understand it 😅😅
@sanskaracharya35856 жыл бұрын
Hi,presh ..I have a great question...How can I mail you?
@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.
@ManHeyuan6 жыл бұрын
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. ☺️
@katzenMaul6 жыл бұрын
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
@whozz8 жыл бұрын
What is the average distance between two random points in a unit circle?
@Robobrine8 жыл бұрын
0.905
@whozz8 жыл бұрын
Robobrine How did you calculated that? 128/(45pi)
@Robobrine8 жыл бұрын
I wrote a small program to brute force calculate it.
@carlossoto95118 жыл бұрын
I calculated the integral (probably wrong), and it yielded pi / 4
@whozz8 жыл бұрын
Unfortunately, you're wrong. The answer is 128 / (45 * Pi) ~ 0.9054147...
@HakanTheUltimateHoca6 жыл бұрын
Just guessing before the video, is it (2+√2+5ln(√2+1))/15 ?
@commelinales6 жыл бұрын
Hakan Çakıcı You're the Lottery Terminator.
@arthurg.machado68036 жыл бұрын
Hakan Çakıcı pretty good intuition you've got there ,huh?
@アヤミ6 жыл бұрын
Jesus christ it’s Jason bourne.
@6subswith0vids806 жыл бұрын
Hakan Çakıcı u cheated
@bencasica40476 жыл бұрын
YipHyGaming - Minecraft Agario Cytus and more! goteem
@Toopa888 жыл бұрын
my guess was 0.5 without watching
@petethewrist8 жыл бұрын
Me two but, those corner got me..
@Trias8058 жыл бұрын
My guess was ~0.7 (square root of 0.5)
@PickyMcCritical8 жыл бұрын
My guess is 1/3 of sqrt(2) EDIT: Yep, wasn't even close lol
@mrigayu8 жыл бұрын
same
@SeanR7948 жыл бұрын
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.
@10jelliclecats8 жыл бұрын
"Did you figure it out?" Really... you actually asked that question?
@MathAdam5 жыл бұрын
4:21 Simplifies into a double integral. This is going to be a long haul.
@andrewmurphy53103 жыл бұрын
This is the point I started reading the comments.
@Kenlimepie8 жыл бұрын
"Did you figure it out?" What am I? Einstein?
@BixbyConsequence7 жыл бұрын
"Did you figure it out"? Yeah, I did it in my head.
@flamingpaper77515 жыл бұрын
I mean I dont get what happened but it looked cool and seems real
@majorinconvenience5 жыл бұрын
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
@falseee44455 жыл бұрын
We r both haha
@kjsaggu5 жыл бұрын
Haha same
@RosidinAli5 жыл бұрын
Lmao
@Anthropomorphic5 жыл бұрын
Same here.
@KNhunterX5 жыл бұрын
Same here. Sometimes intuition is really powerful.
@_bender41438 жыл бұрын
That was interesting. Here is a much simpler version: what is the average length between two points on a line segment length 1?
@xXxBladeStormxXx8 жыл бұрын
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.
@BurninAss8 жыл бұрын
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.
@xXxBladeStormxXx8 жыл бұрын
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.
@BurninAss8 жыл бұрын
wow that was fast! Having to get rid of |x-y| for an integral was the part that I was missing. Thanks.
@_bender41438 жыл бұрын
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.
@onenameleft6 жыл бұрын
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?
@christyjestin2 жыл бұрын
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
@koldovalnya4 жыл бұрын
Max: Root of 2 Min: ~ 0 Avg: ~ r2/2
@cbmajor60174 жыл бұрын
that what i did lol
@mrsamsun9124 жыл бұрын
Unfortunatly for...all of us, maths do not work like that. Damn.
@paolofederici4 жыл бұрын
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 ...
@nikitakipriyanov72604 жыл бұрын
0.707, too bad estimate
@MottBotMinecraft4 жыл бұрын
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
@arrogantuser5 жыл бұрын
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.
@zixuan16305 жыл бұрын
So infinite many possibilities, I'm going to use calculus. (a few minutes later) Ugh, this is hard.
@tennicktenstyl8 жыл бұрын
I came here just to watch some smart numbers popping on the screen lol.
@PickyMcCritical8 жыл бұрын
Smartest thing I've read so far lol
@mortkebab28496 жыл бұрын
While enjoying a glass of slivovitz.
@6subswith0vids806 жыл бұрын
S m a r t n u m b e r s
@yousefghanem51085 жыл бұрын
So friken accurate 😂
@AnstonMusic8 жыл бұрын
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!
@AnstonMusic8 жыл бұрын
Never mind, I apparently forgot about the harder ones. Whoops.
@strangelic42348 жыл бұрын
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.
@carsonbarlow3488 жыл бұрын
That was a bit sadistic.... Good thing I'm a bit masochistic. ;)
@lagalil8 жыл бұрын
Medicine has maths.
@strangelic42348 жыл бұрын
lagalil Many physicians haven't.
@VivekSingh-ts1ec5 жыл бұрын
First i thought that its a tough question...... Soon i realized that i can't even understand the solution part
@mrWade1018 жыл бұрын
This is my math skills: Shortest length 0 Longest length Sqrt 2 so sqrt 2 / 2 ? (≈0.707106781)
@96hugoS8 жыл бұрын
But there's only 2 ways of making a length of sqrt 2 and many more for other combinations
@HYEOL8 жыл бұрын
but is the distribution of lengths bell shaped?
@parkers.87488 жыл бұрын
That's what I thought
@victor65432118 жыл бұрын
in the lottery you eitheir gain 1 million dollars or 0 dollars, so, in average, you gain 500k dollars. Congrats!
@GraveUypo8 жыл бұрын
this would only work for a sphere.
@nicholasw9968 жыл бұрын
Please do more videos like this, not the primary school level mathematics in many recent videos.
@afrofaust19138 жыл бұрын
Then he'd just be doing videos for math-heads, and that's a terrible viewerbase ;)
@Czeckie8 жыл бұрын
I agree with you! I've considered to unsubscribe before watching this new video.
@empmachine8 жыл бұрын
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!
@dropyghost8 жыл бұрын
Maybe he should have two separated channel. I understand like 30% of the mathematics. Wasnt really that fun.
@kckcmctcrc8 жыл бұрын
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.
@Tomahawk19995 жыл бұрын
Did you figure this out? Me: .... only part i figured out is i cant figure it out
@slateflash8 жыл бұрын
"did you figure it out?" *HEEEELLLL NOOOO*
@ximecreature8 жыл бұрын
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?
@holonaut8 жыл бұрын
I think this would be correct for a line of the length sqrt(2).
@superdau8 жыл бұрын
I started with that as well, but then immediately saw that the number of "possibilities" increases the shorter the distances are.
@ximecreature8 жыл бұрын
Indeed. I think this is were I missed the point of the question and the "very hard" pqrt
@1Joren8 жыл бұрын
Started with sqrt(2)/2 as well. Didn't imagine the problem to be this complicated
@ramacanda7 жыл бұрын
PositiveANegative i thought the same as you. i got 0.7
@TaleshicMatera3 жыл бұрын
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.
@newplayer32592 жыл бұрын
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.
@newplayer32592 жыл бұрын
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
@christianbarnay24998 жыл бұрын
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.
@bjrnarflate58843 жыл бұрын
"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"
@gertoppermann92303 жыл бұрын
True, I knew I couldnt solve that Problem but 5 lines of python and a 2-minute wait gave an even more accurate solution :)
@asiamies91533 жыл бұрын
What is your reasoning for the "a bit off" part, though?
@asiamies91533 жыл бұрын
@@gertoppermann9230 How many simulations did you do?
@gertoppermann92303 жыл бұрын
@@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.
@asiamies91533 жыл бұрын
@@gertoppermann9230 okay
@morning5tarr4 жыл бұрын
Imagine this question being asked in Computer science interview.
@bennettkrack92474 жыл бұрын
The Monte Carlo solution he showed first would probably be the correct answer in any CS interview.
@peterpan4083 жыл бұрын
Agree, keep iterating until the result stabilizes to the desired precision.
@NotYourAverageNothing8 жыл бұрын
I understood everything, except 4:04 and 6:50.
@AlchemistOfNirnroot8 жыл бұрын
Just gonna guess sqrt(2)/2
@AlchemistOfNirnroot8 жыл бұрын
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.
@TheDGomezzi8 жыл бұрын
This was my guess too! Did you get this by starting from the 1 dimmensional version and putting that into the distance formula?
@pimakpimak8 жыл бұрын
I estimated that by doing what you just said
@muriloferreira63078 жыл бұрын
But is it right? That was also my guess o/
@kennethfuher16868 жыл бұрын
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.
@HaynerVideos5 жыл бұрын
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.
@kyc2698 жыл бұрын
"We have now simplified the integral" I have no idea what's going on.
@matejljubicic63708 жыл бұрын
This is what happens when people in the comments complain... GREAT JOB, PRESH! I LOVE THIS!
@dreadpiratetjoris3 жыл бұрын
“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 Жыл бұрын
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 ;)
@andrasfogarasi50148 жыл бұрын
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.
@rspandit47866 жыл бұрын
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
@natevanderw3 жыл бұрын
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.
@2robotguy5 жыл бұрын
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?
@ElitAcilan7 жыл бұрын
I set up the quadruple integral and then let computer solve it for me :D
@Jotakumon8 жыл бұрын
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.
@5eurosenelsuelo8 жыл бұрын
Could explain me why using that integral? Or tell me a webpage with related information. I'm looking forward to understand it
@Jotakumon8 жыл бұрын
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).
@5eurosenelsuelo8 жыл бұрын
That's a nice explanation You helped me so much. Thank you:)
@5eurosenelsuelo8 жыл бұрын
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:)
@Jotakumon8 жыл бұрын
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.
@billak0s12 жыл бұрын
As an ECE student, i first thought how simple it is to just generate numbers and provide the average of distance. However, geometrically my initial thought was that we can draw a circle inscribed to the square so the majority of points are going to have an average distance of 0.5. I loved the integrations' solution and how helpful polar coordinates were.
@FelixNielsen8 жыл бұрын
Did I figure it out? Who do you think I am? Stephen Hawking?
@justunderreality8 жыл бұрын
This is much lower level then Stephen Hawking
@FelixNielsen8 жыл бұрын
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.
@justunderreality8 жыл бұрын
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.
@FelixNielsen8 жыл бұрын
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.
@justunderreality8 жыл бұрын
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).
@neptez8 жыл бұрын
Somehow i felt intuitively that the answer is 0.5...
@Uranya7x8 жыл бұрын
the SAME
@rinthh54778 жыл бұрын
Me to!
@turun_ambartanen8 жыл бұрын
nice, but it isn´t
@kotzzz98 жыл бұрын
if you model it with continuous uniform distribution thats the answer you ll get but its too simple unfortunately
@kotzzz98 жыл бұрын
+kotzzz9 since its assuming that the points are across a line rather than along a square
@thelightningwave6 жыл бұрын
He glossed over all of the hard stuff not even trying to explain any of the hard stuff and went into super hard detail of all the stuff. This a great example of what not to do if you plan on teaching to somebody.
@xyz.ijk.6 жыл бұрын
That was an amazing solution. Thanks! I was looking for something much more mundane.
@TheDeadlyPeadle7 жыл бұрын
I tried it in a very different way,... I just calculated the average distance from one x1 to another x2 point, which is 0,36- ignoring y completly. This is very easy to do, just calculate the average of each point to another. So for example if your x1 is 0, the average to a random x2 is 0,5 -> (0+0,1+0,2+0,3+0,4+0,5+0,6+0,7+0,8+0,9+1)/11 , go on with x1 is 1 and so on, in the end it's ((0,5 + 0,418 + 0,354 +0,309 +0,281)*2 +0,272)/11 = 0,36. Since this is a square, the average distance from one y1 to another y2 point is also 0,36. Now we have an triangle with the points A, B and C. The distance from A to B is 0,36 - the distance from A to C is also 0,36. We now have to figure out the distance from B to C - which is our end result. So sqrt(2*(0,36^2)) = 0,513 which is kinda close to the result from this video. I'm not very good in math, so I'm not quite sure why this isn't the exact same result. If someone can enlighten me, please do it! Also sorry for my bad english, I'm from germany.
@shahtamzid7 жыл бұрын
I think you're getting only an approximate value because x1 and x2 are continuous variables, i.e., they can take any value from 0 to 1, not just 0.1, 0.2, 0.3 etc, but also something like 0.123011345 and so on. You treated them as discrete variables, hence you get an approximation, which is close, but would improve if you included more values in the interval 0 to 1.
@robinsuj6 жыл бұрын
He basically just "integrated". But using a poor approximation. More points would (probably) give a better result, and the integral is exactly THE result.
@uelssom4 жыл бұрын
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.
@Icenri3 жыл бұрын
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.
@ultimatedeatrix91492 жыл бұрын
very neat! thanks for the alternate explanation, i didn't get the probability density function part in the video.
@okrajoe6 жыл бұрын
The dreaded polar coordinates.
@musicalshadan46702 жыл бұрын
Average is value between maximum and minimum. Maximum can be 1.05m . Minimum can be 0.01 so 0.01+1.04 /2 = 0.52
@monkeyCh275 жыл бұрын
This doesn 't look that hard *sees solution* What the f...
@KeyserSoseRulz7 жыл бұрын
You should have labeled this video with WARNING GRAPHIC VIDEO instead of very difficult.
@donaldbiden79275 жыл бұрын
His probability videos are truly amazing
@architsrivastava2035 жыл бұрын
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.
@orngng6 жыл бұрын
7:30 Well UUH I would never thought of that.
@davidseed29393 жыл бұрын
The figure at 5:12 might be misleading. There has been a change of coordinates so that this square is not the x and y of the original square but deltax and delta y. Also tge triangular distribution can be considered by looking at the difference in scores between two dice. The maximum distance can be acheived in two ways (6,1)(1,6). The minimum distance in 6 ways(pairs). So the pdf of the distance decreases with distance. Thus for an x separation of 1 we require the chosen points x1,x2 at the extreme left and right of the square. with a pdf of zero. This is where the factor (1-x) comes from.
@jonathanfowler29328 жыл бұрын
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.
@Fiyaaaahh8 жыл бұрын
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).
@Fiyaaaahh8 жыл бұрын
***** 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.
@Der1Metzler8 жыл бұрын
+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?
@chrisquevedo13458 жыл бұрын
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
@chrisquevedo13458 жыл бұрын
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
@Fiyaaaahh8 жыл бұрын
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.
@icarofreire79636 жыл бұрын
I kind of figured it out... but, instead of paper and pencil, I wrote a Python program that generates 2 random points in the square, calculates the distance between them and then finds the average distance. It's amazing how it matches exactly the same value :)
@FireyDeath43 жыл бұрын
Right, this went so completely far over my head that I don't even care at this point.
@PaulSmith-pr7pv3 жыл бұрын
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.
@asiamies91533 жыл бұрын
@@PaulSmith-pr7pv Which courses would be enough? calc 1, 2, 3?
@igxniisan69963 жыл бұрын
I rly love how the subtile always says something like, “Hey this is pressure Locker...”
@5gonza5415 жыл бұрын
My though procces (before seeing the vide, probably wrong lol) -The maximum distance posible is the square root of 2, and the minimal is (in a proctical sense) 0 -There can be done an infinit amount of lines of sizes [square root of 2 to 0[ -Intuatively as smaller lines require less space to be put, there should be more small lines. But as the amount of any line is infinit, I’ll consider the amount of small lines to be equal to big ones. This logic aplies to everything in between, as the distribution should ve equal theought the possibilities. -To simplifie the problem I’ll do the average distance in a circle of a diameter of 1: - In this case as the max is 1 and the least is basically 0 the averige distance should be: (1+0)/2= 0.5. Also as the distribution of values should be equal above and bellow the average we can ignore those values. -To answer the circle problem we can subtract the area of the circle to the area of the squre Area of square = 1 Area of circle = 0.785398... 1-0.785398...= 0.214621... I’ll treat this new area as a circle to get it’s average length First I’ll calculate the diameter of it using a bit of algebra and the area formula (I’ll skip that part cause it’s kind of long, the diameter is: 0.26136160043... Now, using the knowledge of how to get the average distance of a circle we can know that the average distance of this one is: 0.13068080021 So now we need to add this to the average length of a line in a circle (0.5) 0.5+0.13068080021= 0.6306808002 So my final answer is that the average length of a square of side length 1 is 0.63068080021... Also, sorry for my grammar I’m not native English lol Edit: I was wrong lol
@AltumNovo8 жыл бұрын
What if it's a 1 by 1 by 1.... hypercube of infinite dimensions? What is the average length then? is it infinite?
@aless132608 жыл бұрын
that's creepy but it's a good question
@freshrockpapa-e77998 жыл бұрын
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...
@andrewmeyer87838 жыл бұрын
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.
@AltumNovo8 жыл бұрын
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-e77998 жыл бұрын
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.
@JasonKaler8 жыл бұрын
If it was a circle and not a square, would the answer be 0.5 ?
@ophello8 жыл бұрын
Jason Kaler I wonder that same thing.
@iWinGamer8 жыл бұрын
Jason Kaler yes
@Robobrine8 жыл бұрын
No, it would be ~0.453 for a d=1 circle.
@leavemealonedamnyou8 жыл бұрын
Robobrine why is that
@Robobrine8 жыл бұрын
+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
@hungdoan60627 жыл бұрын
I love how he just put out all of the crazy math and he asked did you get the solution
@Epoch118 жыл бұрын
You seem to go from puzzles that are incredibly easy to ones that are nearly impossible.
@nikolaytsvetkov46618 жыл бұрын
I don't know the answer yet but would like to solve it for the circle (with a d=1) as well.
@Vladislavchooo8 жыл бұрын
fellow bulgarian :?
@pairot018 жыл бұрын
r=1 *
@Nivaldo858 жыл бұрын
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-wv2zg8 жыл бұрын
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.
@pairot018 жыл бұрын
11011100DC Seems like you only used points a line (a diameter of the circle) and not the whole space of it
@griffinpoole78013 жыл бұрын
So in the final result, does the average take into account 'duplicate' orientations of the points? For instance, the outcomes a(0.2, 0.2) b(0.4, 0.4) and a(0.4, 0.4) b(0.2, 0.2), result in the same distance since the points are flipped. For the solution you provided, I believe that both configurations would be factored into the final integral. That being said, Im interested to know anyone's thoughts on different ways to interpret the question, and at what point would it be important to only account for unique combinations of point orientations.
@sonntag60692 жыл бұрын
In fact the final integral is normalized by "phase space factor", or "hypervolume" of all possible coordinates. If the square has side length a, the final integral must be divided by a^4, and that a^4 factor already contains double counting of orientations. So there is no need to restrict phase space to unique point combinations, because we know that each combination was counted exactly twice both in the integral and normalization factor. However, if you choose a proper subspace of unique combinations, then that normalizaton factor becomes a^4/2. For example, if we consider an interval (0, a), then average distance between two points x and y on the interval is integral_0^a integral_0^a |x - y| dx dy / integral_0^a integral_0^a dx dy = 1/3 If we restrict phase space to unique combinations only (x < y), then the average distance is integral_0^a integral_x^a |x - y| dx dy / integral_0^a integral_x^a dx dy = 1/3 and answer is the same.
@Mobin928 жыл бұрын
I guessed 0.5 at the beginning.... That totally counts ._.
8 жыл бұрын
I gussed a littlebit over 0.5 :D
@HubrisInc8 жыл бұрын
Yeah, gut instinct lead me to .5 as well.
@CloudeAytr8 жыл бұрын
No, no it doesn't.
@dhruvthakur10366 жыл бұрын
*jumpscare warning* If you haven't watched the video Just go to 4:28 to have a jumpscare
@oscarr0_7946 жыл бұрын
?
@onokr7055 жыл бұрын
wha
@japeking16 жыл бұрын
I love it..."Did you figure it out?".... I didn't have a clue ( ok ...I did follow the random number crunching method ) and have decided to just die in ignorance rather than try to grasp what the heck you did with those integrals.
@megatabdullah41696 жыл бұрын
"give this problem a try and..." i was like , how to start
@SrikanthSrinivasamadhavan3 жыл бұрын
Tough one. 👍. It will be interesting to know, the average distance between points across circle and regular n sided figures. How about a cube?
@maurocruz18246 жыл бұрын
What a lot of concepts together into a single problem! Amazing video. Greetings form Colombia.
@critical11creator8 жыл бұрын
I calculated it to be 0.527 from a different method. I was surprised I was off even though it was just by a bit. What I did was divide the triangle into 2 parts, 1 being 1 third and the other being 2 thirds. The average distance should be the max possible distance from the weight center of the square divided by two (aka all possible above half minus all possible under half). So it's sqrt (1^2 +(1/3)^2)/2 = 0.527
@richardaversa71288 жыл бұрын
Mustang De Man efficient method well done
@mangekyoumusa7 жыл бұрын
If u split the square by 106/300 and 194/300 u would’ve gotten 0.521
@Primitive_Code6 жыл бұрын
Mustang De Man how does the square root of "1^2" + anything equal to a number less than 1? Kids in Algebra 1 would prove you wrong.
@sonalidasgupta35625 жыл бұрын
Mustang....could you please elaborate the logic?...it sounds interesting 👏
@AnuragGuptainspired3 жыл бұрын
"Did you figure it out?" Me: "Absolutely not!"
@davidjames16843 жыл бұрын
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.
@batman36982 жыл бұрын
Interesting. I wonder what sort of effect it has if you keep adding dimensions. Maybe it approach one
@finnkoepke22508 жыл бұрын
solved it using python am i good at maths now?
@112BALAGE1128 жыл бұрын
He's better than you cuz he solved it in Excel.
@richarddangle65168 жыл бұрын
No, I'd definitely choose Python over Excel.
@yuvalgat41638 жыл бұрын
The question is, did you run a big test and took the average, or actually calculated the math?
@tinyman3928 жыл бұрын
How many repetitions did you run, and how did you come up with the number of religions to run?
@finnkoepke22508 жыл бұрын
i calculated the average using 2000 small tests.
@dee_zzy5 жыл бұрын
07:30 is that a rhetorical question 😂
@MichaelShebanow6 жыл бұрын
I had a similar problem given to me as an interview question for a job. You have a sheet of ruled paper and are given a pin that exactly fits between the ruled lines vertically. If the pin is randomly dropped from some height above the paper, what is the probability that the pin will straddle one of the ruled lines?
@TheRocketRaider8 жыл бұрын
Why am I watching this? I have to wite a paper for college... and I don't even know how to math
@Trynottoblink8 жыл бұрын
I hear you. One time I binge-watched math videos to avoid studying for a physiology exam.
@NicoA478 жыл бұрын
Ah good, so I'm not the only one.
@hattenkofer8 жыл бұрын
Luckily you know how to English.
@Reylaymon8 жыл бұрын
i don't even know how i got to this video why am i here
@TheAFKShow7 жыл бұрын
"Did you figure it out?"
@HollywoodF13 жыл бұрын
Follow-up question: Presuming you could only travel between points in the x-, THEN y-direction, i.e. orthogonally, what is the distance now? The brute-force spreadsheet says it’s 0.67, which is 28% farther. Can the answer to this question help to optimize how some diagonal streets may be laid out in a grid city to both minimize impact on the grid and minimize distances between points?
@oOBeagleOo8 жыл бұрын
I got close didnt think to use polar coordinates though, i just tried to integrate da ting
@felipegiglio81014 жыл бұрын
I thought it was (1 + sqrt2)/4 and i was feeling very smart
@99totof994 жыл бұрын
Very beautiful puzzle
@HAPPYChaU1237 жыл бұрын
"Did you figured that out?" hmmm...dafuq?
@gregjhill5 жыл бұрын
I watched the whole video and my brain went into shutdown mode to recover!
@Zero2hero-e2e43 жыл бұрын
Just perfect video to fell asleep
@amarmorey60046 жыл бұрын
attached segment end points to the side of square or shift end points to the square side.consider length length of segment is x ,then length of diagonal is root of 2(1-x)then average is root of 2
@oscartiny99195 жыл бұрын
@mindyourdecision, sir please help me understand the substitution at 4:22, I cannot find a derivation for it. Thanks in advance