Artificial intelligent assistant

chi-square test for uniform distribution So, i have a hash function which maps a set of possible inputs to a defined range of outputs. I want to test if the mapped outputs are uniformly distributed over the defined range. Wikipedia seems to suggest that the chi-square test can be used to measure the uniformity of the result - how would i go about doing this?

Set up "bins" such that the expected number of data points in each bin is greater than 5 (this recommendation is due to the fact that the Chi-square test relies on the central limit theorem, so that results form an approximate multivariate normal distribution).

Then, subtract the expected number of points in each bin from the _actual_ number of points in each bin. Use these differences to form your chi-square statistic (per the wiki page) and then apply the test.

Since you are testing for uniformity, the expected number of points in each bin bill be proportional to either the length or the number of outputs in each bin (depending on if your hash function is continuous or discrete valued, respectively.)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy d4fdb46cbfe4c3f838bfc5c6cadd2fc6