|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Math Quiz 9
Quote:
If you can switch the order of integration and then integrate the pdf over theta, then you should have a pdf for L only. I'm trying to wrap my head around why that pdf for L should be different than the one effected by a uniform weighting of dx1dx2dy1dy2 differential elements. The concept in my head is that there's no invertible change of variables with which to set up that translation. The transformation from coordinates to length is not injective, so the Jacobian in the change of variables is zero: hard to divide by, conceivably giving the ratio between our answers in some sort of limit. Or from another view the four-dimensional differential element is of measure zero within the one-dimensional one, reflected by a pdf for the coordinates that is somehow undefined or not finite?? I'm very curious if there is an appropriate pdf for the coordinate approach that would give this result. Or is it just the wrong way to look at the problem? This seems to boil down to the difference between: [1] Average distance between all unordered pairs of points [2] Average length of all line segments But what's the difference? Last edited by Aren Siekmeier : 22-08-2016 at 19:04. |
|
#2
|
||||
|
||||
|
Re: Math Quiz 9
Quote:
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 ...and you'll get a pdf of L only, if you make a histogram of the data and adjust it to have an area of 1. |
|
#3
|
||||
|
||||
|
Re: Math Quiz 9
Quote:
I'd like to think it's possible to parametrize the choice of line segment by end points. Curious about the difference between that and the problem (simply choosing uniformly distributed end points) that we wrote 94 posts about. Obviously the end points of all line segments are not uniformly distributed in the square. I've got an idea for finding just what their distribution is that I might get to if ever get unswamped this week. |
|
#4
|
||||
|
||||
|
Re: Math Quiz 9
FWIW: seglen pdf for L theta x y versus x1 y1 x2 y2 sampling |
|
#5
|
||||
|
||||
|
Re: Math Quiz 9
Still stuck in my old ways aren't I.
Here's the distribution of endpoints using your sampling procedure. https://plot.ly/~compwiztobe/9/ Code:
from random import random from math import pi,cos,sin,sqrt import numpy def randseg(): hl=random()/sqrt(2) th=random()*pi cx=random() cy=random() return [cx-hl*cos(th),cx+hl*cos(th),cy-hl*sin(th),cy+hl*sin(th)] def inbox(seg): return(all([x>=0 and x<=1 for x in seg])) def go(n): l=[] for i in range(n): x=randseg() if inbox(x): l.append(x) return(l) def pts(l): p=[] for x in l: p.append([x[0],x[2]]) p.append([x[1],x[3]]) return(p) data=pts(go(1000000)) #then bin and plot 2d histrogram with plotly API |
|
#6
|
|||||
|
|||||
|
Re: Math Quiz 9
Quote:
When you take this into account, the integral in the denominator becomes: 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. Last edited by GeeTwo : 22-08-2016 at 22:24. |
|
#7
|
||||
|
||||
|
Re: Math Quiz 9
For the center point at (0.1, 0.1) and length 0.2, the candidate segments are the diameters of a circle of radius 0.1. For the center point at (0.1, 0.1) and length 1.0, the number of candidate segments is zero. |
|
#8
|
|||||
|
|||||
|
Re: Math Quiz 9
Quote:
Here's another case which more clearly shows the fallacy.
Solving the first question in Cartesian coordinates, we find the answer to be (√2 + ln(1+√2))/3 = 0.765... Solving the second question using the logic used by Ether to count radials, the answer comes out to √2/2 = 0.707.. As the quadrant of the large circle includes all the same points as the unit square plus others which area all farther away than either average, there is a fallacy here somewhere. By weighting the density by r, the second question is properly answered 2√2//3 = .942... Addition: To more fully explore this point, I propose the following questions:
Last edited by GeeTwo : 23-08-2016 at 08:32. Reason: Addition: on |
|
#9
|
||||
|
||||
|
Re: Math Quiz 9
Question for Gus: What is the average length of all the vertical line segments in a unit circle? |
|
#10
|
||||
|
||||
|
Re: Math Quiz 9
Quote:
Spoiler for Thoughts:
Work attached below. EDIT: Gosh darn I only did those with both points touching the the edges. Lemme work on that. Last edited by Hitchhiker 42 : 23-08-2016 at 11:27. |
|
#11
|
|||||
|
|||||
|
Re: Math Quiz 9
Quote:
In any case, to answer Ether's question, the short answer is "not the same as the average length of segments within a small angle (e.g. 1 second of arc) of vertical within the circle." We've got another build session this evening getting ready for Red Stick Rumble, so I don't know how much I'll get done on this tonight. Addition: Hitchhiker, thanks for answering a different question. While walking across the street to get lunch, I think I put some nails in this coffin. Consider these two questions:
You answered the first - the area of the unit circle divided by its width: pi/2. I answered the second in my paper a score or so posts back (first problem), in a form that is not incompatible with Ether's method, provided angle is checked before length: 4/pi. If you answer the second using Ether's method but checking length first, then picking one of two possible angles, you will get an average value of 1. Completing reducto ad absurdum is left to the reader - back to work! Well, not that easily. Last edited by GeeTwo : 23-08-2016 at 12:30. |
|
#12
|
||||
|
||||
|
Re: Math Quiz 9
Quote:
![]() |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|