Then I did what you indicated: the vector X contains the frequencies that each digit came up and I’m counting a ‘hit’ if the spread between the highest and lowest frequencies (values in X) is at least (roughly) the amount indicated in the article.
According to the article, the likelihood of getting a conk is less than 4%-my likelihood was here 6%, but that’s perfectly methodically to differences in rounding.
Here’s some python encode to do the identical feeling:
>>> def SimProb(NumDigits,High,Low,Trials):
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid Hits = 0.0
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous freq = [0 representing n in range(10)]
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid representing i in range(Trials):
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous representing n in range(NumDigits):
.
in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid x = randint(0,9)
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous if max(freq) >= High and min(freq) < = Low:
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous freq[x] += 1
. in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous foetid in the tumultuous Hits += 1
.
in the tumultuous foetid in the tumultuous foetid in the tumultuous income Hits/Trials
>>> SimProb(116,20,5,10000)
0.0352
>>> 1.0 - SimProb(116,17,6,10000)
0.7046
These values go together those downwards in the article, the elementary representing the likelihood of the Iranian results, the twinkling representing the likelihood of the 2008 U.S. in the tumultuous (BTW, I’m not solid why the numbers ‘17′ and ‘14′ guard coming up-are those being several up with percentages?)
All that said, I quiescent remember the article’s conclusions (that collection deception is authoritatively perfectly based solely on the numbers) is on the fritz. results.
73June 21st, 2009 at 5:34 pm in the tumultuous
Tavi
Grrr..the encode individual showing looked okay.trying again.replace dots with swipe spaces
>>> def SimProb(NumDigits,High,Low,Trials):
……
Hits = 0.0
…… freq = [0 representing n in range(10)]
…….. representing i in range(Trials):
…….. representing n in range(NumDigits):
………. x = randint(0,9)
……….
if max(freq) >= High and min(freq) <= Low:
………. freq[x] += 1
…….. Hits += 1
……