{"id":1017,"date":"2021-06-04T20:51:25","date_gmt":"2021-06-05T00:51:25","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=1017"},"modified":"2025-06-24T16:43:18","modified_gmt":"2025-06-24T20:43:18","slug":"9-2-two-sample-t-test","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/9-2-two-sample-t-test\/","title":{"raw":"9.2 Two-Sample t Test and t Interval Based on Two Independent Samples","rendered":"9.2 Two-Sample t Test and t Interval Based on Two Independent Samples"},"content":{"raw":"Two-sample <i>t-tests<\/i> are used to test hypotheses regarding the difference between two population means. Depending on whether the two population standard deviations ([latex]\\sigma_1[\/latex] and [latex]\\sigma_2[\/latex]) are equal or not, we have the non-pooled and pooled two-sample t-tests\u00a0and <em>t<\/em> interval. Minor advantages of the pooled t-test are a slightly narrower confidence interval, a slightly more powerful test, and a simpler formula for the degrees of freedom. However, the pooled t-test is valid only when the two population standard deviations are close; otherwise,\u00a0it gives poor results. Therefore, we recommend using the non-pooled <i>t-test<\/i>\u00a0unless we are quite confident that [latex]\\sigma_1[\/latex] = [latex]\\sigma_2[\/latex], which is very difficult to verify.\r\n<h2><strong>9.2.1 Non-Pooled Two-Sample <em>t<\/em> Test and <em>t<\/em> Interval<\/strong><\/h2>\r\n<div class=\"textbox\">\r\n\r\n<strong>Assumptions<\/strong>:\r\n<ol>\r\n \t<li>Simple random samples<\/li>\r\n \t<li>Two samples are independent<\/li>\r\n \t<li>Normal populations or large sample sizes [latex](n_1 \\geq 30, n_2 \\geq 30)[\/latex]<\/li>\r\n<\/ol>\r\n<strong>Steps<\/strong>:\r\n<ol>\r\n \t<li>Set up the hypotheses:\r\n<div align=\"center\">\r\n<table style=\"height: 92px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 30px;\">\r\n<td style=\"text-align: left; width: 222.188px; height: 30px;\" valign=\"top\" bgcolor=\"#F3F0F0\">\r\n<p align=\"center\"><strong>Two-tailed test<\/strong><\/p>\r\n<\/td>\r\n<td style=\"text-align: left; width: 336.328px; height: 30px;\" valign=\"top\" bgcolor=\"#F3F0F0\">\r\n<p align=\"center\"><strong>Right (upper)-tailed test<\/strong><\/p>\r\n<\/td>\r\n<td style=\"text-align: left; width: 331.672px; height: 30px;\" valign=\"top\" bgcolor=\"#F3F0F0\">\r\n<p align=\"center\"><strong>Left (lower)-tailed test<\/strong><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 31px;\">\r\n<td style=\"width: 222.188px; height: 31px;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 336.328px; height: 31px; text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 331.672px; height: 31px; text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: 31px;\">\r\n<td style=\"width: 222.188px; height: 31px;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 336.328px; height: 31px; text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 331.672px; height: 31px; text-align: center;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nNote that [latex]\\Delta_0[\/latex] can be zero or any value you want to test. In most cases, however, [latex]\\Delta_0=0[\/latex].<\/li>\r\n \t<li>State the significance level [latex]\\alpha[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic: [latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - (\\Delta_0)}{\\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}}[\/latex] with [latex]df = \\frac{ \\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} \\right)^2}{\\frac{1}{n_1 - 1} \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\frac{1}{n_2 - 1} \\left( \\frac{s_2^2}{n_2} \\right)^2 }[\/latex], rounded <strong>down<\/strong> to the nearest integer or [latex]\\min\\{n_1 -1, n_2 - 1 \\}[\/latex].<\/li>\r\n \t<li>Use the t-score table (Table IV) to find the P-value or rejection region.\r\n<div align=\"center\">\r\n<table class=\"aligncenter first-col-border\" style=\"width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 16.8919%;\"><\/td>\r\n<th style=\"width: 28.1852%;\" scope=\"col\">\r\n<div align=\"center\">Two-tailed<\/div><\/th>\r\n<th style=\"width: 27.9923%;\" scope=\"col\">\r\n<div align=\"center\">Right-tailed<\/div><\/th>\r\n<th style=\"width: 29.8263%;\" scope=\"col\">\r\n<div align=\"center\">Left-tailed<\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th style=\"width: 16.8919%;\" scope=\"row\" valign=\"top\" width=\"149\">Null<\/th>\r\n<td style=\"width: 28.1852%;\" valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 27.9923%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 29.8263%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 16.8919%;\" scope=\"row\" valign=\"top\" width=\"149\">Alternative<\/th>\r\n<td style=\"width: 28.1852%;\" valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 27.9923%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 29.8263%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 16.8919%;\" scope=\"row\" valign=\"top\" width=\"149\">P-value<\/th>\r\n<td style=\"width: 28.1852%;\" valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]2P(t \\geq |t_o|)[\/latex]<\/div><\/td>\r\n<td style=\"width: 27.9923%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]P(t \\geq t_o)[\/latex]<\/div><\/td>\r\n<td style=\"width: 29.8263%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]P(t \\leq t_o)[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 16.8919%;\" scope=\"row\" valign=\"top\" width=\"149\">Rejection region<\/th>\r\n<td style=\"width: 28.1852%;\" valign=\"top\" width=\"189\">[latex]t \\geq t_{\\alpha \/ 2}[\/latex] or [latex]t \\leq - t_{\\alpha \/ 2}[\/latex]<\/td>\r\n<td style=\"width: 27.9923%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]t \\geq t_{\\alpha}[\/latex]<\/div><\/td>\r\n<td style=\"width: 29.8263%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]t \\leq - t_{\\alpha}[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div><\/li>\r\n \t<li>Decision: Reject the null [latex]H_0[\/latex] if P-value [latex]\\leq \\alpha[\/latex] or [latex]t_o[\/latex] falls in the rejection region.<\/li>\r\n \t<li>Conclusion.<\/li>\r\n<\/ol>\r\nA [latex](1 \u2013\\alpha) \\times 100\\%[\/latex]<em>\u00a0<\/em>two-sample [latex]t[\/latex] confidence interval for [latex]\\mu_1[\/latex] \u2013 [latex]\\mu_2[\/latex] is\r\n<div align=\"center\">\r\n<table style=\"width: 103.644%; height: 173px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"1\">\r\n<thead>\r\n<tr class=\"shaded\">\r\n<th style=\"width: 28.5303%;\" scope=\"col\">\r\n<div align=\"center\">Two-tailed<\/div><\/th>\r\n<th style=\"width: 36.8627%;\" scope=\"col\">\r\n<div align=\"center\">Right-tailed<\/div><\/th>\r\n<th style=\"width: 39.4975%;\" scope=\"col\">\r\n<div align=\"center\">Left-tailed<\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: auto;\">\r\n<td style=\"height: auto; width: 28.5303%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 36.8627%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 39.4975%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: auto;\">\r\n<td style=\"height: auto; width: 28.5303%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 36.8627%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 39.4975%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: auto;\">\r\n<td style=\"height: auto; width: 28.5303%; font-size: 0.95em;\" valign=\"top\">[latex](\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}[\/latex]<\/td>\r\n<td style=\"height: auto; width: 36.8627%; font-size: 0.95em;\" valign=\"top\">[latex]\\left((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}, \\infty \\right)[\/latex]<\/td>\r\n<td style=\"height: auto; width: 39.4975%; font-size: 0.95em;\" valign=\"top\">[latex]\\left(- \\infty , (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}\\right)[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Two-Sample Non-Pooled t-Test and t Interval<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nSome students attend class regularly, but some do not. An instructor wants to compare the class averages for those who attend lectures regularly ([latex]\\mu_1[\/latex]) with those who do not ([latex]\\mu_2[\/latex]). A simple random sample of size [latex]n_1 = 135[\/latex] is selected from the attendees and a simple random sample of size [latex]n_2=35[\/latex] is taken from the non-attendees. The sample mean and sample standard deviation for attendees are [latex]\\bar{x}_1 = 67, s_1 = 17[\/latex]; and for non-attendees are [latex]\\bar{x}_2 = 49, s_2 = 18[\/latex].\r\n<ol type=\"a\">\r\n \t<li>Test at the 1% significance level whether those who attend lectures have a <strong>higher average<\/strong>, i.e., [latex]\\mu_1 \\: \\gt \\: \\mu_2[\/latex] or [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex].<\/li>\r\n<\/ol>\r\n<span style=\"text-align: initial; font-size: 1em;\">\u00a0 \u00a0 \u00a0 \u00a0<strong>Check the assumptions<\/strong>:<\/span>\r\n<ol>\r\n \t<li>We have simple random samples from attendees and non-attendees.<\/li>\r\n \t<li>The two samples are independent.<\/li>\r\n \t<li>We do not have the data, so we cannot check whether two populations are normally distributed using normal probability plot (Q-Q plot); however, we have large sample sizes with [latex]n_1 = 135 \\: \\gt \\: 30, n_2 = 35 \\: \\gt \\: 30[\/latex].<\/li>\r\n<\/ol>\r\nTherefore, the assumptions are met.\r\n<strong>\r\nSteps:<\/strong>\r\n<ol>\r\n \t<li>Set up the hypotheses: [latex]H_0: \\mu_1 - \\mu_2 \\leq 0[\/latex] versus [latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex].\r\nThis is a right-tailed test.<\/li>\r\n \t<li>The significance level is [latex]\\alpha=0.01[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic:\r\n<p align=\"center\">[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{\\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}} = \\frac{(67 - 49) -0}{\\sqrt{ \\frac{17^2}{135} + \\frac{18^2}{35}}} = 5.332[\/latex] with<\/p>\r\n[latex]df = \\frac{ \\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} \\right)^2}{\\frac{1}{n_1 - 1} \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\frac{1}{n_2 - 1} \\left( \\frac{s_2^2}{n_2} \\right)^2 } = \\frac{ \\left( \\frac{17^2}{135} + \\frac{18^2}{35} \\right)^2}{\\frac{1}{135 - 1} \\left( \\frac{17^2}{135} \\right)^2 + \\frac{1}{35 - 1} \\left( \\frac{18^2}{35} \\right)^2 } = 50.85[\/latex], rounded down to [latex]df = 50[\/latex].<\/li>\r\n \t<li>Find the P-value. For a right-tailed test with the observed test statistics [latex]t_o=5.332[\/latex], the P-value is the area to the right of [latex]t_o[\/latex], i.e., [latex]\\mbox{P-value} = P(t \\geq t_o) = P(t \\geq 5.332) &lt; 0.0005, \\mbox{since} t_o=5.332 \\: \\gt \\: 3.496(t_{0.0005})[\/latex]<\/li>\r\n \t<li>Decision: Since the P-value [latex] &lt; 0.0005 &lt; 0.01 (\\alpha)[\/latex], reject the null hypothesis [latex]H_0[\/latex].<\/li>\r\n \t<li>Conclusion: At the 1% significance level, the data provide sufficient evidence that those who attend lectures have a <strong>higher average<\/strong>.<\/li>\r\n<\/ol>\r\nIf using the critical value approach, steps 1-3 are the same, steps 4-6 become:\r\n<ol type=\"a\">\r\n \t<li style=\"list-style-type: none;\">\r\n<ol start=\"4\">\r\n \t<li>Rejection region:<a id=\"retfig9.2\"><\/a>\r\n<div align=\"center\">\r\n<table class=\"no-border\" cellspacing=\"0\" cellpadding=\"3\">\r\n<tbody>\r\n<tr>\r\n<td valign=\"top\" width=\"305\">[caption id=\"attachment_3592\" align=\"aligncenter\" width=\"300\"]<img class=\"wp-image-3592 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-300x222.png\" alt=\"A t-curve with 35 degrees of freedom with a shaded rejection region to the right of 2.403. Image description available.\" width=\"300\" height=\"222\" \/> <strong>Figure 9.2<\/strong>: Rejection Region and Observed Value. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig9.2\">Image Description (See Appendix D Figure 9.2)<\/a>][\/caption]<\/td>\r\n<td valign=\"top\" width=\"277\">[latex]\\alpha = 0.01 , t_{\\alpha} = t_{0.01} = 2.403[\/latex]\r\n\r\nFor a right-tailed test, the critical value is 2.403. The rejection region is to the right of 2.403.<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div><\/li>\r\n \t<li>Decision: Since the observed value [latex]t_o =5.332 \\: \\gt \\: 2.403[\/latex] falls in the rejection region, we reject the null hypothesis [latex]H_0[\/latex].<\/li>\r\n \t<li>Conclusion: At the 1% significance level, the data provide sufficient evidence that those who attend lectures have a <strong>higher average<\/strong>.<\/li>\r\n<\/ol>\r\n<\/li>\r\n \t<li>Obtain a confidence interval for the difference between the class average for attendees and non-attendees [latex]\\mu_1 - \\mu_2[\/latex] corresponding to the test in part a).\r\nPart a) contains a right-tailed test at the 1% significance level. Therefore, we should obtain a 99% upper-tailed interval: [latex]\\left((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}, \\infty \\right)[\/latex].\r\n[latex]\\alpha = 0.01, df = 50, t_{\\alpha} = t_{0.01} = 2.403[\/latex].\r\nThe lower bound for the upper-tailed interval is:\r\n<p align=\"center\">[latex](\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}} = (67 - 49) - 2.403 \\times \\sqrt{ \\frac{17^2}{135} + \\frac{18^2}{35}} = 9.887[\/latex].<\/p>\r\nThus, the corresponding 99% confidence interval for [latex]\\mu_1 - \\mu_2[\/latex] is [latex](9.887, \\infty)[\/latex].\r\nInterpretation: we are 99% confident that the difference in average grades is at least 9.887 between attendees and non-attendees.<\/li>\r\n \t<li>Does the interval in part (b) support the conclusion in part a)?\r\nIn part a), we reject [latex]H_0[\/latex] at the 1% significance level and claim that [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex].\r\nIn part b), since the entire interval is above 0, we can claim that [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex] with 99% confidence, which supports the results obtained in part a).<\/li>\r\n \t<li>Based on the interval obtained in part b), can we claim that the class average of attendees is at least 5 marks higher than that of the non-attendees? How about 10 marks higher?\r\nWe can claim that the class average of attendees is at least 5 marks higher than that of the non-attendees since the entire interval is above 5. However, we cannot claim that the class average of attendees is at least 10 marks higher than that of the non-attendees since the interval contains 10.<a id=\"retfig9.3\"><\/a>[caption id=\"attachment_1021\" align=\"aligncenter\" width=\"432\"]<img class=\"wp-image-1021 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval.png\" alt=\"A number line shows how a confidence interval can be used to reject mu null. Image description available.\" width=\"432\" height=\"129\" \/> <strong>Figure 9.3<\/strong>: Confidence Interval of difference in Class Average. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig9.3\">Image Description (See Appendix D Figure 9.3)<\/a>][\/caption]<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n<h2><strong>9.2.2 Pooled Two-Sample <em>t<\/em> Test and <em>t<\/em> Interval<\/strong><\/h2>\r\nIf the two population standard deviations are equal, i.e., [latex]\\sigma_1 = \\sigma_2 = \\sigma[\/latex], we can pool the two samples together to get a better estimate of the common standard deviation [latex]\\sigma[\/latex]\r\n\r\n[latex]\\hat{\\sigma} = s_p = \\sqrt{ \\frac{(n_1 - 1)s_1^2 + (n_2 -1)s_2^2 } {(n_1 - 1) + (n_2 -1)}}[\/latex]\r\n\r\nwhere the term [latex](n_1 - 1)s_1^2 = \\sum_{\\text{sample 1}}(x - \\bar{x}_1)^2 [\/latex] is the variation of the data within sample 1, and [latex](n_2 - 1)s_2^2 = \\sum_{\\text{sample 2}}(x - \\bar{x}_2)^2 [\/latex] is the variation of the data within sample 2.\r\n\r\nRecall that the standard deviation of [latex]\\bar{X}_1 - \\bar{X}_2[\/latex] is [latex]\\sigma_{\\scriptsize \\bar{X}_1 - \\bar{X}_2} = \\sqrt{ \\frac{\\sigma_1^2}{n_1} + \\frac{\\sigma_2^2}{n_2} }[\/latex]. Thus, if [latex]\\sigma_1 = \\sigma_2 = \\sigma[\/latex], then [latex]\\sigma_{\\scriptsize \\bar{X}_1 - \\bar{X}_2}[\/latex] reduces to [latex]\\sqrt{ \\frac{\\sigma^2}{n_1} + \\frac{\\sigma^2}{n_2} } = \\sigma \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2} }[\/latex]. Estimating [latex]\\sigma[\/latex] with [latex]s_p[\/latex] leads to the pooled test statistic:\r\n\r\n[latex] t = \\frac{(\\bar{X}_1 - \\bar{X}_2) - (\\mu_1 - \\mu_2)}{s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2} } } \\sim \\text{$t$ distribution}[\/latex]\r\n\r\nwith [latex]df = (n_1 - 1) + (n_2 -1) = n_1 + n_2 -2[\/latex].\r\n\r\nThe assumption [latex]\\sigma_1 = \\sigma_2[\/latex] is very difficult to verify. Some textbooks suggest a rule of thumb:\r\n\r\n<strong>If the ratio of the larger to the smaller sample standard deviation is less than 2, then the assumption is considered to be reasonable, i.e., [latex]\\frac{\\max \\{ s_1, s_2\\}}{\\min \\{ s_1, s_2\\}} &lt; 2[\/latex]<\/strong>.\r\n<div class=\"textbox\">\r\n\r\n<strong>Assumptions<\/strong>:\r\n<ol>\r\n \t<li>Simple random samples.<\/li>\r\n \t<li>Independent samples.<\/li>\r\n \t<li>Normal populations or large sample sizes [latex](n_1 \\geq 30, n_2 \\geq 30)[\/latex].<\/li>\r\n \t<li>Equal population standard deviations. This assumption is reasonable if [latex]\\frac{\\max \\{ s_1, s_2\\}}{\\min \\{ s_1, s_2\\}} &lt; 2[\/latex].<\/li>\r\n<\/ol>\r\n<strong>Steps<\/strong>:\r\n<ol>\r\n \t<li>Set up the hypotheses:\r\n<div align=\"center\">\r\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td valign=\"top\" bgcolor=\"#F3F0F0\" width=\"217\"><strong>Two-tailed test<\/strong><\/td>\r\n<td valign=\"top\" bgcolor=\"#F3F0F0\" width=\"225\"><strong>Right (upper)-tailed test<\/strong><\/td>\r\n<td valign=\"top\" bgcolor=\"#F3F0F0\" width=\"225\"><strong>Left (lower)-tailed test<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td valign=\"top\" width=\"217\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"225\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"225\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<td valign=\"top\" width=\"217\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"225\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"225\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nNote that [latex]\\Delta_0[\/latex] can be zero or any value you want to test.<\/li>\r\n \t<li>State the significance level [latex]\\alpha[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic: [latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}}[\/latex], with [latex]df = n_1 + n_2 \u2013 2[\/latex] and [latex]s_p = \\sqrt{ \\frac{(n_1 - 1)s_1^2 + (n_2 -1)s_2^2 } {(n_1 - 1) + (n_2 -1)}}[\/latex].<\/li>\r\n \t<li>Use the t-score table (Table IV) to find the P-value or rejection region.\r\n<table class=\"aligncenter first-col-border\" style=\"width: 100%;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\">\r\n<td style=\"width: 16.3127%;\"><\/td>\r\n<th style=\"width: 30.5984%;\" scope=\"col\">\r\n<div align=\"center\">Two-tailed<\/div><\/th>\r\n<th style=\"width: 27.9924%;\" scope=\"col\">\r\n<div align=\"center\">Right-tailed<\/div><\/th>\r\n<th style=\"width: 25.0965%;\" scope=\"col\">\r\n<div align=\"center\">Left-tailed<\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr>\r\n<th style=\"width: 16.3127%;\" scope=\"row\" valign=\"top\" width=\"149\">Null<\/th>\r\n<td style=\"width: 30.5984%;\" valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 27.9924%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 25.0965%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 16.3127%;\" scope=\"row\" valign=\"top\" width=\"149\">Alternative<\/th>\r\n<td style=\"width: 30.5984%;\" valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 27.9924%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"width: 25.0965%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 16.3127%;\" scope=\"row\" valign=\"top\" width=\"149\">P-value<\/th>\r\n<td style=\"width: 30.5984%;\" valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]2P(t \\geq |t_o|)[\/latex]<\/div><\/td>\r\n<td style=\"width: 27.9924%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]P(t \\geq t_o)[\/latex]<\/div><\/td>\r\n<td style=\"width: 25.0965%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]P(t \\leq t_o)[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<th style=\"width: 16.3127%;\" scope=\"row\" valign=\"top\" width=\"149\">Rejection region<\/th>\r\n<td style=\"width: 30.5984%;\" valign=\"top\" width=\"189\">[latex]t \\geq t_{\\alpha \/ 2}[\/latex] or [latex]t \\leq - t_{\\alpha \/ 2}[\/latex]<\/td>\r\n<td style=\"width: 27.9924%;\" valign=\"top\" width=\"180\">\r\n<div align=\"center\">[latex]t \\geq t_{\\alpha}[\/latex]<\/div><\/td>\r\n<td style=\"width: 25.0965%;\" valign=\"top\" width=\"142\">\r\n<div align=\"center\">[latex]t \\leq - t_{\\alpha}[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/li>\r\n \t<li>Decision: Reject the null [latex]H_0[\/latex] if P-value [latex]\\leq \\alpha[\/latex] or [latex]t_o[\/latex] falls in the rejection region.<\/li>\r\n \t<li>Conclusion.<\/li>\r\n<\/ol>\r\nA [latex](1 - \\alpha) \\times 100%[\/latex] two-sample <em>t<\/em> confidence interval for [latex]\\mu_1 - \\mu_2[\/latex] is\r\n<div align=\"center\">\r\n<table style=\"width: 93.6296%; height: auto;\" cellspacing=\"0\" cellpadding=\"1\">\r\n<thead>\r\n<tr class=\"shaded\">\r\n<th style=\"width: 26.2226%;\" scope=\"col\">\r\n<div align=\"center\">Two-tailed<\/div><\/th>\r\n<th style=\"width: 29.4327%;\" scope=\"col\">\r\n<div align=\"center\">Right-tailed<\/div><\/th>\r\n<th style=\"width: 31.6039%;\" scope=\"col\">\r\n<div align=\"center\">Left-tailed<\/div><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: auto;\">\r\n<td style=\"height: auto; width: 26.2226%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 29.4327%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 31.6039%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: auto;\">\r\n<td style=\"height: auto; width: 26.2226%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 29.4327%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<td style=\"height: auto; width: 31.6039%;\" valign=\"top\">\r\n<div align=\"center\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr style=\"height: auto;\">\r\n<td style=\"height: auto; width: 26.2226%;\" valign=\"top\">[latex] \\small{(\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}}[\/latex]<\/td>\r\n<td style=\"height: auto; width: 29.4327%;\" valign=\"top\">[latex] \\small{\\left((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}, \\infty \\right)}[\/latex]<\/td>\r\n<td style=\"height: auto; width: 31.6039%;\" valign=\"top\">[latex] \\small{\\left(- \\infty , (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \u00a0s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}\\right)}[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Pooled Two-Sample t Test and Interval<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nSome students attend class regularly, but some do not. An instructor wants to compare the class averages for those who attend lectures regularly ([latex]\\mu_1[\/latex]) with those who do not ([latex]\\mu_2[\/latex]). A simple random sample of size [latex]n_1=135[\/latex] is selected from the attendees, and a simple random sample of size [latex]n_2=35[\/latex] is taken from the non-attendees. The sample mean and sample standard deviation for attendees are [latex]\\bar{x}_1 = 67, s_1 = 17[\/latex]; and for non-attendees are [latex]\\bar{x}_2 = 49, s_2 = 18[\/latex].\r\n<ol type=\"a\">\r\n \t<li>Is it reasonable to conduct a pooled two-sample <i>t-test<\/i>\u00a0to test whether those who attend lectures have a <strong>higher average<\/strong>? If yes, run the test at the 1% significance level.<\/li>\r\n<\/ol>\r\n<p style=\"padding-left: 40px;\"><strong>Check the assumptions<\/strong>:<\/p>\r\n\r\n<ol>\r\n \t<li>We have simple random samples.<\/li>\r\n \t<li>The two samples are independent.<\/li>\r\n \t<li>We have large sample sizes [latex](n_1 = 135 &gt; 30, n_2 =35 &gt; 30)[\/latex].<\/li>\r\n \t<li>Equal standard deviation [latex]\\frac{\\max \\{ s_1, s_2 \\} }{\\min \\{ s_1, s_2 \\}} = \\frac{\\max \\{ 17, 18 \\}}{\\min \\{ 17, 18 \\}} = \\frac{18}{17} &lt; 2[\/latex].<\/li>\r\n<\/ol>\r\nIt is reasonable to conduct a pooled two-sample t-test since all the assumptions for pooled two-sample t-test\u00a0are met.\r\n<strong>\r\nSteps<\/strong>:\r\n<ol type=\"a\">\r\n \t<li style=\"list-style-type: none;\">\r\n<ol>\r\n \t<li>Set up the hypotheses: [latex]H_0: \\mu_1 - \\mu_2 \\leq 0[\/latex] versus [latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex]. This is a right-tailed test.<\/li>\r\n \t<li>The significance level is [latex]\\alpha=0.01[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic:\r\n[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}} = \\frac{(67-49) - 0}{17.207 \\sqrt{ \\frac{1}{135} + \\frac{1}{35}}} = 5.515[\/latex] with [latex]df = n_1 + n_2 \u2013 2 = 135+35\u20132=168[\/latex] (not given in Table IV, use df=100), and with\r\n[latex]s_p = \\sqrt{ \\frac{(n_1 - 1)s_1^2 + (n_2 -1)s_2^2 } {n_1 + n_2 -2}} = \u00a0\\sqrt{ \\frac{(135 - 1)17^2 + (35 -1)18^2 } {135 + 35 - 2}} = 17.207.[\/latex]<\/li>\r\n \t<li>Find the P-value. For a right-tailed test with the observed test statistics [latex]t_o=5.515[\/latex], the P-value is the area to the right of [latex]t_o[\/latex] i.e., p-value [latex]=P(t \\geq t_o) = P(t \\geq 5.515) &lt; 0.0005[\/latex], since [latex]t_o=5.515 \\: \\gt \\: 3.390 (t_{0.0005})[\/latex] with [latex]df=100[\/latex].<\/li>\r\n \t<li>Decision: Since the P-value [latex]&lt;0.0005&lt; 0.01(\\alpha)[\/latex] reject the null hypothesis [latex]H_0[\/latex]<\/li>\r\n \t<li>Conclusion: At the 1% significance level, the data provide sufficient evidence that those who attend lectures have a <strong>higher average<\/strong>.<\/li>\r\n<\/ol>\r\n<\/li>\r\n \t<li>Obtain a confidence interval for the difference between the class average for attendees and non-attendees, [latex]\\mu_1 - \\mu_2[\/latex], corresponding to the test in part a).\r\nPart a) contains a right-tailed test at the 1% significance level. Therefore, we should obtain a 99% upper-tailed interval [latex]((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2} }, \\infty)[\/latex], with [latex]\\alpha=0.01, df=100[\/latex], and [latex]t_{0.01}=2.364[\/latex]. The lower bound for the upper-tailed interval is [latex]\\begin{align*} (\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2} } &amp;= (67 - 49) - 2.364 \\times 17.207 \\times \\sqrt{\\frac{1}{135} + \\frac{1}{35}} \\\\ &amp;= 10.284. \\end{align*}[\/latex] Thus, the corresponding 99% confidence interval for [latex]\\mu_1 - \\mu_2[\/latex] is \u00a0[latex](10.284, \\infty)[\/latex].\r\n<strong>Interpretation<\/strong>: we are 99% confident that the difference in average grades is at least 10.284 between attendees and non-attendees.<\/li>\r\n \t<li>Based on the confidence interval in part b), can we claim that the class average of attendees is at least 10 marks higher than that of the non-attendees?\r\nYes, since the entire interval is above 10, we can claim that [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 10[\/latex].<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n<div style=\"height: 55px; margin-top: 5px;\"><img class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" \/><\/div>\r\n<div><\/div>\r\n<div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Two-Sample Test<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nThe following table summarizes the operative times of neurosurgeries conducted by a dynamic system (Z-plate) and a static system (ALPS plate).\r\n<p style=\"text-align: center;\"><strong>Table 9.1<\/strong>: Operating Time of Dynamic and Static System<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"aligncenter\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td valign=\"top\" bgcolor=\"#F3F0F0\" width=\"189\">\r\n<div align=\"center\"><strong>Dynamic<\/strong><\/div><\/td>\r\n<td valign=\"top\" bgcolor=\"#F3F0F0\" width=\"189\">\r\n<div align=\"center\"><strong>Static<\/strong><\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<td valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]\\bar{x}_1 = 400[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]\\bar{x}_2 = 480[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<td valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]s_1 = 85[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]s_2 = 40[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<tr>\r\n<td valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]n_1 = 60[\/latex]<\/div><\/td>\r\n<td valign=\"top\" width=\"189\">\r\n<div align=\"center\">[latex]n_2 = 30[\/latex]<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<ol type=\"a\">\r\n \t<li>Test at the 5% significance level whether the dynamic system (Z-plate) has a lower mean operative time than the static system (ALPS plate).<\/li>\r\n \t<li>Obtain a confidence interval for the difference in mean operative time between the dynamic and the static systems, [latex]\\mu_1 - \\mu_2[\/latex], corresponding to the test in part a).<\/li>\r\n<\/ol>\r\n<details><summary>Show\/Hide Answer<\/summary>\r\n<ol type=\"a\">\r\n \t<li><strong>Check the assumptions<\/strong>:\r\n<ol>\r\n \t<li>We have simple random samples.<\/li>\r\n \t<li>The two samples are independent.<\/li>\r\n \t<li>We have large sample sizes [latex]n_1 = 60 &gt; 30, n_2 = 30 \\geq 30[\/latex].<\/li>\r\n \t<li>Equal standard deviations [latex]\\frac{\\max \\{ s_1, s_2 \\} }{\\min \\{ s_1, s_2 \\}} = \\frac{\\max \\{ 85, 40 \\}}{\\min \\{ 85, 40 \\}} = \\frac{85}{40} \\: \\gt \\: 2[\/latex].<\/li>\r\n<\/ol>\r\nSince the equal standard deviation assumption is violated, we should use the non-pooled two-sample <i>t-test<\/i>.\r\n\r\n<strong>Steps<\/strong>:\r\n<ol>\r\n \t<li>Set up the hypotheses: [latex]H_0: \\mu_1 - \\mu_2 \\geq 0[\/latex] versus [latex]H_a: \\mu_1 - \\mu_2 &lt; 0[\/latex].\r\nThis is a left-tailed test.<\/li>\r\n \t<li>The significance level is [latex]\\alpha = 0.05[\/latex].<\/li>\r\n \t<li>Compute the value of the test statistic:[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{\\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}} = \\frac{(400 - 480) - 0}{\\sqrt{ \\frac{85^2}{60} + \\frac{40^2}{30}}} = -6.069[\/latex] with[latex]df = \\frac{ \\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} \\right)^2}{\\frac{1}{n_1 - 1} \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\frac{1}{n_2 - 1} \\left( \\frac{s_2^2}{n_2} \\right)^2 } = \\frac{ \\left( \\frac{85^2}{60} + \\frac{40^2}{30} \\right)^2}{\\frac{1}{60 - 1} \\left( \\frac{85^2}{60} \\right)^2 + \\frac{1}{30 - 1} \\left( \\frac{40^2}{30} \\right)^2 } = 87.797,[\/latex] rounded down to [latex]df = 87[\/latex].<\/li>\r\n \t<li>Find the P-value. For a left-tailed test with the observed test statistics [latex]t_o = \u2013 6.069[\/latex], the P-value is the area to the left of [latex]t_o[\/latex], i.e., [latex]\\mbox{P-value} = P(t \\leq t_o) = P(t \\leq -6.069) = P(t \\geq 6.069) &lt; 0.0005,[\/latex] since [latex]6.069 \\: \\gt \\: 3.406(t_{0.0005})[\/latex].<\/li>\r\n \t<li>Decision: Since the P-value [latex] &lt; 0.0005 &lt; 0.05 (\\alpha)[\/latex], reject the null hypothesis [latex]H_0[\/latex].<\/li>\r\n \t<li>Conclusion: At the 5% significance level, the data provide sufficient evidence that the dynamic system (Z-plate) has a lower mean operative time than the static system (ALPS plate).<\/li>\r\n<\/ol>\r\n<\/li>\r\n \t<li>For a left-tailed test at the 5% significance level, the corresponding confidence interval is a 95% lower-tailed interval [latex]( - \\infty, (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} })[\/latex] with the upper confidence bound [latex] (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} } = (400 - 480) + 1.663 \\times \\sqrt{ \\frac{85^2}{60} + \\frac{40^2}{30}} = -58.079.[\/latex] Note that for [latex]df=87[\/latex], [latex]t_{0.05}=1.663[\/latex]. Therefore, the 95% lower-tailed interval is [latex]( - \\infty, (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} }) = (- \\infty , -58.079) [\/latex].\r\n<strong>Interpretation<\/strong>: we are 95% confident that the difference in mean operative time between the dynamic and the static systems is below -58.097. Since the entire interval is below 0, we can claim that [latex]\\mu_1 - \\mu_2 &lt; 0[\/latex], which supports the conclusion of the hypothesis test in part a).<\/li>\r\n<\/ol>\r\n<\/details><\/div>\r\n<\/div>\r\n<\/div>\r\n<div style=\"height: 55px; margin-top: 5px;\"><img class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/instructornote.png\" alt=\"\" width=\"250\" height=\"50\" \/><\/div>\r\nIt is safer to use the non-pooled two-sample [latex]t[\/latex] test if we are not sure whether the two population standard deviations are equal. Use the pooled two-sample [latex]t[\/latex] test only if we have evidence that the population standard deviations are equal. For example, we can use the pooled two-sample [latex]t[\/latex] test when we compare two independent groups in a one-way ANOVA (analysis of variance) analysis since equal standard deviation is one of the assumptions of the one-way ANOVA F test which will be covered in Chapter 13.","rendered":"<p>Two-sample <i>t-tests<\/i> are used to test hypotheses regarding the difference between two population means. Depending on whether the two population standard deviations ([latex]\\sigma_1[\/latex] and [latex]\\sigma_2[\/latex]) are equal or not, we have the non-pooled and pooled two-sample t-tests\u00a0and <em>t<\/em> interval. Minor advantages of the pooled t-test are a slightly narrower confidence interval, a slightly more powerful test, and a simpler formula for the degrees of freedom. However, the pooled t-test is valid only when the two population standard deviations are close; otherwise,\u00a0it gives poor results. Therefore, we recommend using the non-pooled <i>t-test<\/i>\u00a0unless we are quite confident that [latex]\\sigma_1[\/latex] = [latex]\\sigma_2[\/latex], which is very difficult to verify.<\/p>\n<h2><strong>9.2.1 Non-Pooled Two-Sample <em>t<\/em> Test and <em>t<\/em> Interval<\/strong><\/h2>\n<div class=\"textbox\">\n<p><strong>Assumptions<\/strong>:<\/p>\n<ol>\n<li>Simple random samples<\/li>\n<li>Two samples are independent<\/li>\n<li>Normal populations or large sample sizes [latex](n_1 \\geq 30, n_2 \\geq 30)[\/latex]<\/li>\n<\/ol>\n<p><strong>Steps<\/strong>:<\/p>\n<ol>\n<li>Set up the hypotheses:\n<div style=\"margin: auto;\">\n<table style=\"height: 92px; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"shaded\" style=\"height: 30px;\">\n<td style=\"text-align: left; width: 222.188px; height: 30px; background-color: #F3F0F0;\" valign=\"top\">\n<p style=\"text-align: center;\"><strong>Two-tailed test<\/strong><\/p>\n<\/td>\n<td style=\"text-align: left; width: 336.328px; height: 30px; background-color: #F3F0F0;\" valign=\"top\">\n<p style=\"text-align: center;\"><strong>Right (upper)-tailed test<\/strong><\/p>\n<\/td>\n<td style=\"text-align: left; width: 331.672px; height: 30px; background-color: #F3F0F0;\" valign=\"top\">\n<p style=\"text-align: center;\"><strong>Left (lower)-tailed test<\/strong><\/p>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 31px;\">\n<td style=\"width: 222.188px; height: 31px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 336.328px; height: 31px; text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 331.672px; height: 31px; text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: 31px;\">\n<td style=\"width: 222.188px; height: 31px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 336.328px; height: 31px; text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 331.672px; height: 31px; text-align: center;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Note that [latex]\\Delta_0[\/latex] can be zero or any value you want to test. In most cases, however, [latex]\\Delta_0=0[\/latex].<\/li>\n<li>State the significance level [latex]\\alpha[\/latex].<\/li>\n<li>Compute the value of the test statistic: [latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - (\\Delta_0)}{\\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}}[\/latex] with [latex]df = \\frac{ \\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} \\right)^2}{\\frac{1}{n_1 - 1} \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\frac{1}{n_2 - 1} \\left( \\frac{s_2^2}{n_2} \\right)^2 }[\/latex], rounded <strong>down<\/strong> to the nearest integer or [latex]\\min\\{n_1 -1, n_2 - 1 \\}[\/latex].<\/li>\n<li>Use the t-score table (Table IV) to find the P-value or rejection region.\n<div style=\"margin: auto;\">\n<table class=\"aligncenter first-col-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 16.8919%;\"><\/td>\n<th style=\"width: 28.1852%;\" scope=\"col\">\n<div style=\"margin: auto;\">Two-tailed<\/div>\n<\/th>\n<th style=\"width: 27.9923%;\" scope=\"col\">\n<div style=\"margin: auto;\">Right-tailed<\/div>\n<\/th>\n<th style=\"width: 29.8263%;\" scope=\"col\">\n<div style=\"margin: auto;\">Left-tailed<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"width: 16.8919%; width: 149px;\" scope=\"row\" valign=\"top\">Null<\/th>\n<td style=\"width: 28.1852%; width: 189px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 27.9923%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 29.8263%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 16.8919%; width: 149px;\" scope=\"row\" valign=\"top\">Alternative<\/th>\n<td style=\"width: 28.1852%; width: 189px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 27.9923%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 29.8263%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 16.8919%; width: 149px;\" scope=\"row\" valign=\"top\">P-value<\/th>\n<td style=\"width: 28.1852%; width: 189px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]2P(t \\geq |t_o|)[\/latex]<\/div>\n<\/td>\n<td style=\"width: 27.9923%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]P(t \\geq t_o)[\/latex]<\/div>\n<\/td>\n<td style=\"width: 29.8263%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]P(t \\leq t_o)[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 16.8919%; width: 149px;\" scope=\"row\" valign=\"top\">Rejection region<\/th>\n<td style=\"width: 28.1852%; width: 189px;\" valign=\"top\">[latex]t \\geq t_{\\alpha \/ 2}[\/latex] or [latex]t \\leq - t_{\\alpha \/ 2}[\/latex]<\/td>\n<td style=\"width: 27.9923%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]t \\geq t_{\\alpha}[\/latex]<\/div>\n<\/td>\n<td style=\"width: 29.8263%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]t \\leq - t_{\\alpha}[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<li>Decision: Reject the null [latex]H_0[\/latex] if P-value [latex]\\leq \\alpha[\/latex] or [latex]t_o[\/latex] falls in the rejection region.<\/li>\n<li>Conclusion.<\/li>\n<\/ol>\n<p>A [latex](1 \u2013\\alpha) \\times 100\\%[\/latex]<em>\u00a0<\/em>two-sample [latex]t[\/latex] confidence interval for [latex]\\mu_1[\/latex] \u2013 [latex]\\mu_2[\/latex] is<\/p>\n<div style=\"margin: auto;\">\n<table style=\"width: 103.644%; height: 173px; border-spacing: 0px;\" cellpadding=\"1\">\n<thead>\n<tr class=\"shaded\">\n<th style=\"width: 28.5303%;\" scope=\"col\">\n<div style=\"margin: auto;\">Two-tailed<\/div>\n<\/th>\n<th style=\"width: 36.8627%;\" scope=\"col\">\n<div style=\"margin: auto;\">Right-tailed<\/div>\n<\/th>\n<th style=\"width: 39.4975%;\" scope=\"col\">\n<div style=\"margin: auto;\">Left-tailed<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: auto;\">\n<td style=\"height: auto; width: 28.5303%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 36.8627%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 39.4975%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: auto;\">\n<td style=\"height: auto; width: 28.5303%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 36.8627%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 39.4975%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: auto;\">\n<td style=\"height: auto; width: 28.5303%; font-size: 0.95em;\" valign=\"top\">[latex](\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}[\/latex]<\/td>\n<td style=\"height: auto; width: 36.8627%; font-size: 0.95em;\" valign=\"top\">[latex]\\left((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}, \\infty \\right)[\/latex]<\/td>\n<td style=\"height: auto; width: 39.4975%; font-size: 0.95em;\" valign=\"top\">[latex]\\left(- \\infty , (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}\\right)[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Two-Sample Non-Pooled t-Test and t Interval<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Some students attend class regularly, but some do not. An instructor wants to compare the class averages for those who attend lectures regularly ([latex]\\mu_1[\/latex]) with those who do not ([latex]\\mu_2[\/latex]). A simple random sample of size [latex]n_1 = 135[\/latex] is selected from the attendees and a simple random sample of size [latex]n_2=35[\/latex] is taken from the non-attendees. The sample mean and sample standard deviation for attendees are [latex]\\bar{x}_1 = 67, s_1 = 17[\/latex]; and for non-attendees are [latex]\\bar{x}_2 = 49, s_2 = 18[\/latex].<\/p>\n<ol type=\"a\">\n<li>Test at the 1% significance level whether those who attend lectures have a <strong>higher average<\/strong>, i.e., [latex]\\mu_1 \\: \\gt \\: \\mu_2[\/latex] or [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex].<\/li>\n<\/ol>\n<p><span style=\"text-align: initial; font-size: 1em;\">\u00a0 \u00a0 \u00a0 \u00a0<strong>Check the assumptions<\/strong>:<\/span><\/p>\n<ol>\n<li>We have simple random samples from attendees and non-attendees.<\/li>\n<li>The two samples are independent.<\/li>\n<li>We do not have the data, so we cannot check whether two populations are normally distributed using normal probability plot (Q-Q plot); however, we have large sample sizes with [latex]n_1 = 135 \\: \\gt \\: 30, n_2 = 35 \\: \\gt \\: 30[\/latex].<\/li>\n<\/ol>\n<p>Therefore, the assumptions are met.<br \/>\n<strong><br \/>\nSteps:<\/strong><\/p>\n<ol>\n<li>Set up the hypotheses: [latex]H_0: \\mu_1 - \\mu_2 \\leq 0[\/latex] versus [latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex].<br \/>\nThis is a right-tailed test.<\/li>\n<li>The significance level is [latex]\\alpha=0.01[\/latex].<\/li>\n<li>Compute the value of the test statistic:\n<p style=\"text-align: center;\">[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{\\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}} = \\frac{(67 - 49) -0}{\\sqrt{ \\frac{17^2}{135} + \\frac{18^2}{35}}} = 5.332[\/latex] with<\/p>\n<p>[latex]df = \\frac{ \\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} \\right)^2}{\\frac{1}{n_1 - 1} \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\frac{1}{n_2 - 1} \\left( \\frac{s_2^2}{n_2} \\right)^2 } = \\frac{ \\left( \\frac{17^2}{135} + \\frac{18^2}{35} \\right)^2}{\\frac{1}{135 - 1} \\left( \\frac{17^2}{135} \\right)^2 + \\frac{1}{35 - 1} \\left( \\frac{18^2}{35} \\right)^2 } = 50.85[\/latex], rounded down to [latex]df = 50[\/latex].<\/li>\n<li>Find the P-value. For a right-tailed test with the observed test statistics [latex]t_o=5.332[\/latex], the P-value is the area to the right of [latex]t_o[\/latex], i.e., [latex]\\mbox{P-value} = P(t \\geq t_o) = P(t \\geq 5.332) < 0.0005, \\mbox{since} t_o=5.332 \\: \\gt \\: 3.496(t_{0.0005})[\/latex]<\/li>\n<li>Decision: Since the P-value [latex]< 0.0005 < 0.01 (\\alpha)[\/latex], reject the null hypothesis [latex]H_0[\/latex].<\/li>\n<li>Conclusion: At the 1% significance level, the data provide sufficient evidence that those who attend lectures have a <strong>higher average<\/strong>.<\/li>\n<\/ol>\n<p>If using the critical value approach, steps 1-3 are the same, steps 4-6 become:<\/p>\n<ol type=\"a\">\n<li style=\"list-style-type: none;\">\n<ol start=\"4\">\n<li>Rejection region:<a id=\"retfig9.2\"><\/a>\n<div style=\"margin: auto;\">\n<table class=\"no-border\" cellpadding=\"3\" style=\"border-spacing: 0px;\">\n<tbody>\n<tr>\n<td valign=\"top\" style=\"width: 305px;\">\n<figure id=\"attachment_3592\" aria-describedby=\"caption-attachment-3592\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-3592 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-300x222.png\" alt=\"A t-curve with 35 degrees of freedom with a shaded rejection region to the right of 2.403. Image description available.\" width=\"300\" height=\"222\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-300x222.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-1024x758.png 1024w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-768x568.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-1536x1137.png 1536w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-2048x1516.png 2048w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-65x48.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-225x167.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/corrected_rejection_region_righttail_001-350x259.png 350w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-3592\" class=\"wp-caption-text\"><strong>Figure 9.2<\/strong>: Rejection Region and Observed Value. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig9.2\">Image Description (See Appendix D Figure 9.2)<\/a>]<\/figcaption><\/figure>\n<\/td>\n<td valign=\"top\" style=\"width: 277px;\">[latex]\\alpha = 0.01 , t_{\\alpha} = t_{0.01} = 2.403[\/latex]<\/p>\n<p>For a right-tailed test, the critical value is 2.403. The rejection region is to the right of 2.403.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<li>Decision: Since the observed value [latex]t_o =5.332 \\: \\gt \\: 2.403[\/latex] falls in the rejection region, we reject the null hypothesis [latex]H_0[\/latex].<\/li>\n<li>Conclusion: At the 1% significance level, the data provide sufficient evidence that those who attend lectures have a <strong>higher average<\/strong>.<\/li>\n<\/ol>\n<\/li>\n<li>Obtain a confidence interval for the difference between the class average for attendees and non-attendees [latex]\\mu_1 - \\mu_2[\/latex] corresponding to the test in part a).<br \/>\nPart a) contains a right-tailed test at the 1% significance level. Therefore, we should obtain a 99% upper-tailed interval: [latex]\\left((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}, \\infty \\right)[\/latex].<br \/>\n[latex]\\alpha = 0.01, df = 50, t_{\\alpha} = t_{0.01} = 2.403[\/latex].<br \/>\nThe lower bound for the upper-tailed interval is:<\/p>\n<p style=\"text-align: center;\">[latex](\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} \\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}} = (67 - 49) - 2.403 \\times \\sqrt{ \\frac{17^2}{135} + \\frac{18^2}{35}} = 9.887[\/latex].<\/p>\n<p>Thus, the corresponding 99% confidence interval for [latex]\\mu_1 - \\mu_2[\/latex] is [latex](9.887, \\infty)[\/latex].<br \/>\nInterpretation: we are 99% confident that the difference in average grades is at least 9.887 between attendees and non-attendees.<\/li>\n<li>Does the interval in part (b) support the conclusion in part a)?<br \/>\nIn part a), we reject [latex]H_0[\/latex] at the 1% significance level and claim that [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex].<br \/>\nIn part b), since the entire interval is above 0, we can claim that [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex] with 99% confidence, which supports the results obtained in part a).<\/li>\n<li>Based on the interval obtained in part b), can we claim that the class average of attendees is at least 5 marks higher than that of the non-attendees? How about 10 marks higher?<br \/>\nWe can claim that the class average of attendees is at least 5 marks higher than that of the non-attendees since the entire interval is above 5. However, we cannot claim that the class average of attendees is at least 10 marks higher than that of the non-attendees since the interval contains 10.<a id=\"retfig9.3\"><\/a><\/p>\n<figure id=\"attachment_1021\" aria-describedby=\"caption-attachment-1021\" style=\"width: 432px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-1021 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval.png\" alt=\"A number line shows how a confidence interval can be used to reject mu null. Image description available.\" width=\"432\" height=\"129\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval.png 432w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval-300x90.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval-65x19.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval-225x67.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2021\/06\/m09_Score_Average_Interval-350x105.png 350w\" sizes=\"auto, (max-width: 432px) 100vw, 432px\" \/><figcaption id=\"caption-attachment-1021\" class=\"wp-caption-text\"><strong>Figure 9.3<\/strong>: Confidence Interval of difference in Class Average. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig9.3\">Image Description (See Appendix D Figure 9.3)<\/a>]<\/figcaption><\/figure>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<h2><strong>9.2.2 Pooled Two-Sample <em>t<\/em> Test and <em>t<\/em> Interval<\/strong><\/h2>\n<p>If the two population standard deviations are equal, i.e., [latex]\\sigma_1 = \\sigma_2 = \\sigma[\/latex], we can pool the two samples together to get a better estimate of the common standard deviation [latex]\\sigma[\/latex]<\/p>\n<p>[latex]\\hat{\\sigma} = s_p = \\sqrt{ \\frac{(n_1 - 1)s_1^2 + (n_2 -1)s_2^2 } {(n_1 - 1) + (n_2 -1)}}[\/latex]<\/p>\n<p>where the term [latex](n_1 - 1)s_1^2 = \\sum_{\\text{sample 1}}(x - \\bar{x}_1)^2[\/latex] is the variation of the data within sample 1, and [latex](n_2 - 1)s_2^2 = \\sum_{\\text{sample 2}}(x - \\bar{x}_2)^2[\/latex] is the variation of the data within sample 2.<\/p>\n<p>Recall that the standard deviation of [latex]\\bar{X}_1 - \\bar{X}_2[\/latex] is [latex]\\sigma_{\\scriptsize \\bar{X}_1 - \\bar{X}_2} = \\sqrt{ \\frac{\\sigma_1^2}{n_1} + \\frac{\\sigma_2^2}{n_2} }[\/latex]. Thus, if [latex]\\sigma_1 = \\sigma_2 = \\sigma[\/latex], then [latex]\\sigma_{\\scriptsize \\bar{X}_1 - \\bar{X}_2}[\/latex] reduces to [latex]\\sqrt{ \\frac{\\sigma^2}{n_1} + \\frac{\\sigma^2}{n_2} } = \\sigma \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2} }[\/latex]. Estimating [latex]\\sigma[\/latex] with [latex]s_p[\/latex] leads to the pooled test statistic:<\/p>\n<p>[latex]t = \\frac{(\\bar{X}_1 - \\bar{X}_2) - (\\mu_1 - \\mu_2)}{s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2} } } \\sim \\text{$t$ distribution}[\/latex]<\/p>\n<p>with [latex]df = (n_1 - 1) + (n_2 -1) = n_1 + n_2 -2[\/latex].<\/p>\n<p>The assumption [latex]\\sigma_1 = \\sigma_2[\/latex] is very difficult to verify. Some textbooks suggest a rule of thumb:<\/p>\n<p><strong>If the ratio of the larger to the smaller sample standard deviation is less than 2, then the assumption is considered to be reasonable, i.e., [latex]\\frac{\\max \\{ s_1, s_2\\}}{\\min \\{ s_1, s_2\\}} < 2[\/latex]<\/strong>.<\/p>\n<div class=\"textbox\">\n<p><strong>Assumptions<\/strong>:<\/p>\n<ol>\n<li>Simple random samples.<\/li>\n<li>Independent samples.<\/li>\n<li>Normal populations or large sample sizes [latex](n_1 \\geq 30, n_2 \\geq 30)[\/latex].<\/li>\n<li>Equal population standard deviations. This assumption is reasonable if [latex]\\frac{\\max \\{ s_1, s_2\\}}{\\min \\{ s_1, s_2\\}} < 2[\/latex].<\/li>\n<\/ol>\n<p><strong>Steps<\/strong>:<\/p>\n<ol>\n<li>Set up the hypotheses:\n<div style=\"margin: auto;\">\n<table cellpadding=\"0\" style=\"border-spacing: 0px;\">\n<tbody>\n<tr>\n<td valign=\"top\" style=\"background-color: #F3F0F0; width: 217px;\"><strong>Two-tailed test<\/strong><\/td>\n<td valign=\"top\" style=\"background-color: #F3F0F0; width: 225px;\"><strong>Right (upper)-tailed test<\/strong><\/td>\n<td valign=\"top\" style=\"background-color: #F3F0F0; width: 225px;\"><strong>Left (lower)-tailed test<\/strong><\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" style=\"width: 217px;\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 225px;\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 225px;\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" style=\"width: 217px;\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 225px;\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 225px;\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Note that [latex]\\Delta_0[\/latex] can be zero or any value you want to test.<\/li>\n<li>State the significance level [latex]\\alpha[\/latex].<\/li>\n<li>Compute the value of the test statistic: [latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}}[\/latex], with [latex]df = n_1 + n_2 \u2013 2[\/latex] and [latex]s_p = \\sqrt{ \\frac{(n_1 - 1)s_1^2 + (n_2 -1)s_2^2 } {(n_1 - 1) + (n_2 -1)}}[\/latex].<\/li>\n<li>Use the t-score table (Table IV) to find the P-value or rejection region.<br \/>\n<table class=\"aligncenter first-col-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"border-bottom\">\n<td style=\"width: 16.3127%;\"><\/td>\n<th style=\"width: 30.5984%;\" scope=\"col\">\n<div style=\"margin: auto;\">Two-tailed<\/div>\n<\/th>\n<th style=\"width: 27.9924%;\" scope=\"col\">\n<div style=\"margin: auto;\">Right-tailed<\/div>\n<\/th>\n<th style=\"width: 25.0965%;\" scope=\"col\">\n<div style=\"margin: auto;\">Left-tailed<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"width: 16.3127%; width: 149px;\" scope=\"row\" valign=\"top\">Null<\/th>\n<td style=\"width: 30.5984%; width: 189px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 27.9924%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 25.0965%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 16.3127%; width: 149px;\" scope=\"row\" valign=\"top\">Alternative<\/th>\n<td style=\"width: 30.5984%; width: 189px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 27.9924%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"width: 25.0965%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 16.3127%; width: 149px;\" scope=\"row\" valign=\"top\">P-value<\/th>\n<td style=\"width: 30.5984%; width: 189px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]2P(t \\geq |t_o|)[\/latex]<\/div>\n<\/td>\n<td style=\"width: 27.9924%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]P(t \\geq t_o)[\/latex]<\/div>\n<\/td>\n<td style=\"width: 25.0965%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]P(t \\leq t_o)[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<th style=\"width: 16.3127%; width: 149px;\" scope=\"row\" valign=\"top\">Rejection region<\/th>\n<td style=\"width: 30.5984%; width: 189px;\" valign=\"top\">[latex]t \\geq t_{\\alpha \/ 2}[\/latex] or [latex]t \\leq - t_{\\alpha \/ 2}[\/latex]<\/td>\n<td style=\"width: 27.9924%; width: 180px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]t \\geq t_{\\alpha}[\/latex]<\/div>\n<\/td>\n<td style=\"width: 25.0965%; width: 142px;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]t \\leq - t_{\\alpha}[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>Decision: Reject the null [latex]H_0[\/latex] if P-value [latex]\\leq \\alpha[\/latex] or [latex]t_o[\/latex] falls in the rejection region.<\/li>\n<li>Conclusion.<\/li>\n<\/ol>\n<p>A [latex](1 - \\alpha) \\times 100%[\/latex] two-sample <em>t<\/em> confidence interval for [latex]\\mu_1 - \\mu_2[\/latex] is<\/p>\n<div style=\"margin: auto;\">\n<table style=\"width: 93.6296%; height: auto; border-spacing: 0px;\" cellpadding=\"1\">\n<thead>\n<tr class=\"shaded\">\n<th style=\"width: 26.2226%;\" scope=\"col\">\n<div style=\"margin: auto;\">Two-tailed<\/div>\n<\/th>\n<th style=\"width: 29.4327%;\" scope=\"col\">\n<div style=\"margin: auto;\">Right-tailed<\/div>\n<\/th>\n<th style=\"width: 31.6039%;\" scope=\"col\">\n<div style=\"margin: auto;\">Left-tailed<\/div>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: auto;\">\n<td style=\"height: auto; width: 26.2226%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 = \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 29.4327%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\leq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 31.6039%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_0: \\mu_1 - \\mu_2 \\geq \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: auto;\">\n<td style=\"height: auto; width: 26.2226%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\neq \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 29.4327%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<td style=\"height: auto; width: 31.6039%;\" valign=\"top\">\n<div style=\"margin: auto;\">[latex]H_a: \\mu_1 - \\mu_2 \\: \\lt \\: \\Delta_0[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr style=\"height: auto;\">\n<td style=\"height: auto; width: 26.2226%;\" valign=\"top\">[latex]\\small{(\\bar{x}_1 - \\bar{x}_2) \\pm t_{\\alpha \/ 2} s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}}[\/latex]<\/td>\n<td style=\"height: auto; width: 29.4327%;\" valign=\"top\">[latex]\\small{\\left((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}, \\infty \\right)}[\/latex]<\/td>\n<td style=\"height: auto; width: 31.6039%;\" valign=\"top\">[latex]\\small{\\left(- \\infty , (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \u00a0s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}\\right)}[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Pooled Two-Sample t Test and Interval<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Some students attend class regularly, but some do not. An instructor wants to compare the class averages for those who attend lectures regularly ([latex]\\mu_1[\/latex]) with those who do not ([latex]\\mu_2[\/latex]). A simple random sample of size [latex]n_1=135[\/latex] is selected from the attendees, and a simple random sample of size [latex]n_2=35[\/latex] is taken from the non-attendees. The sample mean and sample standard deviation for attendees are [latex]\\bar{x}_1 = 67, s_1 = 17[\/latex]; and for non-attendees are [latex]\\bar{x}_2 = 49, s_2 = 18[\/latex].<\/p>\n<ol type=\"a\">\n<li>Is it reasonable to conduct a pooled two-sample <i>t-test<\/i>\u00a0to test whether those who attend lectures have a <strong>higher average<\/strong>? If yes, run the test at the 1% significance level.<\/li>\n<\/ol>\n<p style=\"padding-left: 40px;\"><strong>Check the assumptions<\/strong>:<\/p>\n<ol>\n<li>We have simple random samples.<\/li>\n<li>The two samples are independent.<\/li>\n<li>We have large sample sizes [latex](n_1 = 135 > 30, n_2 =35 > 30)[\/latex].<\/li>\n<li>Equal standard deviation [latex]\\frac{\\max \\{ s_1, s_2 \\} }{\\min \\{ s_1, s_2 \\}} = \\frac{\\max \\{ 17, 18 \\}}{\\min \\{ 17, 18 \\}} = \\frac{18}{17} < 2[\/latex].<\/li>\n<\/ol>\n<p>It is reasonable to conduct a pooled two-sample t-test since all the assumptions for pooled two-sample t-test\u00a0are met.<br \/>\n<strong><br \/>\nSteps<\/strong>:<\/p>\n<ol type=\"a\">\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Set up the hypotheses: [latex]H_0: \\mu_1 - \\mu_2 \\leq 0[\/latex] versus [latex]H_a: \\mu_1 - \\mu_2 \\: \\gt \\: 0[\/latex]. This is a right-tailed test.<\/li>\n<li>The significance level is [latex]\\alpha=0.01[\/latex].<\/li>\n<li>Compute the value of the test statistic:<br \/>\n[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{s_p \\sqrt{ \\frac{1}{n_1} + \\frac{1}{n_2}}} = \\frac{(67-49) - 0}{17.207 \\sqrt{ \\frac{1}{135} + \\frac{1}{35}}} = 5.515[\/latex] with [latex]df = n_1 + n_2 \u2013 2 = 135+35\u20132=168[\/latex] (not given in Table IV, use df=100), and with<br \/>\n[latex]s_p = \\sqrt{ \\frac{(n_1 - 1)s_1^2 + (n_2 -1)s_2^2 } {n_1 + n_2 -2}} = \u00a0\\sqrt{ \\frac{(135 - 1)17^2 + (35 -1)18^2 } {135 + 35 - 2}} = 17.207.[\/latex]<\/li>\n<li>Find the P-value. For a right-tailed test with the observed test statistics [latex]t_o=5.515[\/latex], the P-value is the area to the right of [latex]t_o[\/latex] i.e., p-value [latex]=P(t \\geq t_o) = P(t \\geq 5.515) < 0.0005[\/latex], since [latex]t_o=5.515 \\: \\gt \\: 3.390 (t_{0.0005})[\/latex] with [latex]df=100[\/latex].<\/li>\n<li>Decision: Since the P-value [latex]<0.0005< 0.01(\\alpha)[\/latex] reject the null hypothesis [latex]H_0[\/latex]<\/li>\n<li>Conclusion: At the 1% significance level, the data provide sufficient evidence that those who attend lectures have a <strong>higher average<\/strong>.<\/li>\n<\/ol>\n<\/li>\n<li>Obtain a confidence interval for the difference between the class average for attendees and non-attendees, [latex]\\mu_1 - \\mu_2[\/latex], corresponding to the test in part a).<br \/>\nPart a) contains a right-tailed test at the 1% significance level. Therefore, we should obtain a 99% upper-tailed interval [latex]((\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2} }, \\infty)[\/latex], with [latex]\\alpha=0.01, df=100[\/latex], and [latex]t_{0.01}=2.364[\/latex]. The lower bound for the upper-tailed interval is [latex]\\begin{align*} (\\bar{x}_1 - \\bar{x}_2) - t_{\\alpha} s_p \\sqrt{\\frac{1}{n_1} + \\frac{1}{n_2} } &= (67 - 49) - 2.364 \\times 17.207 \\times \\sqrt{\\frac{1}{135} + \\frac{1}{35}} \\\\ &= 10.284. \\end{align*}[\/latex] Thus, the corresponding 99% confidence interval for [latex]\\mu_1 - \\mu_2[\/latex] is \u00a0[latex](10.284, \\infty)[\/latex].<br \/>\n<strong>Interpretation<\/strong>: we are 99% confident that the difference in average grades is at least 10.284 between attendees and non-attendees.<\/li>\n<li>Based on the confidence interval in part b), can we claim that the class average of attendees is at least 10 marks higher than that of the non-attendees?<br \/>\nYes, since the entire interval is above 10, we can claim that [latex]\\mu_1 - \\mu_2 \\: \\gt \\: 10[\/latex].<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div style=\"height: 55px; margin-top: 5px;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png 250w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-65x13.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-225x45.png 225w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/div>\n<div><\/div>\n<div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Two-Sample Test<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>The following table summarizes the operative times of neurosurgeries conducted by a dynamic system (Z-plate) and a static system (ALPS plate).<\/p>\n<p style=\"text-align: center;\"><strong>Table 9.1<\/strong>: Operating Time of Dynamic and Static System<\/p>\n<div style=\"margin: auto;\">\n<table class=\"aligncenter\" cellpadding=\"0\" style=\"border-spacing: 0px;\">\n<tbody>\n<tr>\n<td valign=\"top\" style=\"background-color: #F3F0F0; width: 189px;\">\n<div style=\"margin: auto;\"><strong>Dynamic<\/strong><\/div>\n<\/td>\n<td valign=\"top\" style=\"background-color: #F3F0F0; width: 189px;\">\n<div style=\"margin: auto;\"><strong>Static<\/strong><\/div>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" style=\"width: 189px;\">\n<div style=\"margin: auto;\">[latex]\\bar{x}_1 = 400[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 189px;\">\n<div style=\"margin: auto;\">[latex]\\bar{x}_2 = 480[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" style=\"width: 189px;\">\n<div style=\"margin: auto;\">[latex]s_1 = 85[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 189px;\">\n<div style=\"margin: auto;\">[latex]s_2 = 40[\/latex]<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td valign=\"top\" style=\"width: 189px;\">\n<div style=\"margin: auto;\">[latex]n_1 = 60[\/latex]<\/div>\n<\/td>\n<td valign=\"top\" style=\"width: 189px;\">\n<div style=\"margin: auto;\">[latex]n_2 = 30[\/latex]<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ol type=\"a\">\n<li>Test at the 5% significance level whether the dynamic system (Z-plate) has a lower mean operative time than the static system (ALPS plate).<\/li>\n<li>Obtain a confidence interval for the difference in mean operative time between the dynamic and the static systems, [latex]\\mu_1 - \\mu_2[\/latex], corresponding to the test in part a).<\/li>\n<\/ol>\n<details>\n<summary>Show\/Hide Answer<\/summary>\n<ol type=\"a\">\n<li><strong>Check the assumptions<\/strong>:\n<ol>\n<li>We have simple random samples.<\/li>\n<li>The two samples are independent.<\/li>\n<li>We have large sample sizes [latex]n_1 = 60 > 30, n_2 = 30 \\geq 30[\/latex].<\/li>\n<li>Equal standard deviations [latex]\\frac{\\max \\{ s_1, s_2 \\} }{\\min \\{ s_1, s_2 \\}} = \\frac{\\max \\{ 85, 40 \\}}{\\min \\{ 85, 40 \\}} = \\frac{85}{40} \\: \\gt \\: 2[\/latex].<\/li>\n<\/ol>\n<p>Since the equal standard deviation assumption is violated, we should use the non-pooled two-sample <i>t-test<\/i>.<\/p>\n<p><strong>Steps<\/strong>:<\/p>\n<ol>\n<li>Set up the hypotheses: [latex]H_0: \\mu_1 - \\mu_2 \\geq 0[\/latex] versus [latex]H_a: \\mu_1 - \\mu_2 < 0[\/latex].\nThis is a left-tailed test.<\/li>\n<li>The significance level is [latex]\\alpha = 0.05[\/latex].<\/li>\n<li>Compute the value of the test statistic:[latex]t_o = \\frac{(\\bar{x}_1 - \\bar{x}_2) - \\Delta_0}{\\sqrt{ \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2}}} = \\frac{(400 - 480) - 0}{\\sqrt{ \\frac{85^2}{60} + \\frac{40^2}{30}}} = -6.069[\/latex] with[latex]df = \\frac{ \\left( \\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} \\right)^2}{\\frac{1}{n_1 - 1} \\left( \\frac{s_1^2}{n_1} \\right)^2 + \\frac{1}{n_2 - 1} \\left( \\frac{s_2^2}{n_2} \\right)^2 } = \\frac{ \\left( \\frac{85^2}{60} + \\frac{40^2}{30} \\right)^2}{\\frac{1}{60 - 1} \\left( \\frac{85^2}{60} \\right)^2 + \\frac{1}{30 - 1} \\left( \\frac{40^2}{30} \\right)^2 } = 87.797,[\/latex] rounded down to [latex]df = 87[\/latex].<\/li>\n<li>Find the P-value. For a left-tailed test with the observed test statistics [latex]t_o = \u2013 6.069[\/latex], the P-value is the area to the left of [latex]t_o[\/latex], i.e., [latex]\\mbox{P-value} = P(t \\leq t_o) = P(t \\leq -6.069) = P(t \\geq 6.069) < 0.0005,[\/latex] since [latex]6.069 \\: \\gt \\: 3.406(t_{0.0005})[\/latex].<\/li>\n<li>Decision: Since the P-value [latex]< 0.0005 < 0.05 (\\alpha)[\/latex], reject the null hypothesis [latex]H_0[\/latex].<\/li>\n<li>Conclusion: At the 5% significance level, the data provide sufficient evidence that the dynamic system (Z-plate) has a lower mean operative time than the static system (ALPS plate).<\/li>\n<\/ol>\n<\/li>\n<li>For a left-tailed test at the 5% significance level, the corresponding confidence interval is a 95% lower-tailed interval [latex]( - \\infty, (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} })[\/latex] with the upper confidence bound [latex](\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} } = (400 - 480) + 1.663 \\times \\sqrt{ \\frac{85^2}{60} + \\frac{40^2}{30}} = -58.079.[\/latex] Note that for [latex]df=87[\/latex], [latex]t_{0.05}=1.663[\/latex]. Therefore, the 95% lower-tailed interval is [latex]( - \\infty, (\\bar{x}_1 - \\bar{x}_2) + t_{\\alpha} \\sqrt{\\frac{s_1^2}{n_1} + \\frac{s_2^2}{n_2} }) = (- \\infty , -58.079)[\/latex].<br \/>\n<strong>Interpretation<\/strong>: we are 95% confident that the difference in mean operative time between the dynamic and the static systems is below -58.097. Since the entire interval is below 0, we can claim that [latex]\\mu_1 - \\mu_2 < 0[\/latex], which supports the conclusion of the hypothesis test in part a).<\/li>\n<\/ol>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"height: 55px; margin-top: 5px;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/instructornote.png\" alt=\"\" width=\"250\" height=\"50\" \/><\/div>\n<p>It is safer to use the non-pooled two-sample [latex]t[\/latex] test if we are not sure whether the two population standard deviations are equal. Use the pooled two-sample [latex]t[\/latex] test only if we have evidence that the population standard deviations are equal. For example, we can use the pooled two-sample [latex]t[\/latex] test when we compare two independent groups in a one-way ANOVA (analysis of variance) analysis since equal standard deviation is one of the assumptions of the one-way ANOVA F test which will be covered in Chapter 13.<\/p>\n","protected":false},"author":19,"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-1017","chapter","type-chapter","status-publish","hentry"],"part":1007,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/users\/19"}],"version-history":[{"count":108,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1017\/revisions"}],"predecessor-version":[{"id":5595,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1017\/revisions\/5595"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/1007"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/1017\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=1017"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=1017"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=1017"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=1017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}