Re: Randomly generated convex polygon
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Tue, 18 Sep 2007 05:57:14 +0000 (UTC)
In article <ellieandrogerxyzzy-1709072121120001@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Roger Stafford <ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx> wrote:
I don't follow your reasoning in, "Suppose you have N-1 random values
each less than 1/t, followed by a single 1. ...." There are actually N
(n) random values and they are not followed by a 1 to begin with, but
possess a 1 sum only after normalization. I think there must be some
misunderstanding here.
Hypothesize that, randomly, the first N-1 'a' came out < 1/t,
and, that, randomly, the N'th random value came out near 1. This
is a *possible* situation -- increasingly unlikely as you increase
t for a given N, but *possible*. And in this situation, the
second last value of the cummulative normalized sum would be at
most (N-1)/(t+N-1); with t large, that would be small. This
establishes that it is *possible* for the second last value
of the cummulative sum to be arbitrarily small. The last value will
always be 1, of course, but the difference between the second last
value and 1 corresponds to the fraction of the diameter of the circle
that would have to be covered by the last side; until, that is, you
jigger the positions a bit to force convexness.
Certaintly over the long term we would expect the second last
cummulative entry to average out as (N-1)/N, but how the examples
I showed with 5 sides illustrated that final side closure of around 3/10
of the circle were common, 4/10 of the circle possible, and wider
gaps actually do happen, at least with small number of sides.
The visual effect for the user when these large gaps occur is that
an angle close to 90 degrees is observed more often than one would
expect by chance. It turns out not to be exactly 90 degrees; it
is sometimes a little more and sometimes a little less -- but visually
it looks like an artifact rather than chance.
When you pump the sides up to about 50, you get some very nice curves
seeming to appear; but in the range of about 5-8 sides especially,
the apparent artifact becomes visible.
The question here would be: could you re-examine the closure portion
and see what it would tend to produce if there did happen to be a large
angular gap between the second last and closing point?
Statistics...
T = 1000;
N = 5;
Gap=zeros(1,T);for K=1:T; A = rand(1,N); Gap(K) = A(end)/sum(A); end;
[mean(Gap), std(Gap), min(Gap), max(Gap)]
hist(Gap,40)
With rand('twister',1232), the mean is 0.20191, but the max is 0.67252 --
that is the first four points covered 1/3 of the angular range,
leaving the fifth side to extend over 2/3 of the angular range.
As I try over different N, I see different patterns (well, it is
random), but frequently the peak count is at -about- sqrt(2) times
the mean; this effect apparently reduces with larger T (e.g., 10000)
On the other hand, with T=10000, N=5, same seed, the largest gap
encountered is 0.77459, 3/4 of the arc to be closed by the final side.
If you look at the histograms, you can see that the distribution
is not a normal distribution. I consistantly (large or small T, large
or small N) see standard deviations more than half of the mean;
two standard deviations should account for 95.45% of the data, but
when the standard deviation is more than half of the mean, two standard
deviations would take us below zero. As T (the number of random trials)
increases, the distribution becomes more and more like
"a jagged-top box with a steep tail" -- right mean, but a more or
less flat distribution out to -roughly- sqrt(2) * the mean.
This will change the expectation of what the final closure of the
random polygon will tend to be like.
--
I was very young in those days, but I was also rather dim.
-- Christopher Priest
.
- References:
- Randomly generated convex polygon
- From: Yanis
- Re: Randomly generated convex polygon
- From: Roger Stafford
- Re: Randomly generated convex polygon
- From: Walter Roberson
- Re: Randomly generated convex polygon
- From: Roger Stafford
- Randomly generated convex polygon
- Prev by Date: looping of textscan
- Next by Date: Re: looping of textscan
- Previous by thread: Re: Randomly generated convex polygon
- Next by thread: Re: Randomly generated convex polygon
- Index(es):
Relevant Pages
|
Loading