0
$\begingroup$

Suppose I have a sample of $N$ numbers $a_1,\dots,a_N$ from $1,\dots,k$. How can I test whether they are equidistributed?

I'm not interested in a full randomness test as the order does not matter to me, so Testing random variate generation algorithms is not relevant to me, neither are its dupes. For me, a sequence $1,2,3,\dots k,1,2,3,\dots,k,\dotsc$ is perfectly fine.

I would like to have a test just from the frequencies/counts, i.e., my input data really is the vector of number of occurrences $c_j=\#\{n\leq N:a_n=j\}$ for $j=1,\dots,k$. I was unable to google the way how to proceed.

$\endgroup$
5
  • 2
    $\begingroup$ Chi square test. $\endgroup$ Feb 5 '19 at 12:34
  • $\begingroup$ @user2974951 Thanks a lot, after some googling based on your help I found that I have to calculate $\chi^2=Nk\sum_{j=1}^k (c_j/N-1/k)^2$ and that I have $k-1$ degrees of freedom. But from this I'm not sure how to proceed. $\endgroup$
    – yo'
    Feb 5 '19 at 12:45
  • 1
    $\begingroup$ See these threads. $\endgroup$
    – whuber
    Feb 5 '19 at 13:17
  • 1
    $\begingroup$ @whuber Thanks a lot! stats.stackexchange.com/questions/3194/… helped me really. Should I delete my question? $\endgroup$
    – yo'
    Feb 5 '19 at 13:26
  • 1
    $\begingroup$ Good find! Thank you for searching and for sharing the result of your search. $\endgroup$
    – whuber
    Feb 5 '19 at 13:28