{"id":2373,"date":"2021-11-02T19:31:51","date_gmt":"2021-11-02T19:31:51","guid":{"rendered":"https:\/\/www.psyctc.org\/psyctc\/?post_type=docs&#038;p=2373"},"modified":"2024-08-14T08:17:26","modified_gmt":"2024-08-14T06:17:26","password":"","slug":"uniform-distribution","status":"publish","type":"docs","link":"https:\/\/www.psyctc.org\/psyctc\/glossary2\/uniform-distribution\/","title":{"rendered":"Uniform distribution"},"content":{"rendered":"\n<p>This is a distribution where all possible values are equiprobable.  Also called the rectangular and sometimes the &#8220;flat&#8221; distribution from the shape of the histogram.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Details<\/h4>\n\n\n\n<p>The classic example in statistics is tossing dice: each time a die is tossed, if it is a fair die, the probability of it showing 1, 2, 3, 4, 5 or 6 is the same: 1 in 6.  Here are four samples each of six dice being thrown (or one die being thrown six times!)<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"885\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice1-1024x885.png\" alt=\"\" class=\"wp-image-2374\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice1-1024x885.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice1-300x259.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice1-768x664.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice1-1536x1328.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice1.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>We can see that the observed scores aren&#8217;t &#8220;flat&#8221; or uniform, the first sample has 3, 4, 5 and 6 each coming up once but 2 comes up twice and 1 didn&#8217;t come up at all.  Here are some bigger samples.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"885\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice2-1024x885.png\" alt=\"\" class=\"wp-image-2375\" style=\"width:690px;height:596px\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice2-1024x885.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice2-300x259.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice2-768x664.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice2-1536x1328.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice2.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The sample sizes are on the right and now instead of plotting counts I have plotted proportions.  It can be seen that as the sample sizes increase to 100 the lumpiness decreases and the observed distributions do look flatter though still hardly &#8220;flat&#8221;.  What about bigger samples still?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"885\" src=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice3-1024x885.png\" alt=\"\" class=\"wp-image-2376\" srcset=\"https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice3-1024x885.png 1024w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice3-300x259.png 300w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice3-768x664.png 768w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice3-1536x1328.png 1536w, https:\/\/www.psyctc.org\/psyctc\/wp-content\/uploads\/2021\/11\/dice3.png 1700w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It&#8217;s pretty rare that therapy sample sizes reach 10,000 but we can see that even there the distributions aren&#8217;t perfectly flat, however, they are clearly flattening out toward the uniform probability of 1\/6 for each score.<\/p>\n\n\n\n<p>The idea of equiprobable independent events is at the heart of many statistical methods: a fairly  general &#8220;null model&#8221;, particularly for the chi squared test and its many relatives.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Try also<\/h4>\n\n\n\n<p><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/distribution\/\" title=\"\">Distribution<\/a><br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/gaussian-normal-distribution\/\" title=\"\">Gaussian (&#8220;Normal&#8221;) distribution<\/a><br>Probability<br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/histograms-and-barplots\/\" title=\"\">Histogram<\/a><br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/sample-size-n\/\" title=\"\">Sample size<\/a><br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/null-hypothesis\/\" title=\"\">Null hypothesis\/model<\/a><br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/inferential-testing-tests\/\" title=\"\">Inferential statistics<\/a><br><a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/p-value\/\" title=\"\">P values<\/a><br>Chi squared test<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Online resources<\/h4>\n\n\n\n<p>* You can generate samples from distributions using my shiny app: <a href=\"https:\/\/shiny.psyctc.org\/apps\/Create_univariate_data\/\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/shiny.psyctc.org\/apps\/Create_univariate_data\/<\/a>.  At the moment it only creates Gaussian and uniform distributions but more distributions may follow.  You can download the data or copy and paste it to other apps.<br>* You could then paste the data into another app: <a href=\"https:\/\/shiny.psyctc.org\/apps\/ECDFplot\/\" target=\"_blank\" rel=\"noopener\" title=\"\">https:\/\/shiny.psyctc.org\/apps\/ECDFplot\/<\/a> to get a sense of how your samples change was you change the size or the population parameters (mean and SD for the Gaussian; minimum and maximum for the uniform distribution).<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Chapters<\/h4>\n\n\n\n<p>The issue of distributions and of how sample size impacts on what we can infer sensibly from data is central to chapters 5, 6, 7 and 8 and really it pervades all thinking about change data.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Dates<\/h4>\n\n\n\n<p>Created 2.xi.21, updated links 14.viii.24.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a distribution where all possible values are equiprobable. Also called the rectangular and sometimes the &#8220;flat&#8221; distribution from the shape of the histogram. Details The classic example in statistics is tossing dice: each time a die is tossed, if it is a fair die, the probability of it showing 1, 2, 3, 4, &hellip; <a href=\"https:\/\/www.psyctc.org\/psyctc\/glossary2\/uniform-distribution\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Uniform distribution<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[18],"glossaries":[],"doc_tag":[],"knowledge_base":[],"class_list":["post-2373","docs","type-docs","status-publish","hentry","doc_category-om-book"],"year_month":"2026-04","word_count":363,"total_views":"1624","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"chris","author_nicename":"chris","author_url":"https:\/\/www.psyctc.org\/psyctc\/author\/chris\/"},"doc_category_info":[{"term_name":"All OM book glossary entries","term_url":"https:\/\/www.psyctc.org\/psyctc\/glossary\/non-knowledgebase\/om-book\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs\/2373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/comments?post=2373"}],"version-history":[{"count":7,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs\/2373\/revisions"}],"predecessor-version":[{"id":4370,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/docs\/2373\/revisions\/4370"}],"wp:attachment":[{"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/media?parent=2373"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/doc_category?post=2373"},{"taxonomy":"glossaries","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/glossaries?post=2373"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/doc_tag?post=2373"},{"taxonomy":"knowledge_base","embeddable":true,"href":"https:\/\/www.psyctc.org\/psyctc\/wp-json\/wp\/v2\/knowledge_base?post=2373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}