Chronology Current Month Current Thread Current Date
[Year List] [Month List (current year)] [Date Index] [Thread Index] [Thread Prev] [Thread Next] [Date Prev] [Date Next]

Re: [Phys-L] From a Math Prof (physics BS major) at my institution ( math challenge)



I'm (supposed to be) generating 1 million sets of 21 quintets of numbers between 1 and 35, inclusive without replacement. I've tested that pretty extensively (but there's ALWAYS 1 more bug, right?). I think my counting algorithm is pretty clean now, too. I'm counting three things:
1) How many quintets in each set have at least one mod 10 number (round number??) and histogramming that.
2) How many quintets in each set have at least one sequential couplet and histogramming that.
3) How many quintets in each set have at least one sequential triplet and histogramming that.

Here are the results I get from the code posted previously: (I've added some text to clarify what is seen and truncated the bin edge values to make it more readable)

Min quintets=0 Mean # of quintets=7.974517 Max # of quintets=19
Bins edges and Counts of quintets Even Tens i
[ 0. 0.95 1.90 2.85 3.80 4.76 5.71 6.67 7.62 8.58 9.53 10.47 11.42 12.38 13.33 14.28 15.2 16.19 17.14 18.09 19.04 20. ]
[ 40 576 3398 13153 37084 77753 126022 164904 177487 156160 114152 70582 35901 15513 5268 1571 354 72 9 1 0]

Counts of quintets with at least one Consecutives couplet in a Set
Min quintets0 Mean # quintets 10.004793 Max # quintets=21
Bins and Counts of Consecutives in a Set
[ 0. 0.95 1.90 2.85 3.80 4.76 5.71 6.67 7.62 8.58 9.53 10.47 11.42 12.38 13.33 14.28 15.2 16.19 17.14 18.09 19.04 20. ]
[ 1 18 206 1238 5190 16071 38858 74951 120395 157639 172042 156682 118312 75260 39077 16558 5625 1521 305 44 6]



Triple Consecutives in a Set
Min=0 Mean=0.994799 Max quitets with a triple=8
Bins and Counts of Triple Consecutives in a Set
[ 0. 0.95 1.90 2.85 3.80 4.76 5.71 6.67 7.62 8.58 9.53 10.47 11.42 12.38 13.33 14.28 15.2 16.19 17.14 18.09 19.04 20. ]
[ 360505 377478 187236 59215 12990 2243 305 25 3 0 0 0 0 0 0 0 0 0 0 0 0]


Execution time (219.35221764304885, ' seconds')

40/million sets of 21 quintets have no round tens. The average number of quintets per set with at least one round ten is 8, so a probability of 8/21. Fairly bell-shaped.

1/million sets of 21 quintets have no sequential couplets. The average number of quintets per set with sequential couplets is 10, so a probability of 10/21 or 48%. Fairly bell-shaped

The consecutive triplet was extremely non-gaussian, but I haven't done any distribution tests to see if it's Poisson, X-square, f, etc. What's notable is that 36% of the sets have no triplets, so 64% have at least one triplet or more. Could triplets be used as a distinguishing test to get better than 50-50? Mean number of triplets is 1 (if mean has meaning for this). If you have 2 or more triplets in a data set and a class of students who are not statistically aware trying to generate data, I'd bet on the the 2 or more triplets as being the "real" random set.