{"id":2684,"date":"2024-07-24T10:28:14","date_gmt":"2024-07-24T14:28:14","guid":{"rendered":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/?post_type=part&#038;p=2684"},"modified":"2024-07-25T23:05:38","modified_gmt":"2024-07-26T03:05:38","slug":"testing-for-differences-in-two-variables","status":"publish","type":"part","link":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/part\/testing-for-differences-in-two-variables\/","title":{"raw":"Hypothesis Testing for Two Population Proportions","rendered":"Hypothesis Testing for Two Population Proportions"},"content":{"raw":"In this section, we will step through how to perform a hypothesis tests to determine if there is a difference between two population proportions.\r\n<h2>Distribution Used<\/h2>\r\nWe will continued to use the Normal Distributions and z-scores.\r\n\r\n[caption id=\"attachment_1917\" align=\"alignnone\" width=\"881\"]<a href=\"https:\/\/www.wolframalpha.com\/input?i=normal+distributions\"><img class=\"wp-image-1917\" src=\"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions.jpg\" alt=\"Image with multiple bell shaped curves. Two of the curves have a population mean at zero and the standard deviation varies. The curve with the smaller standard deviation is less spread out and more concentrated around the middle. The curve with the mean at one is displaced to the right by one unit. It also has a larger standard deviation and is, therefore, more spread out.\" width=\"881\" height=\"338\" \/><\/a> Figure 59.1 Normal Distribution Cumulative Density Function Curves[\/caption]\r\n<h2>Assumptions<\/h2>\r\nIn order to be able to perform the analysis in this section, the following assumptions must hold true:\r\n<ul>\r\n \t<li>the samples are random and independent of one another<\/li>\r\n \t<li>the sample sizes and proportions from each group are large enough such that:\r\n<ul>\r\n \t<li>[latex]np &gt; 5[\/latex]<\/li>\r\n \t<li>[latex]n(1-p) &gt; 5[\/latex]<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\nNote: When the sample size and proportion are large enough, the discrete distribution approaches a normal\/bell shaped curve:\r\n\r\n[caption id=\"attachment_1682\" align=\"aligncenter\" width=\"688\"]<a href=\"https:\/\/www.wolframalpha.com\/input?i=binomial+distributions\"><img class=\"size-full wp-image-1682\" src=\"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs.jpg\" alt=\"Binomial Distribution Graphs for Different Values of p\" width=\"688\" height=\"238\" \/><\/a> Figure 59.2 Graphs for Different Values of p[\/caption]\r\n<h2>The Difference Between the Two Curves Above<\/h2>\r\nFor the left-most curve:\r\n<ul>\r\n \t<li>[latex]np = 50\\times 0.5 = 25 &gt; 5[\/latex]<\/li>\r\n \t<li>[latex]n(1-p) = 50 \\times (1-0.5) = 25 &gt; 5[\/latex]<\/li>\r\n \t<li>the curve closely resembles a bell-shaped curve<\/li>\r\n<\/ul>\r\nFor the right-most curve:\r\n<ul>\r\n \t<li>[latex]np = 50\\times 0.9 = 45 &gt; 5[\/latex]<\/li>\r\n \t<li>[latex]n(1-p) = 50 \\times (1-0.9) = 5 \\ngtr 5[\/latex]<\/li>\r\n \t<li>the curve is skewed left and therefore not bell-shaped<\/li>\r\n<\/ul>\r\n<strong>Note<\/strong>: The right-most curve is at the 'limit' of acceptable. If the value of [latex]n[\/latex] was slightly larger or the value of [latex]p[\/latex] slightly smaller (to increase the size of [latex]1-p[\/latex]), we could perform the analysis in this section on this data.","rendered":"<p>In this section, we will step through how to perform a hypothesis tests to determine if there is a difference between two population proportions.<\/p>\n<h2>Distribution Used<\/h2>\n<p>We will continued to use the Normal Distributions and z-scores.<\/p>\n<figure id=\"attachment_1917\" aria-describedby=\"caption-attachment-1917\" style=\"width: 881px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.wolframalpha.com\/input?i=normal+distributions\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1917\" src=\"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions.jpg\" alt=\"Image with multiple bell shaped curves. Two of the curves have a population mean at zero and the standard deviation varies. The curve with the smaller standard deviation is less spread out and more concentrated around the middle. The curve with the mean at one is displaced to the right by one unit. It also has a larger standard deviation and is, therefore, more spread out.\" width=\"881\" height=\"338\" srcset=\"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions.jpg 1388w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions-300x115.jpg 300w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions-1024x392.jpg 1024w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions-768x294.jpg 768w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions-65x25.jpg 65w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions-225x86.jpg 225w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2024\/02\/NormalDistributions-350x134.jpg 350w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/a><figcaption id=\"caption-attachment-1917\" class=\"wp-caption-text\">Figure 59.1 Normal Distribution Cumulative Density Function Curves<\/figcaption><\/figure>\n<h2>Assumptions<\/h2>\n<p>In order to be able to perform the analysis in this section, the following assumptions must hold true:<\/p>\n<ul>\n<li>the samples are random and independent of one another<\/li>\n<li>the sample sizes and proportions from each group are large enough such that:\n<ul>\n<li>[latex]np > 5[\/latex]<\/li>\n<li>[latex]n(1-p) > 5[\/latex]<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Note: When the sample size and proportion are large enough, the discrete distribution approaches a normal\/bell shaped curve:<\/p>\n<figure id=\"attachment_1682\" aria-describedby=\"caption-attachment-1682\" style=\"width: 688px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.wolframalpha.com\/input?i=binomial+distributions\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-1682\" src=\"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs.jpg\" alt=\"Binomial Distribution Graphs for Different Values of p\" width=\"688\" height=\"238\" srcset=\"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs.jpg 688w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs-300x104.jpg 300w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs-65x22.jpg 65w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs-225x78.jpg 225w, https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-content\/uploads\/sites\/2128\/2023\/12\/Binomial_Graphs-350x121.jpg 350w\" sizes=\"auto, (max-width: 688px) 100vw, 688px\" \/><\/a><figcaption id=\"caption-attachment-1682\" class=\"wp-caption-text\">Figure 59.2 Graphs for Different Values of p<\/figcaption><\/figure>\n<h2>The Difference Between the Two Curves Above<\/h2>\n<p>For the left-most curve:<\/p>\n<ul>\n<li>[latex]np = 50\\times 0.5 = 25 > 5[\/latex]<\/li>\n<li>[latex]n(1-p) = 50 \\times (1-0.5) = 25 > 5[\/latex]<\/li>\n<li>the curve closely resembles a bell-shaped curve<\/li>\n<\/ul>\n<p>For the right-most curve:<\/p>\n<ul>\n<li>[latex]np = 50\\times 0.9 = 45 > 5[\/latex]<\/li>\n<li>[latex]n(1-p) = 50 \\times (1-0.9) = 5 \\ngtr 5[\/latex]<\/li>\n<li>the curve is skewed left and therefore not bell-shaped<\/li>\n<\/ul>\n<p><strong>Note<\/strong>: The right-most curve is at the &#8216;limit&#8217; of acceptable. If the value of [latex]n[\/latex] was slightly larger or the value of [latex]p[\/latex] slightly smaller (to increase the size of [latex]1-p[\/latex]), we could perform the analysis in this section on this data.<\/p>\n","protected":false},"parent":0,"menu_order":13,"template":"","meta":{"pb_part_invisible":false,"pb_part_invisible_string":""},"contributor":[],"license":[],"class_list":["post-2684","part","type-part","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/pressbooks\/v2\/parts\/2684","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/pressbooks\/v2\/parts"}],"about":[{"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/wp\/v2\/types\/part"}],"version-history":[{"count":18,"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/pressbooks\/v2\/parts\/2684\/revisions"}],"predecessor-version":[{"id":2714,"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/pressbooks\/v2\/parts\/2684\/revisions\/2714"}],"wp:attachment":[{"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/wp\/v2\/media?parent=2684"}],"wp:term":[{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/wp\/v2\/contributor?post=2684"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/pressbooks.bccampus.ca\/1130sandbox\/wp-json\/wp\/v2\/license?post=2684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}