# How to perform goodness of fit test and how  to assign probability with uniform distribution?

I have to demonstrate that a generator of VoIP calls generates calls uniformly distributed between callers. In particular the distribution is the uniform (min, max) one where the volume per caller distribution is uniformly distributed between a minimum and maximum. So by running a test with 10000 users and a min value equal to 30 calls per week and a max value equal to 90 calls/week i obtain that not all the users respect this limits.

The situation is depicted in figure:

The few users that generate <30 or >90 calls spoil the chi-square goodness of fit test and I don't know how can i proceed with a goodness of fit test. Most of the values is within the interval (and from these we obtain low chi-square value), but the few out-of-range values spoil the final chi-square calculation.

In your opinion what is the best way to operate? What should I do with the "out-of-range"values? Thank you.

PS: the chi-square goodness-of-fit test performed is reported in the following figure:

where still I don't know what to do with the out-of-range values.

UPDATE

after talking with people linked with the project we concluded that the generator does not satisfy the uniform distribution. We have to do a theoretic analysis of what we expect really to be the distribution at the end of the generation based on the inputs.

This means that I have to do it! More details: The generator assigns a "probability" between 0 and 1 to the callers (with a particular method, that probably is the problem). Then it generates a random value from 0 to 1 and it finds the associated user and assigns the call to him.

The generator generates calls for a week with the constant rate equal to 1 call per second, this means that it generates ca. 604800 total calls.

My goal is to distribute the callers between the min and max number of calls in a week. For example if I have 10000 users and the min limit is equal to 30 calls per week and max = 90 calls per week I should obtain something about:

30 calls : 163 users.

31 calls : 163 users.

....

90 calls : 163 users.

So 163 users generate 30 calls in a week..etc, etc and finally 163 users generate 90 calls in a week. How should I assign the probability to callers in order that the generator distributes the callers uniformly between the range 30-90?

-

11
You have demonstrated the calls are not uniformly distributed. The $\chi^2$ calculation is not "spoiled": it worked! – whuber♦ Feb 23 '11 at 16:23
ok, mmm..maybe is there a "conceptual" error during the implementation of the generator? because for my thesis, my supervisor asked me to demonstrate formally that the generator (which is the result of months&months of study and they use for a long time) really follows the uniform distribution. Maybe can I use a sort of "approximation"? – Maurizio Feb 23 '11 at 16:35

5
What would you like to approximate? Obviously you cannot validly demonstrate this generator produces uniform results: the data flatly contradict that. The next step depends on what actions you contemplate. Could the data be wrong? Could they inaccurately reflect what the generator is doing? Could they indicate an unexpected phenomenon? Could the design of the generator be wrong? You need to raise (and eventually address) questions like these. The one question that is definitively settled, though, is the one you originally asked: these data are not uniform! – whuber♦ Feb 23 '11 at 16:45
thanks, i think it is better to speak with who has implemented the generator before reaching hasty conclusions. – Maurizio Feb 23 '11 at 16:52

1
Then the answer would be to apply a goodness of fit test such as the chi square. What people are doing fitting to the data generated interval where data falls into cells outside the range doesn't make sense to me. If you are strict about the interval once you find a single observation outside the interval you can unequivocally reject the hypothesis of uniformity on the interval without any goodness of fit test. – Michael Chernick May 3 '12 at 20:03
show 7 more comments

## 2 Answers

Perhaps you should randomly permute the callers, then, per your example, claim that the first 163 made 30 calls, the next 163 made 31 calls, etc. By 'permutation', I mean sort them in a random order. The simple way to do this is to use your random number generator to assign each caller a number, then sort them by that number.

-

What you are describing resembles a "continuous uniform distribution",

http://mathworld.wolfram.com/UniformDistribution.html

-Ralph Winters

-

7
@Ralph The whole point of the comments following the question is that although the distribution of the data might "resemble" a uniform distribution, it is extremely unlikely that the data were truly obtained from this distribution. That's why we use quantitative methods in statistics: they keep us from fooling ourselves (and others) with suggestive patterns or resemblances that are not justifiable. – whuber♦ Feb 23 '11 at 20:46
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9208671450614929, "perplexity_flag": "middle"}