Thread: Math Quiz 9
View Single Post
  #101   Spotlight this post!  
Unread 22-08-2016, 22:16
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Math Quiz 9

Quote:
Originally Posted by Ether View Post
The difference is in how you choose samples.

If you want the average distance between all unordered pairs of points, then you choose coordinates of pairs of points from a uniform random distribution, and compute the corresponding distance.

If you want the average length of all segments, you randomly choose a segment length, a segment orientation, and the coordinates of the center of the segment. Then you discard any chosen segments which are not inside the square. If you run a Monte Carlo sim of that, you'll get 0.3363
I believe this is fallacious, in particular that for a given center point and two different segment lengths, there are the same number of segments. For the center point at (0.5, 0.5) and length 0.2, the candidate segments are the diameters of a circle of radius 0.1. For the center point at (0.5, 0.5) and length 1.0, the candidate segments are the diameters of a circle of radius 0.5. As there are five times as many points on the large circle to serve as either end of a diameter, it logically has five times as many diameters.

When you take this into account, the integral in the denominator becomes:

0π/401/cosθ (1- Lcosθ) (1- Lsinθ) L dL dθ =
0π/401/cosθ L - L2cosθ - L2sinθ + L3cosθsinθ dL dθ =
0π/4[ L2/2 - L3cosθ/3 - L3sinθ/3 + L4cosθsinθ/4 ]01/cosθ dθ =
0π/4sec2θ/2 - sec2θ/3 - sec2θtanθ/3 + sec2θtanθ/4 dθ =
0π/4sec2θ/6 - sec2θtanθ/12 dθ =
[tanθ/6 - tan2θ/24 ]0π/4 =
[1/6 - 0 - 1/24 + 0 ] = 1/8
If you then integrate the adjusted calculation using 1/8 for the deominator, just substitute r for L and α for θ, and you will have the third equation of my most recent post in this thread.

Addition: Also, the idea of the average segment in a square of size 1 being within 1% of the average segment on any of its sides is .. counter-intuitive, to say the least.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.

Last edited by GeeTwo : 22-08-2016 at 22:24.
Reply With Quote