News for hackers. Stuff that matters.
Re:Benford's Law by markc on Monday November 20, 2017 @04:50PM (#15743630)
Had to try it! (Clojure)

     (frequencies
      (take 100
            (map #(first (str (first %)))
     	    (iterate (fn [[x y]] [y (+' x y)]) [0 1]))))
     
     => {\0 1, \1 30, \2 18, \3 12, \4 9, \5 8, \6 6, \7 5, \8 7, \9 4}
     
i.e. Yup, Fibonacci up to 100, 30% start with 1, 18% start with 2.

There are no comments on this comment yet.