What is the average distance between two randomly placed points in a square that measures 1 unit by 1 unit?
Give your answer to 3 decimal places.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
I'm going to take a random variable + calculus approach here. Let us define ∣ x ∣ , ∣ y ∣ as the distances between the x & y-coordinates of our two randomly chosen points in ( 0 , 1 ) . These random variables then follow a Triangular Distribution (instead of a Uniform Distribution):
∣ x ∣ , ∣ y ∣ ⇒ f ∣ x ∣ = 2 ( 1 − ∣ x ∣ ) , f ∣ y ∣ = 2 ( 1 − ∣ y ∣ ) for ∣ x ∣ , ∣ y ∣ ∈ ( 0 , 1 )
These translate into the following double integral:
A = 4 ∫ 0 1 ∫ 0 1 ∣ x ∣ 2 + ∣ y ∣ 2 ( 1 − ∣ x ∣ ) ( 1 − ∣ y ∣ ) d ∣ y ∣ d ∣ x ∣
which can be converted into cylindrical coordinates: ∣ x ∣ = r c o s θ , ∣ y ∣ = r s i n θ , d ∣ x ∣ d ∣ y ∣ = r d r d θ , r ∈ [ 0 , s e c θ ] , θ ∈ [ 0 , 4 π ] , or simply:
A = 8 ∫ 0 4 π ∫ 0 s e c θ r ⋅ ( 1 − r c o s θ ) ( 1 − r s i n θ ) r d r d θ ; (NOTE: we need to double our integral to accommodate both halves of our unit square)
or 8 ∫ 0 4 π ∫ 0 s e c θ r 2 − ( c o s θ + s i n θ ) r 3 + ( c o s θ s i n θ ) r 4 d r d θ ;
or 8 ∫ 0 4 π 3 s e c 3 θ − ( c o s θ + s i n θ ) 4 s e c 4 θ + ( c o s θ s i n θ ) 5 s e c 5 θ d r
or 8 ∫ 0 4 π 3 s e c 3 θ − 4 s e c 3 θ − 4 t a n θ sec 3 θ + 5 t a n θ s e c 3 θ d r
or 8 ∫ 0 4 π 1 2 s e c 3 θ − 2 0 t a n θ s e c 3 θ d r
or 8 ⋅ [ 2 4 1 ⋅ [ t a n θ s e c θ − l n [ c o s ( 2 θ ) − s i n ( 2 θ ) ] + l n [ c o s ( 2 θ ) + s i n ( 2 θ ) ] ] − 6 0 s e c 3 θ ] for θ ∈ [ 0 , 4 π ] ;
or A = 1 5 ( 2 + 2 ) + 5 l n ( 1 + 2 ) ≈ 0 . 5 2 1 .