首页 > 技术文章 > BendFord's law's Chi square test

huaxiaoyao 2015-03-17 07:51 原文

http://www.siam.org/students/siuro/vol1issue1/S01009.pdf

bendford'law

e=log10(1+l/n)

o=freq of first digit / total

x2= N*sum(power((o-e),2)/e)

1-9的乘法表中的数字算出来的chisquare test is 4.881

其第一个数字出现频率和benford标准值放大一百倍为:

Digit Benford Probability Observed Probability
1 30.10 22.22
2 17.61 18.52
3 12.49 13.58
4 9.69 14.81
5 7.92 7.41
6 6.69 8.64
7 5.80 4.94
8 5.12 6.17
9 4.58 3.70

(表格中因为都放大了100倍,所以下面的公式中需要除以100.)

x2= N/100*sum(power((o-e),2)/e)

推荐阅读