Wikipedia:Reference desk/Archives/Mathematics/2020 July 17

= July 17 =

Please Help This Brainchild Develop
Well, I am back again.

Although I was into prime sieves lately, I am a machine learning enthusiast. Recently I stumbled upon an idea for a statistical classifier. I thought - why not use two centers (representing two different classes) and disperse a data point into such a space, and see which class will that data point get attracted to ? I thought of using the inverse square law used in physics (in the conventional (Newtonian) way of calculation the gravitational force ) and some statistics. Is this possible ? Any help in this research topic is accepted (in the sense that anyone willing to collaborate will be allowed to join me in my journey).--Sam Ruben Abraham (talk) 11:19, 17 July 2020 (UTC)

Geometrical probability question
A well-known application of geometrical probability is the problem of two people arriving at random in a unit interval, and the probability is to be found that they arrive sufficiently close together, for example within $$ 10 $$ minutes when the arrivals are distributed over an hour. The easiest approach is to mark the critical region on a unit square and calculate its area. What I'm finding hard to visualise, let alone process, is the corresponding geometry with three people. Obviously a unit cube is considered, and I think a hexagonal pillar running along a diagonal, but I can't work out how this joins what would seem to be tetrahedra at the corners of the cube. Is a picture of this solid available, and indeed anything else to aid a geometrical solution?2A00:23C6:AA08:E500:D44F:1EA9:A5F:63A1 (talk) 13:35, 17 July 2020 (UTC)


 * Does it help to visualize it as {(x,y,z)∈[0,1]3 | |x-y|≤k} ∩ {(x,y,z)∈[0,1]3 | |x-z|≤k} ∩ {(x,y,z)∈[0,1]3 | |y-z|≤k} (where ''k=1/6 in this case), or in words, the intersection of the three right prisms formed from the two dimensional solution on the three origin-intersecting faces of the unit cube? -- ToE 16:19, 17 July 2020 (UTC)
 * ... and for visualizing what happens at the corners, take one face of the unit cube, say z=0, and consider what portion of that face satisfies the criteria. Apply symmetry and then connect the appropriate vertices to create your pillar. -- ToE 20:03, 17 July 2020 (UTC)
 * I'm still struggling to see this in detail. I think that the three right prisms intersect in a hexagonal pillar along the cube's diagonal, and at the origin (and the opposite corner) there is a tetrahedron with an equilateral triangle as base. The problem is the meeting of a hexagon and an equilateral triangle, in that somehow six vertices become three (strictly, six edges of the pillar become three of the tetrahedron). And when I've seen the whole solid, I want to calculate its volume. As an alternative to a picture, could you give me the coordinates of every vertex (assume the same one hour, and ten minutes, as before)? → 2A00:23C6:AA08:E500:10E4:455B:F0D7:B896 (talk) 09:38, 18 July 2020 (UTC)
 * "I think that the three right prisms intersect in a hexagonal pillar along the cube's diagonal," Yes.
 * "... and at the origin (and the opposite corner) there is a tetrahedron with an equilateral triangle as base." No. That is where you are being thrown off.
 * "... could you give me the coordinates of every vertex ..." I will if you can't come up with them yourselves with this hint:  What is the solution where z=0?  In other words, what is the intersection of your pillar and the x-y plane?  And what does that tell you about the vertices? -- ToE 13:55, 18 July 2020 (UTC)
 * I think that I've figured out the geometry near the corners and so derived an expression for the volume $3 p ^{2} - 2 p ^{3}$, where $p$ is the proportion of the hour that everyone must arrive within. Simulation gave numerical values in close agreement. Thanks for your time and the ongoing quiz. → 2A00:23C6:AA08:E500:617C:A1A9:62A2:6632 (talk) 15:48, 18 July 2020 (UTC)
 * I concur with your answer ... but I haven't been able to visualize a better, more geometrically intuitive way of making that calculation beyond taking a one-sixth wedge of the hexagonal pillar -- that bounded by 0=(0,0,0), a=(p,0,0), b=(p,p,0), c=(1,1,1), d=(1,1-p,1-p), & e=(1,1,1-p) -- for which I brute-forced a volume calculation by dividing it into three origin-verticed tetrahedrons -- two faced with the triangles abe & aed (from dividing the exterior trapezoid) and the third faced by the far triangle cde -- and computing their volume via the triple product method. As satisfying as it is for the sixes to cancel out in the final volume, there's got to be a better way, right?  How did you do it? -- ToE 11:56, 19 July 2020 (UTC)
 * By working with the complementary volume. Alongside the shape on each side there is a full-height right triangular prism of volume $$(1/2)(1-p)^2$$, and above and below it on each side there is a skew triangular prism of volume $$(1/2)p(1-p)^2$$. Subtract two of the first and four of the second from unity. → 2A00:23C6:AA08:E500:D48F:A4C7:37DF:D9DE (talk) 15:27, 20 July 2020 (UTC)
 * Nice!
 * Have you looked at your answers for the 2 and 3-person cases to see if it suggests a pattern for the n-person (or n-dimensional) case? That is, a general formula for Pn(p)? -- ToE 17:11, 20 July 2020 (UTC)
 * Working via the complementary space, successive terms are $$ P(1)=1, P(2)=1-(1-p)^2=2p-p^2, P(3)=1-(1-p)^2-2p(1-p)^2=3p^2-2p^3 $$, so I deduce that $$ P(4)=1-(1-p)^2-2p(1-p)^2-3p^2(1-p)^2=4p^3-3p^4 $$. As this last result can also be written $$ P(4)=P(3)-3p^2(1-p)^2 $$, I deduce that the general result is $$ P(n)=P(n-1)-(n-1)p^{n-2}(1-p)^2=np^{n-1}-(n-1)p^n $$. It's a decreasing sequence, and it's apparent that the shape whose "volume" is wanted is shrinking with increasing dimension and is requiring an increasing number of packing pieces to fill the gap between it and the unit "cube". → 2A00:23C6:AA08:E500:9C12:FEB8:B301:FABE (talk) 13:57, 21 July 2020 (UTC)
 * Bravo!
 * When I first stumbled upon npn-1-(n-1)pn, it seemed too simple to be true, but numerically it appeared to check out. Given how elegant this is, I would expect it to be a staple of Geometric probability exercises, but while a (no doubt ineffective) search turned up many instances of the two-person problem, I found only one which addressed the general problem: Meeting Probabilities (by Kevin Brown, perhaps Dr. Kevin S. Brown of Kent, WA, whoever that is).  He approaches it a few different ways, one which generalizes the problem even further.  (His broken link in paragraph 2 should be The Shape of Coincidence.)
 * Disclaimer: I've not independently verified either your method or Dr. Brown's, though I look forward to doing so when I have more time.
 * There is a surprising amount of activity in the Archives, with new information provided to old questions. Creating a Wikipedia account allows you to be subsequently pinged. (Plus I could ping you if I get hung up trying to visualize n-dimensional complementary volumes!)
 * Thanks for a well posed question which led to an interesting general result. -- ToE 19:40, 21 July 2020 (UTC) Edited -- ToE 01:34, 24 July 2020 (UTC)