{"id":84,"date":"2021-01-12T22:19:42","date_gmt":"2021-01-12T22:19:42","guid":{"rendered":"https:\/\/textbooks.jaykesler.net\/introstats\/chapter\/comparing-two-independent-population-proportions\/"},"modified":"2023-08-04T18:15:21","modified_gmt":"2023-08-04T18:15:21","slug":"comparing-two-independent-population-proportions","status":"publish","type":"chapter","link":"https:\/\/textbooks.jaykesler.net\/introstats\/chapter\/comparing-two-independent-population-proportions\/","title":{"rendered":"Comparing Two Independent Population Proportions"},"content":{"raw":"<span style=\"display: none;\">\r\n[latexpage]\r\n<\/span>\r\n<div id=\"d154db56-29bb-487f-9bc7-4081c6733297\" class=\"chapter-content-module\" data-type=\"page\" data-cnxml-to-html-ver=\"2.1.0\">\r\n\r\nIn this chapter, we learn how to conduct a hypothesis test in order to compare two <strong>population proportions<\/strong>, which we refer to as $p_1$ and $p_2$. To conduct the hypothesis test, we calculate two <strong>sample proportions<\/strong>, which we refer to as $\\hat p_1$ and $\\hat p_2$. Each sample proportion is the result of underlying binomial trials. If the sample 1 has $x_1$ successes in $n_1$ trials, then the resulting sample proportion is $\\hat p_1=\\frac{x_1}{n_1}$. Similarly, $\\hat p_2=\\frac{x_2}{n_2}$ for $x_2$ successes in $n_2$ trials.\r\n<p id=\"fs-idp16810352\">When conducting a hypothesis test that compares two independent population proportions, the following characteristics should be present:<\/p>\r\n\r\n<ol id=\"element-381\">\r\n \t<li>The two independent samples are simple random samples that are independent.<\/li>\r\n \t<li>The number of successes is at least five, and the number of failures is at least five, for each of the samples.<\/li>\r\n \t<li>Growing literature states that the population must be at least ten or 20 times the size of the sample. This keeps each population from being over-sampled and causing incorrect results.<\/li>\r\n<\/ol>\r\n<p id=\"delete_me\">Comparing two proportions, like comparing two means, is common. If two estimated proportions are different, it may be due to a difference in the populations or it may be due to chance. A hypothesis test can help determine if a difference in the estimated proportions reflects a difference in the population proportions.<\/p>\r\n<p id=\"fs-idm58849136\">The difference of two proportions follows an approximate normal distribution. Generally, the null hypothesis states that the two proportions are the same. That is, <em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>1<\/sub><\/em> = <em data-effect=\"italics\">p<sub>2<\/sub><\/em>. To conduct the test, we use a pooled proportion, $\\bar p$.<\/p>\r\n\r\n<div id=\"element-845\" data-type=\"equation\">\r\n<div id=\"1\" data-type=\"title\"><strong>The pooled proportion is calculated as follows:<\/strong><\/div>\r\n<div data-type=\"title\">$$\\bar p = \\frac{x_1 + x_2}{n_1 + n_2}$$<\/div>\r\n<\/div>\r\n<div id=\"element-630\" data-type=\"equation\">\r\n<div id=\"2\" data-type=\"title\"><strong>The distribution for the differences is:<\/strong><\/div>\r\n<div data-type=\"title\">$$\\hat{p}_1 - \\hat{p}_2 \\sim N \\left( 0, \\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1 }+\\frac{\\bar p \\cdot \\bar q}{n_2 }} \\right)$$\r\nwhere $\\bar q = 1 - \\bar p$<\/div>\r\n<\/div>\r\n<div id=\"element-225\" data-type=\"equation\">\r\n<div id=\"3\" data-type=\"title\"><strong>The test statistic (<em data-effect=\"italics\">z<\/em>-score) is:<\/strong><\/div>\r\n<div data-type=\"title\">\r\n\r\n$$z=\\frac{(\\hat p_1 - \\hat p_2)-(p_1-p_2)}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1}+\\frac{\\bar p \\cdot \\bar q}{n_2}}}$$\r\n<div class=\"textbox\">Our null hypothesis in these situations will always be\r\n$H_0: p_1 = p_2$ which causes the expression $(p_1-p_2)$ to be equal to zero. Thus, a simplified version of the test statistic formula is:\r\n$$z=\\frac{\\hat p_1 - \\hat p_2}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1}+\\frac{\\bar p \\cdot \\bar q}{n_2}}}$$<\/div>\r\n<div><\/div>\r\n&nbsp;\r\n\r\n<\/div>\r\n<\/div>\r\n<div id=\"element-944\" class=\"ui-has-child-title\" data-type=\"example\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">9.8<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"body\">\r\n<div id=\"fs-idm214596080\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm72417744\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"element-410\">Two types of medication for hives are being tested to determine if there is a <strong>difference in the proportions of adult patient reactions. Twenty<\/strong> out of a random <strong>sample of 200<\/strong> adults given medication 1 still had hives 30 minutes after taking the medication. <strong>Twelve<\/strong> out of another <strong>random sample of 200 adults<\/strong> given medication 2 still had hives 30 minutes after taking the medication. Test at a 1% level of significance.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-idm163830832\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\r\n<div class=\"ui-toggle-wrapper\"><\/div>\r\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\r\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">9.8<\/span><\/h4>\r\n<div class=\"os-solution-container\">\r\n<p id=\"element-567\">The problem asks for a difference in proportions, making it a test of two proportions.<\/p>\r\n<p id=\"element-857\">Let <em data-effect=\"italics\">1<\/em> and <em data-effect=\"italics\">2<\/em> be the subscripts for medication 1 and medication 2, respectively. Then <em data-effect=\"italics\">p<sub>1<\/sub><\/em> and <em data-effect=\"italics\">p<sub>2<\/sub><\/em> are the desired population proportions.<\/p>\r\n\r\n<h4 data-type=\"title\">Random Variable:<\/h4>\r\n$\\hat p_1 - \\hat p_2 = $ difference in the proportions of adult patients who did not react after 30 minutes to medication 1 and to medication 2.\r\n<p id=\"element-791\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>1<\/sub><\/em> = <em data-effect=\"italics\">p<sub>2<\/sub><\/em><\/p>\r\n<p id=\"element-516\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>1<\/sub><\/em> \u2260 <em data-effect=\"italics\">p<sub>2<\/sub><\/em><\/p>\r\n<p id=\"element-799\">The words <strong>\"is a difference\"<\/strong> tell you the test is two-tailed.<\/p>\r\n<p id=\"element-610\"><strong>Distribution for the test:<\/strong><\/p>\r\nSince this is a test of two binomial population proportions, the distribution is normal:\r\n\r\n$\\bar p = \\frac{x_1 + x_2}{n_1+n_2}=\\frac{20+12}{200+200} = 0.08$, and $\\bar q = 1-\\bar p=1-0.08=0.92$\r\n\r\n$\\bar p_1 - \\bar p_2$ follows an approximate normal distribution.\r\n\r\n<strong>Calculate the sample proportions:<\/strong>\r\n\r\n$\\hat p_1=\\frac{x_1}{n_1} = \\frac{20}{200} = 0.1$\r\n\r\n$\\hat p_2 = \\frac{x_2}{n_2}=\\frac{12}{200}=0.06$\r\n\r\n<strong>Calculate the test statistic:<\/strong>\r\n\r\n$z=\\frac{\\hat p_1 - \\hat p_2}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1}+\\frac{\\bar p \\cdot \\bar q}{n_2}}}=\\frac{0.1-0.06}{\\sqrt{\\frac{(0.08)(0.92)}{200}+\\frac{(0.08)(0.92)}{200}}} =1.4744$\r\n<p id=\"element-961\"><strong>Calculate the <em data-effect=\"italics\">p<\/em>-value using the normal distribution:<\/strong><\/p>\r\n<em data-effect=\"italics\">p<\/em>-value = 0.1404 using Google Sheets\r\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\" default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"number\" dir=\"auto\">2<\/span><span class=\" default-formula-text-color\" dir=\"auto\">*<\/span><span class=\" default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">1<\/span><span class=\" default-formula-text-color\" dir=\"auto\">-<\/span><span class=\" default-formula-text-color\" dir=\"auto\">NORM.S.DIST<\/span><span class=\" default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">1.4744<\/span><span class=\" default-formula-text-color\" dir=\"auto\">)<\/span><span class=\" default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code>\r\n\r\nThe Sheets function starts with \"2*\" since this is a two tail test. We then have \"1-\" since we want the area to the <strong>right<\/strong> of a positive test statistic.\r\n<h4 data-type=\"title\">Graph:<\/h4>\r\n<div id=\"hyptest22_cmp_3_1\" class=\"os-figure\">\r\n<figure data-id=\"hyptest22_cmp_3_1\"><span id=\"id3811123\" data-type=\"media\" data-alt=\"Normal distribution curve of the difference in the percentages of adult patients who don't react to medication 1 and 2 after 30 minutes. The mean is equal to zero, and the values -0.04, 0, and 0.04 are labeled on the horizontal axis. Two vertical lines extend from -0.04 and 0.04 to the curve. The region to the left of -0.04 and the region to the right of 0.04 are each shaded to represent 1\/2(p-value) = 0.0702.\"><img class=\"alignnone size-medium wp-image-548\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189-300x128.jpg\" alt=\"Normal distribution curve of the difference in the percentages of adult patients who don't react to medication 1 and 2 after 30 minutes. The mean is equal to zero, and the values -0.04, 0, and 0.04 are labeled on the horizontal axis. Two vertical lines extend from -0.04 and 0.04 to the curve. The region to the left of -0.04 and the region to the right of 0.04 are each shaded to represent 1\/2(p-value) = 0.0702.\" width=\"300\" height=\"128\" \/><\/span><\/figure>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Figure <\/span><span class=\"os-number\">9.7<\/span><\/div>\r\n<\/div>\r\n<p id=\"element-748\">Compare <em data-effect=\"italics\">\u03b1<\/em> and the <em data-effect=\"italics\">p<\/em>-value: <em data-effect=\"italics\">\u03b1<\/em> = 0.01 and the <em data-effect=\"italics\">p<\/em>-value = 0.1404. <em data-effect=\"italics\">\u03b1<\/em> &lt; <em data-effect=\"italics\">p<\/em>-value.<\/p>\r\n<p id=\"element-439\">Make a decision: Since <em data-effect=\"italics\">\u03b1<\/em> &lt; <em data-effect=\"italics\">p<\/em>-value, do not reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>.<\/p>\r\n<p id=\"element-632\"><strong>Conclusion:<\/strong> At a 1% level of significance, from the sample data, there is not sufficient evidence to conclude that there is a difference in the proportions of adult patients who did not react after 30 minutes to medication <em data-effect=\"italics\">1<\/em> and medication <em data-effect=\"italics\">2<\/em>.<\/p>\r\n\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idp38726464\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">9.8<\/span><\/h3>\r\n<\/header><section>\r\n<div id=\"fs-idm6482160\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm135837088\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm99465232\">Two types of valves are being tested to determine if there is a difference in pressure tolerances. Fifteen out of a random sample of 100 of Valve <em data-effect=\"italics\">A<\/em> cracked under 4,500 psi. Six out of a random sample of 100 of Valve <em data-effect=\"italics\">B<\/em> cracked under 4,500 psi. Test at a 5% level of significance.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idp34418816\" class=\"ui-has-child-title\" data-type=\"example\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">9.9<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"body\">\r\n<div id=\"fs-idm5388112\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm139653568\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm29484272\">A research study was conducted about gender differences in \u201csexting.\u201d The researcher believed that the proportion of girls involved in \u201csexting\u201d is less than the proportion of boys involved. The data collected in the spring of 2010 among a random sample of middle and high school students in a large school district in the southern United States is summarized in <a class=\"autogenerated-content\" href=\"#fs-idm29483888\">Table 9.10<\/a>. Is the proportion of girls sending sexts less than the proportion of boys \u201csexting?\u201d Test at a 1% level of significance.<\/p>\r\n\r\n<div id=\"fs-idm29483888\" class=\"os-table \">\r\n<table summary=\"Table 9.10 \" data-id=\"fs-idm29483888\">\r\n<thead>\r\n<tr>\r\n<th scope=\"col\"><\/th>\r\n<th scope=\"col\">Males<\/th>\r\n<th scope=\"col\">Females<\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<td>Sent \u201csexts\u201d<\/td>\r\n<td>183<\/td>\r\n<td>156<\/td>\r\n<\/tr>\r\n<tr>\r\n<td>Total number surveyed<\/td>\r\n<td>2231<\/td>\r\n<td>2169<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">9.10<\/span><\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-idm119696944\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\r\n<div class=\"ui-toggle-wrapper\"><\/div>\r\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\r\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">9.9<\/span><\/h4>\r\n<div class=\"os-solution-container\">\r\n<p id=\"fs-idm140706224\">This is a test of two population proportions. Let M and F be the subscripts for males and females. Then <em data-effect=\"italics\">p<sub>M<\/sub><\/em> and <em data-effect=\"italics\">p<sub>F<\/sub><\/em> are the desired population proportions.<\/p>\r\n\r\n<h4 data-type=\"title\">Random variable:<\/h4>\r\n$\\hat p_F - \\hat p_M$ = difference in the proportions of males and females who sent \u201csexts.\u201d\r\n\r\nWe could use <em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> - <em data-effect=\"italics\">p<sub>M<\/sub> =<\/em> 0 and <em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> - <em data-effect=\"italics\">p<sub>M<\/sub><\/em><em data-effect=\"italics\">&lt; 0 <\/em>but prefer:\r\n\r\n<em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> = <em data-effect=\"italics\">p<sub>M<\/sub><\/em>\r\n<p id=\"fs-idp67543312\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> &lt; <em data-effect=\"italics\">p<sub>M<\/sub><\/em><\/p>\r\n<p id=\"fs-idp120133328\">The words <strong>\"less than\"<\/strong> tell you the test is left-tailed.<\/p>\r\n<p id=\"fs-idp27327440\"><strong>Distribution for the test:<\/strong> Since this is a test of two population proportions, the distribution is normal:<\/p>\r\n<strong>Calculate the sample proportions:<\/strong>\r\n\r\n$\\hat p_F=\\frac{x_F}{n_F} = \\frac{156}{2169} = 0.0719$\r\n\r\n$\\hat p_M = \\frac{x_M}{n_M}=\\frac{183}{2231}=0.082$\r\n\r\n<strong>Calculate the test statistic:<\/strong>\r\n\r\nFirst we need to calculate the pooled proportion.\r\n\r\n$\\bar p = \\frac{x_F+x_M}{n_F+n_M} = \\frac{156+183}{2169+2231} = 0.077$\r\n\r\nThen $\\bar q = 1-\\bar p = 1-0.077 = 0.923$\r\n\r\nNow we can calculate the test statistic.\r\n\r\n$z=\\frac{\\hat p_F - \\hat p_M}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_F}+\\frac{\\bar p \\cdot \\bar q}{n_M}}}=\\frac{0.0719-0.082}{\\sqrt{\\frac{(0.077)(0.923)}{2169}+\\frac{(0.077)(0.923)}{2231}}} =-1.26$\r\n<p id=\"fs-idm37724704\"><strong>Calculate the <em data-effect=\"italics\">p<\/em>-value using the normal distribution:<\/strong>\r\n<span data-type=\"newline\">\r\n<\/span><em data-effect=\"italics\">p<\/em>-value = 0.1038 using Google Sheets<\/p>\r\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\" default-formula-text-color\" dir=\"auto\">=<\/span><span class=\" default-formula-text-color\" dir=\"auto\">NORM.S.DIST<\/span><span class=\" default-formula-text-color\" dir=\"auto\">(<\/span><span class=\" default-formula-text-color\" dir=\"auto\">-<\/span><span class=\"number\" dir=\"auto\">1.26<\/span><span class=\" default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code>\r\n\r\nIn example 9.8, we subtracted from one because the test statistic was positive, so we needed the area to the right (into the right tail)<code><\/code>. Here we need the area to the left, so we do not subtract from one.\r\n\r\nAlso in example 9.8, we had a two tail test, so we multiplied our area by two. Here we have a one tail test, so we do not multiply by two.\r\n<p id=\"fs-idm29799616\"><strong>Decision:<\/strong> Since <em data-effect=\"italics\">\u03b1<\/em> &lt; <em data-effect=\"italics\">p<\/em>-value, Do not reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em><\/p>\r\n<p id=\"fs-idp51077664\"><strong>Conclusion:<\/strong> At the 1% level of significance, from the sample data, there is not sufficient evidence to conclude that the proportion of girls sending \u201csexts\u201d is less than the proportion of boys sending \u201csexts.\u201d<\/p>\r\n\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idp9035712\" class=\"ui-has-child-title\" data-type=\"example\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">9.10<\/span><\/h3>\r\n<\/header><section>\r\n<div class=\"body\">\r\n<div id=\"fs-idm70907200\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm90651728\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idp52326208\">Researchers conducted a study of smartphone use among adults. 1 cell phone company claimed that iPhone smartphones are more popular with younger (under 30) Americans than with older Americans. The results of the survey indicate that of the 232 older American cell phone owners randomly sampled, 5% have an iPhone. Of the 1,343 younger cell phone owners randomly sampled, 10% own an iPhone. Test at the 5% level of significance. Is the proportion of younger iPhone owners greater than the proportion of older American iPhone owners?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<div id=\"fs-idm244330848\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\r\n<div class=\"ui-toggle-wrapper\"><\/div>\r\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\r\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">9.10<\/span><\/h4>\r\n<div class=\"os-solution-container\">\r\n<p id=\"fs-idp4139616\">This is a test of two population proportions. Let Y and N be the subscripts for the Younger and Older Americans. (We are using N instead of O for our older subscript to avoid any confusion with the subscript zero on the null hypothesis; perhaps N stands for \"Not Younger\"). Then <em data-effect=\"italics\">p<sub>Y<\/sub><\/em> and <em data-effect=\"italics\">p<sub>N<\/sub><\/em> are the desired population proportions.<\/p>\r\n\r\n<h4 data-type=\"title\">Random variable:<\/h4>\r\n$\\hat p_Y - \\hat p_N$ = difference in the proportions of Android and iPhone users.\r\n<p id=\"fs-idp129126752\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>Y<\/sub><\/em> = <em data-effect=\"italics\">p<sub>N<\/sub><\/em><\/p>\r\n<p id=\"fs-idm200846096\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>Y<\/sub><\/em> &gt; <em data-effect=\"italics\">p<sub>N<\/sub><\/em><\/p>\r\n<p id=\"fs-idm11108992\">The words \"more popular\" indicate that the test is right-tailed.<\/p>\r\n<p id=\"fs-idp137504160\">Distribution for the test: The distribution is approximately normal:<\/p>\r\nTherefore,\r\n\r\nfollows an approximate normal distribution.\r\n\r\n<strong>Calculate the sample proportions:<\/strong>\r\n\r\nIn this example, we are given a percentage of people who own cell phones, rather than the exact number. This percentage given is the $\\hat p$ for each sample. We can get the $x$ value by multiplying $\\hat p \\cdot n$ for each sample.\r\n\r\n$\\hat p_Y=0.10$ so $x_Y = 0.10(1343) = 134$\r\n\r\n$\\hat p_N = 0.05$ so $x_N=0.05(232) = 12$\r\n\r\n<strong>Calculate the test statistic:<\/strong>\r\n\r\nFirst we need to calculate the pooled proportion.\r\n\r\n$\\bar p = \\frac{x_Y+x_N}{n_Y+n_N} = \\frac{134+12}{1343+232} = 0.0927$\r\n\r\nThen $\\bar q = 1-\\bar p = 1-0.0927 = 0.9073$\r\n\r\nNow we can calculate the test statistic.\r\n\r\n$z=\\frac{\\hat p_Y - \\hat p_N}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_Y}+\\frac{\\bar p \\cdot \\bar q}{n_N}}}=\\frac{0.10-0.05}{\\sqrt{\\frac{(0.0927)(0.9073)}{1343}+\\frac{(0.0927)(0.9073)}{232}}} =2.42$\r\n<h4 data-type=\"title\">Calculate the <em data-effect=\"italics\">p<\/em>-value using the normal distribution:<\/h4>\r\n<span data-type=\"newline\">\r\n<\/span><em data-effect=\"italics\">p<\/em>-value = 0.0077<span data-type=\"newline\"> using Google Sheets\r\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\" default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"number\" dir=\"auto\">1<\/span><span class=\" default-formula-text-color\" dir=\"auto\">-<\/span><span class=\" default-formula-text-color\" dir=\"auto\">NORM.S.DIST<\/span><span class=\" default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">2.42<\/span><span class=\" default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code><\/span>\r\n\r\n<span data-type=\"newline\">We subtract from one because we have a positive test statistic, so we want the area into the right tail.<\/span><!-- LALALA &#9834;&#9835;&#9834;&#9835; CONTINUE INSERTING NEW EXAMPLE 3 HERE -->\r\n<p id=\"fs-idp26516352\"><strong>Graph:<\/strong><\/p>\r\n\r\n<div id=\"id12575638\" class=\"os-figure\">\r\n<figure data-id=\"id12575638\"><span id=\"id12575642\" data-type=\"media\" data-alt=\"This is a normal distribution curve with mean equal to zero. 1 vertical line near the tail of the curve to the right of zero extends from the axis to the curve. The region under the curve to the right of the line is shaded representing p-value = 0.00004.\"><img class=\"alignnone size-medium wp-image-549\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181-300x109.jpg\" alt=\"This is a normal distribution curve with mean equal to zero. 1 vertical line near the tail of the curve to the right of zero extends from the axis to the curve. The region under the curve to the right of the line is shaded representing p-value = 0.0077\" width=\"300\" height=\"109\" \/><\/span><\/figure>\r\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Figure <\/span><span class=\"os-number\">9.9<\/span><\/div>\r\n<\/div>\r\n<p id=\"fs-idm17894912\"><strong>Decision:<\/strong> Since <em data-effect=\"italics\">\u03b1<\/em> &gt; <em data-effect=\"italics\">p<\/em>-value, reject the <em data-effect=\"italics\">H<sub>0<\/sub><\/em>.<\/p>\r\n<p id=\"fs-idp74257664\"><strong>Conclusion:<\/strong> At the 5% level of significance, from the sample data, there is sufficient evidence to conclude that a larger proportion of younger cell phone owners use iPhones than older Americans.<\/p>\r\n\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idp142829376\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\"><header>\r\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">9.10<\/span><\/h3>\r\n<\/header><section>\r\n<p id=\"fs-idp32122976\">A concerned group of citizens wanted to know if the proportion of forcible rapes in Texas was different in 2011 than in 2010. Their research showed that of the 113,231 violent crimes in Texas in 2010, 7,622 of them were forcible rapes. In 2011, 7,439 of the 104,873 violent crimes were in the forcible rape category. Test at a 5% significance level. Answer the following questions:<span data-type=\"newline\">\r\n<\/span><\/p>\r\n\r\n<div id=\"fs-idm127205008\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm286855008\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm65044288\">a. Is this a test of two means or two proportions?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm45452624\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm212581120\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm11093104\">b. Which distribution do you use to perform the test?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm13955600\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm176424272\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idp13677968\">c. What is the random variable?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm6924128\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm152098288\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idp5734352\">d. What are the null and alternative hypothesis? Write the null and alternative hypothesis in symbols.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm131708672\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm129757040\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm32329328\">e. Is this test right-, left-, or two-tailed?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm51666240\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm109483616\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm36523264\">f. What is the <em data-effect=\"italics\">p<\/em>-value?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm58266784\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm17415680\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm11091776\">g. Do you reject or not reject the null hypothesis?<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<div id=\"fs-idm46567952\" class=\" unnumbered\" data-type=\"exercise\"><header><\/header><section>\r\n<div id=\"fs-idm149856720\" data-type=\"problem\">\r\n<div class=\"os-problem-container \">\r\n<p id=\"fs-idm37627040\">h. At the ___ level of significance, from the sample data, there ______ (is\/is not) sufficient evidence to conclude that ____________.<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n<\/section><\/div>\r\n<\/section><\/div>\r\n<\/div>","rendered":"<p><span style=\"display: none;\"><br \/>\n[latexpage]<br \/>\n<\/span><\/p>\n<div id=\"d154db56-29bb-487f-9bc7-4081c6733297\" class=\"chapter-content-module\" data-type=\"page\" data-cnxml-to-html-ver=\"2.1.0\">\n<p>In this chapter, we learn how to conduct a hypothesis test in order to compare two <strong>population proportions<\/strong>, which we refer to as $p_1$ and $p_2$. To conduct the hypothesis test, we calculate two <strong>sample proportions<\/strong>, which we refer to as $\\hat p_1$ and $\\hat p_2$. Each sample proportion is the result of underlying binomial trials. If the sample 1 has $x_1$ successes in $n_1$ trials, then the resulting sample proportion is $\\hat p_1=\\frac{x_1}{n_1}$. Similarly, $\\hat p_2=\\frac{x_2}{n_2}$ for $x_2$ successes in $n_2$ trials.<\/p>\n<p id=\"fs-idp16810352\">When conducting a hypothesis test that compares two independent population proportions, the following characteristics should be present:<\/p>\n<ol id=\"element-381\">\n<li>The two independent samples are simple random samples that are independent.<\/li>\n<li>The number of successes is at least five, and the number of failures is at least five, for each of the samples.<\/li>\n<li>Growing literature states that the population must be at least ten or 20 times the size of the sample. This keeps each population from being over-sampled and causing incorrect results.<\/li>\n<\/ol>\n<p id=\"delete_me\">Comparing two proportions, like comparing two means, is common. If two estimated proportions are different, it may be due to a difference in the populations or it may be due to chance. A hypothesis test can help determine if a difference in the estimated proportions reflects a difference in the population proportions.<\/p>\n<p id=\"fs-idm58849136\">The difference of two proportions follows an approximate normal distribution. Generally, the null hypothesis states that the two proportions are the same. That is, <em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>1<\/sub><\/em> = <em data-effect=\"italics\">p<sub>2<\/sub><\/em>. To conduct the test, we use a pooled proportion, $\\bar p$.<\/p>\n<div id=\"element-845\" data-type=\"equation\">\n<div id=\"1\" data-type=\"title\"><strong>The pooled proportion is calculated as follows:<\/strong><\/div>\n<div data-type=\"title\">$$\\bar p = \\frac{x_1 + x_2}{n_1 + n_2}$$<\/div>\n<\/div>\n<div id=\"element-630\" data-type=\"equation\">\n<div id=\"2\" data-type=\"title\"><strong>The distribution for the differences is:<\/strong><\/div>\n<div data-type=\"title\">$$\\hat{p}_1 &#8211; \\hat{p}_2 \\sim N \\left( 0, \\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1 }+\\frac{\\bar p \\cdot \\bar q}{n_2 }} \\right)$$<br \/>\nwhere $\\bar q = 1 &#8211; \\bar p$<\/div>\n<\/div>\n<div id=\"element-225\" data-type=\"equation\">\n<div id=\"3\" data-type=\"title\"><strong>The test statistic (<em data-effect=\"italics\">z<\/em>-score) is:<\/strong><\/div>\n<div data-type=\"title\">\n<p>$$z=\\frac{(\\hat p_1 &#8211; \\hat p_2)-(p_1-p_2)}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1}+\\frac{\\bar p \\cdot \\bar q}{n_2}}}$$<\/p>\n<div class=\"textbox\">Our null hypothesis in these situations will always be<br \/>\n$H_0: p_1 = p_2$ which causes the expression $(p_1-p_2)$ to be equal to zero. Thus, a simplified version of the test statistic formula is:<br \/>\n$$z=\\frac{\\hat p_1 &#8211; \\hat p_2}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1}+\\frac{\\bar p \\cdot \\bar q}{n_2}}}$$<\/div>\n<div><\/div>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n<div id=\"element-944\" class=\"ui-has-child-title\" data-type=\"example\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">9.8<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"body\">\n<div id=\"fs-idm214596080\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm72417744\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"element-410\">Two types of medication for hives are being tested to determine if there is a <strong>difference in the proportions of adult patient reactions. Twenty<\/strong> out of a random <strong>sample of 200<\/strong> adults given medication 1 still had hives 30 minutes after taking the medication. <strong>Twelve<\/strong> out of another <strong>random sample of 200 adults<\/strong> given medication 2 still had hives 30 minutes after taking the medication. Test at a 1% level of significance.<\/p>\n<\/div>\n<\/div>\n<div id=\"fs-idm163830832\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\n<div class=\"ui-toggle-wrapper\"><\/div>\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">9.8<\/span><\/h4>\n<div class=\"os-solution-container\">\n<p id=\"element-567\">The problem asks for a difference in proportions, making it a test of two proportions.<\/p>\n<p id=\"element-857\">Let <em data-effect=\"italics\">1<\/em> and <em data-effect=\"italics\">2<\/em> be the subscripts for medication 1 and medication 2, respectively. Then <em data-effect=\"italics\">p<sub>1<\/sub><\/em> and <em data-effect=\"italics\">p<sub>2<\/sub><\/em> are the desired population proportions.<\/p>\n<h4 data-type=\"title\">Random Variable:<\/h4>\n<p>$\\hat p_1 &#8211; \\hat p_2 = $ difference in the proportions of adult patients who did not react after 30 minutes to medication 1 and to medication 2.<\/p>\n<p id=\"element-791\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>1<\/sub><\/em> = <em data-effect=\"italics\">p<sub>2<\/sub><\/em><\/p>\n<p id=\"element-516\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>1<\/sub><\/em> \u2260 <em data-effect=\"italics\">p<sub>2<\/sub><\/em><\/p>\n<p id=\"element-799\">The words <strong>&#8220;is a difference&#8221;<\/strong> tell you the test is two-tailed.<\/p>\n<p id=\"element-610\"><strong>Distribution for the test:<\/strong><\/p>\n<p>Since this is a test of two binomial population proportions, the distribution is normal:<\/p>\n<p>$\\bar p = \\frac{x_1 + x_2}{n_1+n_2}=\\frac{20+12}{200+200} = 0.08$, and $\\bar q = 1-\\bar p=1-0.08=0.92$<\/p>\n<p>$\\bar p_1 &#8211; \\bar p_2$ follows an approximate normal distribution.<\/p>\n<p><strong>Calculate the sample proportions:<\/strong><\/p>\n<p>$\\hat p_1=\\frac{x_1}{n_1} = \\frac{20}{200} = 0.1$<\/p>\n<p>$\\hat p_2 = \\frac{x_2}{n_2}=\\frac{12}{200}=0.06$<\/p>\n<p><strong>Calculate the test statistic:<\/strong><\/p>\n<p>$z=\\frac{\\hat p_1 &#8211; \\hat p_2}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_1}+\\frac{\\bar p \\cdot \\bar q}{n_2}}}=\\frac{0.1-0.06}{\\sqrt{\\frac{(0.08)(0.92)}{200}+\\frac{(0.08)(0.92)}{200}}} =1.4744$<\/p>\n<p id=\"element-961\"><strong>Calculate the <em data-effect=\"italics\">p<\/em>-value using the normal distribution:<\/strong><\/p>\n<p><em data-effect=\"italics\">p<\/em>-value = 0.1404 using Google Sheets<br \/>\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\"default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"number\" dir=\"auto\">2<\/span><span class=\"default-formula-text-color\" dir=\"auto\">*<\/span><span class=\"default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">1<\/span><span class=\"default-formula-text-color\" dir=\"auto\">-<\/span><span class=\"default-formula-text-color\" dir=\"auto\">NORM.S.DIST<\/span><span class=\"default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">1.4744<\/span><span class=\"default-formula-text-color\" dir=\"auto\">)<\/span><span class=\"default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code><\/p>\n<p>The Sheets function starts with &#8220;2*&#8221; since this is a two tail test. We then have &#8220;1-&#8221; since we want the area to the <strong>right<\/strong> of a positive test statistic.<\/p>\n<h4 data-type=\"title\">Graph:<\/h4>\n<div id=\"hyptest22_cmp_3_1\" class=\"os-figure\">\n<figure data-id=\"hyptest22_cmp_3_1\"><span id=\"id3811123\" data-type=\"media\" data-alt=\"Normal distribution curve of the difference in the percentages of adult patients who don't react to medication 1 and 2 after 30 minutes. The mean is equal to zero, and the values -0.04, 0, and 0.04 are labeled on the horizontal axis. Two vertical lines extend from -0.04 and 0.04 to the curve. The region to the left of -0.04 and the region to the right of 0.04 are each shaded to represent 1\/2(p-value) = 0.0702.\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-548\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189-300x128.jpg\" alt=\"Normal distribution curve of the difference in the percentages of adult patients who don't react to medication 1 and 2 after 30 minutes. The mean is equal to zero, and the values -0.04, 0, and 0.04 are labeled on the horizontal axis. Two vertical lines extend from -0.04 and 0.04 to the curve. The region to the left of -0.04 and the region to the right of 0.04 are each shaded to represent 1\/2(p-value) = 0.0702.\" width=\"300\" height=\"128\" srcset=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189-300x128.jpg 300w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189-65x28.jpg 65w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189-225x96.jpg 225w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189-350x149.jpg 350w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/106ae11152dc4f03a57f82ac65c12cee48f8c189.jpg 487w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/span><\/figure>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Figure <\/span><span class=\"os-number\">9.7<\/span><\/div>\n<\/div>\n<p id=\"element-748\">Compare <em data-effect=\"italics\">\u03b1<\/em> and the <em data-effect=\"italics\">p<\/em>-value: <em data-effect=\"italics\">\u03b1<\/em> = 0.01 and the <em data-effect=\"italics\">p<\/em>-value = 0.1404. <em data-effect=\"italics\">\u03b1<\/em> &lt; <em data-effect=\"italics\">p<\/em>-value.<\/p>\n<p id=\"element-439\">Make a decision: Since <em data-effect=\"italics\">\u03b1<\/em> &lt; <em data-effect=\"italics\">p<\/em>-value, do not reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em>.<\/p>\n<p id=\"element-632\"><strong>Conclusion:<\/strong> At a 1% level of significance, from the sample data, there is not sufficient evidence to conclude that there is a difference in the proportions of adult patients who did not react after 30 minutes to medication <em data-effect=\"italics\">1<\/em> and medication <em data-effect=\"italics\">2<\/em>.<\/p>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idp38726464\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">9.8<\/span><\/h3>\n<\/header>\n<section>\n<div id=\"fs-idm6482160\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm135837088\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm99465232\">Two types of valves are being tested to determine if there is a difference in pressure tolerances. Fifteen out of a random sample of 100 of Valve <em data-effect=\"italics\">A<\/em> cracked under 4,500 psi. Six out of a random sample of 100 of Valve <em data-effect=\"italics\">B<\/em> cracked under 4,500 psi. Test at a 5% level of significance.<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idp34418816\" class=\"ui-has-child-title\" data-type=\"example\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">9.9<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"body\">\n<div id=\"fs-idm5388112\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm139653568\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm29484272\">A research study was conducted about gender differences in \u201csexting.\u201d The researcher believed that the proportion of girls involved in \u201csexting\u201d is less than the proportion of boys involved. The data collected in the spring of 2010 among a random sample of middle and high school students in a large school district in the southern United States is summarized in <a class=\"autogenerated-content\" href=\"#fs-idm29483888\">Table 9.10<\/a>. Is the proportion of girls sending sexts less than the proportion of boys \u201csexting?\u201d Test at a 1% level of significance.<\/p>\n<div id=\"fs-idm29483888\" class=\"os-table\">\n<table summary=\"Table 9.10\" data-id=\"fs-idm29483888\">\n<thead>\n<tr>\n<th scope=\"col\"><\/th>\n<th scope=\"col\">Males<\/th>\n<th scope=\"col\">Females<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Sent \u201csexts\u201d<\/td>\n<td>183<\/td>\n<td>156<\/td>\n<\/tr>\n<tr>\n<td>Total number surveyed<\/td>\n<td>2231<\/td>\n<td>2169<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Table <\/span><span class=\"os-number\">9.10<\/span><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"fs-idm119696944\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\n<div class=\"ui-toggle-wrapper\"><\/div>\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">9.9<\/span><\/h4>\n<div class=\"os-solution-container\">\n<p id=\"fs-idm140706224\">This is a test of two population proportions. Let M and F be the subscripts for males and females. Then <em data-effect=\"italics\">p<sub>M<\/sub><\/em> and <em data-effect=\"italics\">p<sub>F<\/sub><\/em> are the desired population proportions.<\/p>\n<h4 data-type=\"title\">Random variable:<\/h4>\n<p>$\\hat p_F &#8211; \\hat p_M$ = difference in the proportions of males and females who sent \u201csexts.\u201d<\/p>\n<p>We could use <em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> &#8211; <em data-effect=\"italics\">p<sub>M<\/sub> =<\/em> 0 and <em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> &#8211; <em data-effect=\"italics\">p<sub>M<\/sub><\/em><em data-effect=\"italics\">&lt; 0 <\/em>but prefer:<\/p>\n<p><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> = <em data-effect=\"italics\">p<sub>M<\/sub><\/em><\/p>\n<p id=\"fs-idp67543312\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>F<\/sub><\/em> &lt; <em data-effect=\"italics\">p<sub>M<\/sub><\/em><\/p>\n<p id=\"fs-idp120133328\">The words <strong>&#8220;less than&#8221;<\/strong> tell you the test is left-tailed.<\/p>\n<p id=\"fs-idp27327440\"><strong>Distribution for the test:<\/strong> Since this is a test of two population proportions, the distribution is normal:<\/p>\n<p><strong>Calculate the sample proportions:<\/strong><\/p>\n<p>$\\hat p_F=\\frac{x_F}{n_F} = \\frac{156}{2169} = 0.0719$<\/p>\n<p>$\\hat p_M = \\frac{x_M}{n_M}=\\frac{183}{2231}=0.082$<\/p>\n<p><strong>Calculate the test statistic:<\/strong><\/p>\n<p>First we need to calculate the pooled proportion.<\/p>\n<p>$\\bar p = \\frac{x_F+x_M}{n_F+n_M} = \\frac{156+183}{2169+2231} = 0.077$<\/p>\n<p>Then $\\bar q = 1-\\bar p = 1-0.077 = 0.923$<\/p>\n<p>Now we can calculate the test statistic.<\/p>\n<p>$z=\\frac{\\hat p_F &#8211; \\hat p_M}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_F}+\\frac{\\bar p \\cdot \\bar q}{n_M}}}=\\frac{0.0719-0.082}{\\sqrt{\\frac{(0.077)(0.923)}{2169}+\\frac{(0.077)(0.923)}{2231}}} =-1.26$<\/p>\n<p id=\"fs-idm37724704\"><strong>Calculate the <em data-effect=\"italics\">p<\/em>-value using the normal distribution:<\/strong><br \/>\n<span data-type=\"newline\"><br \/>\n<\/span><em data-effect=\"italics\">p<\/em>-value = 0.1038 using Google Sheets<\/p>\n<p><code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\"default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"default-formula-text-color\" dir=\"auto\">NORM.S.DIST<\/span><span class=\"default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"default-formula-text-color\" dir=\"auto\">-<\/span><span class=\"number\" dir=\"auto\">1.26<\/span><span class=\"default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code><\/p>\n<p>In example 9.8, we subtracted from one because the test statistic was positive, so we needed the area to the right (into the right tail)<code><\/code>. Here we need the area to the left, so we do not subtract from one.<\/p>\n<p>Also in example 9.8, we had a two tail test, so we multiplied our area by two. Here we have a one tail test, so we do not multiply by two.<\/p>\n<p id=\"fs-idm29799616\"><strong>Decision:<\/strong> Since <em data-effect=\"italics\">\u03b1<\/em> &lt; <em data-effect=\"italics\">p<\/em>-value, Do not reject <em data-effect=\"italics\">H<sub>0<\/sub><\/em><\/p>\n<p id=\"fs-idp51077664\"><strong>Conclusion:<\/strong> At the 1% level of significance, from the sample data, there is not sufficient evidence to conclude that the proportion of girls sending \u201csexts\u201d is less than the proportion of boys sending \u201csexts.\u201d<\/p>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idp9035712\" class=\"ui-has-child-title\" data-type=\"example\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Example <\/span><span class=\"os-number\">9.10<\/span><\/h3>\n<\/header>\n<section>\n<div class=\"body\">\n<div id=\"fs-idm70907200\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm90651728\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idp52326208\">Researchers conducted a study of smartphone use among adults. 1 cell phone company claimed that iPhone smartphones are more popular with younger (under 30) Americans than with older Americans. The results of the survey indicate that of the 232 older American cell phone owners randomly sampled, 5% have an iPhone. Of the 1,343 younger cell phone owners randomly sampled, 10% own an iPhone. Test at the 5% level of significance. Is the proportion of younger iPhone owners greater than the proportion of older American iPhone owners?<\/p>\n<\/div>\n<\/div>\n<div id=\"fs-idm244330848\" data-type=\"solution\" aria-label=\"show solution\" aria-expanded=\"false\">\n<div class=\"ui-toggle-wrapper\"><\/div>\n<section class=\"ui-body\" style=\"display: block; overflow: hidden;\" role=\"alert\">\n<h4 data-type=\"solution-title\"><span class=\"os-title-label\">Solution <\/span><span class=\"os-number\">9.10<\/span><\/h4>\n<div class=\"os-solution-container\">\n<p id=\"fs-idp4139616\">This is a test of two population proportions. Let Y and N be the subscripts for the Younger and Older Americans. (We are using N instead of O for our older subscript to avoid any confusion with the subscript zero on the null hypothesis; perhaps N stands for &#8220;Not Younger&#8221;). Then <em data-effect=\"italics\">p<sub>Y<\/sub><\/em> and <em data-effect=\"italics\">p<sub>N<\/sub><\/em> are the desired population proportions.<\/p>\n<h4 data-type=\"title\">Random variable:<\/h4>\n<p>$\\hat p_Y &#8211; \\hat p_N$ = difference in the proportions of Android and iPhone users.<\/p>\n<p id=\"fs-idp129126752\"><em data-effect=\"italics\">H<sub>0<\/sub><\/em>: <em data-effect=\"italics\">p<sub>Y<\/sub><\/em> = <em data-effect=\"italics\">p<sub>N<\/sub><\/em><\/p>\n<p id=\"fs-idm200846096\"><em data-effect=\"italics\">H<sub>1<\/sub><\/em>: <em data-effect=\"italics\">p<sub>Y<\/sub><\/em> &gt; <em data-effect=\"italics\">p<sub>N<\/sub><\/em><\/p>\n<p id=\"fs-idm11108992\">The words &#8220;more popular&#8221; indicate that the test is right-tailed.<\/p>\n<p id=\"fs-idp137504160\">Distribution for the test: The distribution is approximately normal:<\/p>\n<p>Therefore,<\/p>\n<p>follows an approximate normal distribution.<\/p>\n<p><strong>Calculate the sample proportions:<\/strong><\/p>\n<p>In this example, we are given a percentage of people who own cell phones, rather than the exact number. This percentage given is the $\\hat p$ for each sample. We can get the $x$ value by multiplying $\\hat p \\cdot n$ for each sample.<\/p>\n<p>$\\hat p_Y=0.10$ so $x_Y = 0.10(1343) = 134$<\/p>\n<p>$\\hat p_N = 0.05$ so $x_N=0.05(232) = 12$<\/p>\n<p><strong>Calculate the test statistic:<\/strong><\/p>\n<p>First we need to calculate the pooled proportion.<\/p>\n<p>$\\bar p = \\frac{x_Y+x_N}{n_Y+n_N} = \\frac{134+12}{1343+232} = 0.0927$<\/p>\n<p>Then $\\bar q = 1-\\bar p = 1-0.0927 = 0.9073$<\/p>\n<p>Now we can calculate the test statistic.<\/p>\n<p>$z=\\frac{\\hat p_Y &#8211; \\hat p_N}{\\sqrt{\\frac{\\bar p \\cdot \\bar q}{n_Y}+\\frac{\\bar p \\cdot \\bar q}{n_N}}}=\\frac{0.10-0.05}{\\sqrt{\\frac{(0.0927)(0.9073)}{1343}+\\frac{(0.0927)(0.9073)}{232}}} =2.42$<\/p>\n<h4 data-type=\"title\">Calculate the <em data-effect=\"italics\">p<\/em>-value using the normal distribution:<\/h4>\n<p><span data-type=\"newline\"><br \/>\n<\/span><em data-effect=\"italics\">p<\/em>-value = 0.0077<span data-type=\"newline\"> using Google Sheets<br \/>\n<code><bdo dir=\"ltr\"><span class=\"formula-content\"><span class=\"default-formula-text-color\" dir=\"auto\">=<\/span><span class=\"number\" dir=\"auto\">1<\/span><span class=\"default-formula-text-color\" dir=\"auto\">-<\/span><span class=\"default-formula-text-color\" dir=\"auto\">NORM.S.DIST<\/span><span class=\"default-formula-text-color\" dir=\"auto\">(<\/span><span class=\"number\" dir=\"auto\">2.42<\/span><span class=\"default-formula-text-color\" dir=\"auto\">)<\/span><\/span><\/bdo><\/code><\/span><\/p>\n<p><span data-type=\"newline\">We subtract from one because we have a positive test statistic, so we want the area into the right tail.<\/span><!-- LALALA &#9834;&#9835;&#9834;&#9835; CONTINUE INSERTING NEW EXAMPLE 3 HERE --><\/p>\n<p id=\"fs-idp26516352\"><strong>Graph:<\/strong><\/p>\n<div id=\"id12575638\" class=\"os-figure\">\n<figure data-id=\"id12575638\"><span id=\"id12575642\" data-type=\"media\" data-alt=\"This is a normal distribution curve with mean equal to zero. 1 vertical line near the tail of the curve to the right of zero extends from the axis to the curve. The region under the curve to the right of the line is shaded representing p-value = 0.00004.\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-549\" src=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181-300x109.jpg\" alt=\"This is a normal distribution curve with mean equal to zero. 1 vertical line near the tail of the curve to the right of zero extends from the axis to the curve. The region under the curve to the right of the line is shaded representing p-value = 0.0077\" width=\"300\" height=\"109\" srcset=\"https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181-300x109.jpg 300w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181-65x24.jpg 65w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181-225x82.jpg 225w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181-350x127.jpg 350w, https:\/\/textbooks.jaykesler.net\/introstats\/wp-content\/uploads\/sites\/2\/2021\/01\/3baef6119fa835c4c5cf6fcc3eac38c92058c181.jpg 487w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/span><\/figure>\n<div class=\"os-caption-container\"><span class=\"os-title-label\">Figure <\/span><span class=\"os-number\">9.9<\/span><\/div>\n<\/div>\n<p id=\"fs-idm17894912\"><strong>Decision:<\/strong> Since <em data-effect=\"italics\">\u03b1<\/em> &gt; <em data-effect=\"italics\">p<\/em>-value, reject the <em data-effect=\"italics\">H<sub>0<\/sub><\/em>.<\/p>\n<p id=\"fs-idp74257664\"><strong>Conclusion:<\/strong> At the 5% level of significance, from the sample data, there is sufficient evidence to conclude that a larger proportion of younger cell phone owners use iPhones than older Americans.<\/p>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idp142829376\" class=\"statistics try ui-has-child-title\" data-type=\"note\" data-has-label=\"true\" data-label=\"\">\n<header>\n<h3 class=\"os-title\"><span class=\"os-title-label\">Try It <\/span><span class=\"os-number\">9.10<\/span><\/h3>\n<\/header>\n<section>\n<p id=\"fs-idp32122976\">A concerned group of citizens wanted to know if the proportion of forcible rapes in Texas was different in 2011 than in 2010. Their research showed that of the 113,231 violent crimes in Texas in 2010, 7,622 of them were forcible rapes. In 2011, 7,439 of the 104,873 violent crimes were in the forcible rape category. Test at a 5% significance level. Answer the following questions:<span data-type=\"newline\"><br \/>\n<\/span><\/p>\n<div id=\"fs-idm127205008\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm286855008\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm65044288\">a. Is this a test of two means or two proportions?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm45452624\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm212581120\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm11093104\">b. Which distribution do you use to perform the test?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm13955600\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm176424272\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idp13677968\">c. What is the random variable?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm6924128\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm152098288\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idp5734352\">d. What are the null and alternative hypothesis? Write the null and alternative hypothesis in symbols.<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm131708672\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm129757040\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm32329328\">e. Is this test right-, left-, or two-tailed?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm51666240\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm109483616\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm36523264\">f. What is the <em data-effect=\"italics\">p<\/em>-value?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm58266784\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm17415680\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm11091776\">g. Do you reject or not reject the null hypothesis?<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<div id=\"fs-idm46567952\" class=\"unnumbered\" data-type=\"exercise\">\n<header><\/header>\n<section>\n<div id=\"fs-idm149856720\" data-type=\"problem\">\n<div class=\"os-problem-container\">\n<p id=\"fs-idm37627040\">h. At the ___ level of significance, from the sample data, there ______ (is\/is not) sufficient evidence to conclude that ____________.<\/p>\n<\/div>\n<\/div>\n<\/section>\n<\/div>\n<\/section>\n<\/div>\n<\/div>\n","protected":false},"author":1,"menu_order":2,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-84","chapter","type-chapter","status-publish","hentry"],"part":81,"_links":{"self":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/84","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":7,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/84\/revisions"}],"predecessor-version":[{"id":695,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/84\/revisions\/695"}],"part":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/parts\/81"}],"metadata":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapters\/84\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=84"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/contributor?post=84"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/textbooks.jaykesler.net\/introstats\/wp-json\/wp\/v2\/license?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}