Here's the actual distribution (rather than a percentage):
newfib2=: (,{: + [: {: }:)^:((2 -~ ])`([: * 2 # ]))
FIBS=:newfib2 1000
F=:("."1) 1{."1 ":"1 |."1 ,.FIBS
$F
1000
20{.F
1 1 2 3 5 8 1 2 3 5 8 1 2 3 6 9 1 2 4 6
fd=: [: /:~ ({. , #)/.~
fd F
1 301
2 177
3 125
4 96
5 80
6 67
7 56
8 53
9 45
At the moment I've forgotten how to get the expected frequency. Maybe in
the morning...
Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of David Ward
Lambert
Sent: Tuesday, May 14, 2013 5:58 PM
To: programming
Subject: [Jprogramming] Benford's law
http://rosettacode.org/wiki/Benford%27s_law#J
When trying to recover a padlock combination my father told me to start with
1. "Most combinations start with 1."
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm