{"id":1429,"date":"2023-06-22T02:23:08","date_gmt":"2023-06-22T02:23:08","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/fishers-exact-test-learn-it-3\/"},"modified":"2026-11-20T16:46:00","modified_gmt":"2026-11-20T16:46:00","slug":"fishers-exact-test-learn-it-3","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/fishers-exact-test-learn-it-3\/","title":{"raw":"Fisher's Exact Test \u2013 Learn It 3","rendered":"Fisher&#8217;s Exact Test \u2013 Learn It 3"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Check the conditions for Fisher's Exact Test&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Check the conditions for Fisher\u2019s Exact Test<\/span><\/li>\r\n\t<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Explain the relationship of two qualitative binary variables using Fisher's Exact Test&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Explain the relationship of two qualitative binary variables using Fisher\u2019s Exact Test<\/span><\/li>\r\n<\/ul>\r\n<\/section>\r\n<section class=\"textbox proTip\" aria-label=\"Pro Tip\">\r\n<p><strong>How Fisher\u2019s Exact Test works:<\/strong> <br \/>\r\n<br \/>\r\nUnlike the chi-square test, Fisher\u2019s Exact Test doesn\u2019t rely on an approximation \u2014 it calculates the <em>exact<\/em> probability of observing a table as extreme as (or more extreme than) the one we got, assuming the row and column totals are fixed and the two variables are independent. This exact probability comes from the hypergeometric distribution, which gives the probability of each possible 2\u00d72 table with those same margins. The p-value is the sum of the probabilities of all tables at least as extreme as the observed one. Because this involves summing probabilities across possible tables rather than comparing to a reference distribution (like chi-square does), Fisher\u2019s Exact Test is typically calculated using software or a tool rather than by hand \u2014 but the result is still an exact p-value, not an approximation.<\/p>\r\n<\/section>\r\n<section class=\"textbox recall\">Steps for <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Check the conditions for Fisher's Exact Test&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Fisher\u2019s Exact Test of Independence <\/span>Hypothesis Test:\r\n\r\n<ol>\r\n\t<li>Write out the null and alternative hypotheses.\r\n\r\n<ul>\r\n\t<li>[latex]H_0[\/latex]: The two variables are independent.<\/li>\r\n\t<li>[latex]H_A[\/latex]: The two variables are\u00a0<em>not<\/em>\u00a0independent.<\/li>\r\n<\/ul>\r\n<\/li>\r\n\t<li>Check the conditions for the hypothesis test.\r\n\r\n<ul>\r\n\t<li aria-level=\"2\">Independence\/Randomness Condition:\u00a0The sample from our population should be independent, random sample or independent sample that can be considered representative of the population.<\/li>\r\n\t<li aria-level=\"2\">2x2 contingency table: The variables for our study need to be categorical and binary, giving us two categories by two categories of data<\/li>\r\n\t<li aria-level=\"2\">Small Expected Counts Condition: One or more expected cell counts in the 2\u00d72 table is less than 5 (this is what makes Fisher\u2019s Exact Test appropriate instead of the chi-square test for independence).<\/li>\r\n<\/ul>\r\n<\/li>\r\n\t<li style=\"font-weight: 400;\" aria-level=\"1\">Calculate the test statistic.<\/li>\r\n\t<li style=\"font-weight: 400;\" aria-level=\"1\">Calculate a [latex]P[\/latex]-value.<\/li>\r\n\t<li style=\"font-weight: 400;\" aria-level=\"1\">Compare the [latex]P[\/latex]-value to the significance level, [latex]\\alpha[\/latex], to make a decision.<\/li>\r\n\t<li style=\"font-weight: 400;\" aria-level=\"1\">Write a conclusion in context (e.g., we do\/do not have convincing evidence\u2026).<\/li>\r\n<\/ol>\r\n<\/section>\r\n<p>Now suppose that, instead of comparing black helmets to other colors, the researchers wanted to compare red helmets to other colors.<\/p>\r\n<section class=\"textbox tryIt\">\r\n<p>[ohm2_question hide_question_numbers=1]17695[\/ohm2_question]<\/p>\r\n<\/section>\r\n<section class=\"textbox tryIt\">\r\n<p>[ohm2_question hide_question_numbers=1]17696[\/ohm2_question]<\/p>\r\n<\/section>\r\n<p><iframe src=\"https:\/\/lumen-learning.shinyapps.io\/fisherexact\/\" width=\"100%\" height=\"700\" frameborder=\"no\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><br \/>\r\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/fisherexact\/\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/p>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]17697[\/ohm2_question]<\/section>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Check the conditions for Fisher's Exact Test&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Check the conditions for Fisher\u2019s Exact Test<\/span><\/li>\n<li><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Explain the relationship of two qualitative binary variables using Fisher's Exact Test&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Explain the relationship of two qualitative binary variables using Fisher\u2019s Exact Test<\/span><\/li>\n<\/ul>\n<\/section>\n<section class=\"textbox proTip\" aria-label=\"Pro Tip\">\n<p><strong>How Fisher\u2019s Exact Test works:<\/strong> <\/p>\n<p>Unlike the chi-square test, Fisher\u2019s Exact Test doesn\u2019t rely on an approximation \u2014 it calculates the <em>exact<\/em> probability of observing a table as extreme as (or more extreme than) the one we got, assuming the row and column totals are fixed and the two variables are independent. This exact probability comes from the hypergeometric distribution, which gives the probability of each possible 2\u00d72 table with those same margins. The p-value is the sum of the probabilities of all tables at least as extreme as the observed one. Because this involves summing probabilities across possible tables rather than comparing to a reference distribution (like chi-square does), Fisher\u2019s Exact Test is typically calculated using software or a tool rather than by hand \u2014 but the result is still an exact p-value, not an approximation.<\/p>\n<\/section>\n<section class=\"textbox recall\">Steps for <span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;Check the conditions for Fisher's Exact Test&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:12801,&quot;3&quot;:{&quot;1&quot;:0},&quot;12&quot;:0,&quot;15&quot;:&quot;arial&quot;,&quot;16&quot;:9}\">Fisher\u2019s Exact Test of Independence <\/span>Hypothesis Test:<\/p>\n<ol>\n<li>Write out the null and alternative hypotheses.\n<ul>\n<li>[latex]H_0[\/latex]: The two variables are independent.<\/li>\n<li>[latex]H_A[\/latex]: The two variables are\u00a0<em>not<\/em>\u00a0independent.<\/li>\n<\/ul>\n<\/li>\n<li>Check the conditions for the hypothesis test.\n<ul>\n<li aria-level=\"2\">Independence\/Randomness Condition:\u00a0The sample from our population should be independent, random sample or independent sample that can be considered representative of the population.<\/li>\n<li aria-level=\"2\">2&#215;2 contingency table: The variables for our study need to be categorical and binary, giving us two categories by two categories of data<\/li>\n<li aria-level=\"2\">Small Expected Counts Condition: One or more expected cell counts in the 2\u00d72 table is less than 5 (this is what makes Fisher\u2019s Exact Test appropriate instead of the chi-square test for independence).<\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Calculate the test statistic.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Calculate a [latex]P[\/latex]-value.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Compare the [latex]P[\/latex]-value to the significance level, [latex]\\alpha[\/latex], to make a decision.<\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\">Write a conclusion in context (e.g., we do\/do not have convincing evidence\u2026).<\/li>\n<\/ol>\n<\/section>\n<p>Now suppose that, instead of comparing black helmets to other colors, the researchers wanted to compare red helmets to other colors.<\/p>\n<section class=\"textbox tryIt\">\n<iframe loading=\"lazy\" id=\"ohm17695\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=17695&theme=lumen&iframe_resize_id=ohm17695&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><br \/>\n<\/section>\n<section class=\"textbox tryIt\">\n<iframe loading=\"lazy\" id=\"ohm17696\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=17696&theme=lumen&iframe_resize_id=ohm17696&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><br \/>\n<\/section>\n<p><iframe loading=\"lazy\" src=\"https:\/\/lumen-learning.shinyapps.io\/fisherexact\/\" width=\"100%\" height=\"700\" frameborder=\"no\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><br \/>\n[<a href=\"https:\/\/lumen-learning.shinyapps.io\/fisherexact\/\" target=\"_blank\" rel=\"noopener\">Trouble viewing? Click to open in a new tab.<\/a>]<\/p>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm17697\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=17697&theme=lumen&iframe_resize_id=ohm17697&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n","protected":false},"author":8,"menu_order":36,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-1429","chapter","type-chapter","status-publish","hentry"],"part":1388,"module-header":"learn_it","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":11,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1429\/revisions"}],"predecessor-version":[{"id":7176,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1429\/revisions\/7176"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1388"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1429\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1429"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1429"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1429"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}