Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2019 September 28

From Wikipedia, the free encyclopedia
Mathematics desk
< September 27 << Aug | September | Oct >> Current desk >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


September 28

[edit]

Can formula such as this be represented mathematically by geometric shapes?

[edit]

Or are they?

?? ~ R.T.G 07:23, 28 September 2019 (UTC)[reply]

Your evaluation of the integral is wrong, RTG. Think of the level curves of .--Jasper Deng (talk) 07:34, 28 September 2019 (UTC)[reply]
Not really familiar with these strange math symbols, was my top subject but, seems like you are saying in a way yes, xP ~ R.T.G 07:52, 28 September 2019 (UTC)[reply]
I actually showed you before how to evaluate this integral correctly. Ruslik_Zero 07:55, 28 September 2019 (UTC)[reply]
(edit conflict) @RTG: then please kindly use our articles such as line integral and gradient theorem. I'll assume good faith this time, please reserve the reference desk for more serious questions than this. {@Ruslik0: this isn't the original OP.--Jasper Deng (talk) 07:56, 28 September 2019 (UTC)[reply]

random partitions of an interval

[edit]

Backstory: Alias method#Table generation, especially the last paragraph. I thought of an algorithm that, for the one input that I've tried, beats the greedy algo. So I ought to test them both on other input, which means generating random partitions of an interval, for which there's an obvious approach – throw N-1 darts to mark the breaks – but now I'm curious about others. Do random partitions have a ‘spectrum’ that differs between methods?

If N is composite, with factors , do we get different results if we partition the interval with darts and then each sub-interval with darts, and so on?

How about choosing randomly and then , mod 1? (Golden section, the most irrational number)

Other methods? —Tamfang (talk) 21:06, 28 September 2019 (UTC)[reply]

If you use different methods to generate random numbers then, unless there is a reason for the distributions to be the same, the distributions will be different. You can test this by computing the distribution for one of the intervals using the first method and comparing it with the distribution of the same interval for an alternative method. There was a question here about the distribution of the lengths of the intervals generated by the "dart" method a few months ago. The upshot there was that the lengths of the intervals are distributed as the minimum of N-1 variables, in this case the CDF is 1-(1-x)N-1. This has the nice property that all the intervals generated have the same distribution, which won't be the case with your alternate methods unless you shuffle them somehow. For the second alternative, take N = 3 and look at the second interval. This always has the value e or 1-e where e (=τ-2) is the amount offset each time. (Note, most people use φ to denote the golden ratio.) So in this case the distribution for the second interval is not discrete and so its CDF is not continuous. For the first alternative, take N=4 (the first case where it makes a difference), and look at the distribution for the first interval. In this case you pick x1, x2, x3 randomly on [0,1], and divide use x1x2, x1, and x1+(1-x1)x3 as break points. The CDF for the first interval is P(x1x2<x) = x(1-logx) which is not the same as (1-x)2. If you want the distribution of the partitions to be uniform then basically you want to pick a point uniformly from the polytope {(y1, ... , yn): yi≥0, ∑yi=1} and I believe the "dart" method achieves this.--RDBury (talk) 03:01, 29 September 2019 (UTC)[reply]
While away from keyboard I became aware that the golden section method, while it may be good for some other purposes, is a bad idea here. —Tamfang (talk) 05:00, 29 September 2019 (UTC)[reply]
PS. The question I referred to above can be found at Wikipedia:Reference desk/Archives/Mathematics/2019 June 21. --RDBury (talk) 03:10, 29 September 2019 (UTC)[reply]
@RDBury: If you use different methods to generate random numbers then, unless there is a reason for the distributions to be the same, the distributions will be different. Without thinking about it hard, I would expect that "subdivide first into p parts by random partition points, then subdivide each into q parts" would give the same answer as "subdivide into pq parts by random points". How sure are you that it doesn't? --JBL (talk) 22:22, 30 September 2019 (UTC)[reply]
"subdivide first into p parts by random partition points, then subdivide each into q parts" is far more likely to produce dense clusters. If step one produces a small part then step two will split it in q smaller parts. Consider e.g. p = 2, q = 1000, and the probability of getting at least 1000 partition points in the first 1%. It's at least 1% since it always happens if the first split is there. PrimeHunter (talk) 23:32, 30 September 2019 (UTC)[reply]
I wasn't counting on the different methods give different distributions to be proof, which is why I did the calculations. But generally intuition, not reliable in math as a whole, is especially unreliable when it comes to probability. Comparing the n=4 darts distribution 1-(1-x)3 with the p=2, q=2 distribution x(1-logx), they both have the same mean 1/4, but the second one is skewed more to the left, having a median of .19 while the first one has a median of about .21. This agrees with PrimeHunter's argument. --RDBury (talk) 16:40, 1 October 2019 (UTC)[reply]
I thought of an algorithm that, for the one input that I've tried, beats the greedy algo. Throwing darts, I find that my new algo beats the greedy algo in about one case in five. —Tamfang (talk) 23:16, 30 September 2019 (UTC)[reply]