I'm actually creating a package for the Benford Law (for academic purpose). And I'm trying to perform a goodness of fit with the "chisq.test".
I've this vector :
prop = [1377 803 477 381 325 261 253 224 184]
That I want to compare with this vector of probabilities (1st digit from Benford Law) :
th = [0.301 0.176 0.125 0.097 0.079 0.067 0.058 0.051 0.046]
Thus, I perfom the test :
chisq.test(prop,p=th)
Then, if I understood the purpose of the test correctly, it should return a big p-value (close to 1 rather than 0) because proportions from the data (prop) is really similar to the theoric proportions (th) , but the output give me :
"Chi-squared test for given probabilities data: prop X-squared = 22.044, df = 8, p-value = 0.004835"
Thus, if someone can help me to understand it gave this low p-value ?
Thanks a lot
PS :
I performed "chisq.benftest" (Pearson's Chi-squared Goodness-of-Fit Test for Benford's Law) with the same data and it gave me a more coherent p-value (0.7542), thus I should have a done a mistake somewhere, but I don't know where.