Statistical testing for uniform distribution











up vote
-1
down vote

favorite












Given are $N$ categories and $x_i$ occurrences of events within these categories, where $i = 1dots N$. The null hypthesis is that there is a uniform distribution, i.e. each category should contain roughly the same number of events. What is the correct statistical test to determine if the null hypothesis is acceptable for a given p-value?



I've tried to use the Chi-Square test for this, but for the number of categories (in my case 256) it seems to be quite unstable. As an example, when I generate 10 million truly random samples and ran 100 trials, I got Chi-Square values from 228 to 310. Using 255 degrees of freedom, I looked up that out of these 100 trials only 2 indicated that that there is statistical significance (i.e., Chi-Square values 295 and 310, p = 0.05). My interpretation is that 98 of these truly random samples are indicated to be not truly random, when they are indeed.










share|cite|improve this question
























  • See wikipedia for a starter. Please include your own effort and the specific difficulties you faced, otherwise the post is likely to be closed.
    – Lee David Chung Lin
    Nov 14 at 1:50















up vote
-1
down vote

favorite












Given are $N$ categories and $x_i$ occurrences of events within these categories, where $i = 1dots N$. The null hypthesis is that there is a uniform distribution, i.e. each category should contain roughly the same number of events. What is the correct statistical test to determine if the null hypothesis is acceptable for a given p-value?



I've tried to use the Chi-Square test for this, but for the number of categories (in my case 256) it seems to be quite unstable. As an example, when I generate 10 million truly random samples and ran 100 trials, I got Chi-Square values from 228 to 310. Using 255 degrees of freedom, I looked up that out of these 100 trials only 2 indicated that that there is statistical significance (i.e., Chi-Square values 295 and 310, p = 0.05). My interpretation is that 98 of these truly random samples are indicated to be not truly random, when they are indeed.










share|cite|improve this question
























  • See wikipedia for a starter. Please include your own effort and the specific difficulties you faced, otherwise the post is likely to be closed.
    – Lee David Chung Lin
    Nov 14 at 1:50













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











Given are $N$ categories and $x_i$ occurrences of events within these categories, where $i = 1dots N$. The null hypthesis is that there is a uniform distribution, i.e. each category should contain roughly the same number of events. What is the correct statistical test to determine if the null hypothesis is acceptable for a given p-value?



I've tried to use the Chi-Square test for this, but for the number of categories (in my case 256) it seems to be quite unstable. As an example, when I generate 10 million truly random samples and ran 100 trials, I got Chi-Square values from 228 to 310. Using 255 degrees of freedom, I looked up that out of these 100 trials only 2 indicated that that there is statistical significance (i.e., Chi-Square values 295 and 310, p = 0.05). My interpretation is that 98 of these truly random samples are indicated to be not truly random, when they are indeed.










share|cite|improve this question















Given are $N$ categories and $x_i$ occurrences of events within these categories, where $i = 1dots N$. The null hypthesis is that there is a uniform distribution, i.e. each category should contain roughly the same number of events. What is the correct statistical test to determine if the null hypothesis is acceptable for a given p-value?



I've tried to use the Chi-Square test for this, but for the number of categories (in my case 256) it seems to be quite unstable. As an example, when I generate 10 million truly random samples and ran 100 trials, I got Chi-Square values from 228 to 310. Using 255 degrees of freedom, I looked up that out of these 100 trials only 2 indicated that that there is statistical significance (i.e., Chi-Square values 295 and 310, p = 0.05). My interpretation is that 98 of these truly random samples are indicated to be not truly random, when they are indeed.







statistics uniform-distribution hypothesis-testing






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 15 at 9:11

























asked Nov 13 at 16:29









itecMemory

11




11












  • See wikipedia for a starter. Please include your own effort and the specific difficulties you faced, otherwise the post is likely to be closed.
    – Lee David Chung Lin
    Nov 14 at 1:50


















  • See wikipedia for a starter. Please include your own effort and the specific difficulties you faced, otherwise the post is likely to be closed.
    – Lee David Chung Lin
    Nov 14 at 1:50
















See wikipedia for a starter. Please include your own effort and the specific difficulties you faced, otherwise the post is likely to be closed.
– Lee David Chung Lin
Nov 14 at 1:50




See wikipedia for a starter. Please include your own effort and the specific difficulties you faced, otherwise the post is likely to be closed.
– Lee David Chung Lin
Nov 14 at 1:50















active

oldest

votes











Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996948%2fstatistical-testing-for-uniform-distribution%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2996948%2fstatistical-testing-for-uniform-distribution%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?