{"id":1392,"date":"2023-06-22T02:22:37","date_gmt":"2023-06-22T02:22:37","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/chi-square-test-of-homogeneity-background-youll-need-1\/"},"modified":"2025-05-16T23:03:56","modified_gmt":"2025-05-16T23:03:56","slug":"chi-square-test-of-homogeneity-background-youll-need-1","status":"publish","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/introstatstest\/chapter\/chi-square-test-of-homogeneity-background-youll-need-1\/","title":{"raw":"Module 14: Background You'll Need 2","rendered":"Module 14: Background You&#8217;ll Need 2"},"content":{"raw":"<section class=\"textbox learningGoals\">\r\n<ul>\r\n\t<li>Compute relative frequencies<\/li>\r\n<\/ul>\r\n<\/section>\r\n<h2>Flight Frequencies<\/h2>\r\n<p><strong>Research question<\/strong>: Do different airlines have the same distribution of flight status (whether the flight is on-time, delayed, canceled, or diverted)?<\/p>\r\n<p>To answer this research question, we need to compare the distributions of a categorical variable for multiple populations. Our categorical variable will be <em>flight status<\/em>, and the populations we are comparing are the flights for different airlines. The values of our categorical variable are On-Time, Delayed, Canceled, and Diverted.<\/p>\r\n<p>The following table is a <strong>two-way<\/strong> <strong>table <\/strong>(also called a <strong>contingency table<\/strong>), and it gives the counts for each value of the variable <em>flight status<\/em> for Delta Airlines and Southwest Airlines arrivals at the Atlanta airport in March 2021.[footnote]U.S. Department of Transportation, Bureau of Transportation Statistics. (n.d.). On-time performance - Reporting operating carrier flight delays at a glance. https:\/\/www.transtats.bts.gov\/HomeDrillChart_Month.asp?5ry_lrn4=FDFD&amp;N44_Qry=E&amp;5ry_Pn44vr4=DDD&amp;5ry_Nv42146=DDD&amp;heY_fryrp6lrn4=FDFE&amp;heY_fryrp6Z106u=F[\/footnote] Notice that each row gives the distribution of flight status for an individual airline.<\/p>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>&nbsp;<\/td>\r\n<td><strong>On-Time Flights<\/strong><\/td>\r\n<td><strong>Delayed Flights<\/strong><\/td>\r\n<td><strong>Canceled Flights<\/strong><\/td>\r\n<td><strong>Diverted Flights<\/strong><\/td>\r\n<td><strong>Total<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Delta Airlines<\/strong><\/td>\r\n<td>12,716<\/td>\r\n<td>904<\/td>\r\n<td>23<\/td>\r\n<td>8<\/td>\r\n<td>13,651<\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Southwest Airlines<\/strong><\/td>\r\n<td>2,240<\/td>\r\n<td>299<\/td>\r\n<td>22<\/td>\r\n<td>1<\/td>\r\n<td>2,562<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div>\r\n<section class=\"textbox example\">For Delta Airlines, we can find the relative frequency of on-time flights, or the proportion of on-time flights, by looking at the ratio of on-time flights to the total number of flights:\r\n\r\n<p style=\"text-align: center;\">[latex]\\text{Relative Frequency} = \\dfrac{\\text{the number of times a value of the data occurs}}{\\text{the total number of outcomes}}=\\dfrac{12,716}{13,651}\\approx0.9315[\/latex]<\/p>\r\n<p>So, about [latex]93.15\\%[\/latex] of Delta Airlines\u2019 arriving flights in Atlanta in March 2021 were on time.<\/p>\r\n<p>We can perform a similar computation for each value of the variable <em>flight status<\/em> to obtain the relative frequency distribution of flight status for Delta Airlines in terms of percentages, as shown in the following table.<\/p>\r\n<table>\r\n<tbody>\r\n<tr>\r\n<td>&nbsp;<\/td>\r\n<td><strong>On-Time Percentage Flights<\/strong><\/td>\r\n<td><strong>Delayed Percentage Flights<\/strong><\/td>\r\n<td><strong>Canceled Percentage Flights<\/strong><\/td>\r\n<td><strong>Diverted Percentage Flights<\/strong><\/td>\r\n<td><strong>Total<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td><strong>Delta Airlines<\/strong><\/td>\r\n<td>93.15%<\/td>\r\n<td>6.62%<\/td>\r\n<td>0.17%<\/td>\r\n<td>0.06%<\/td>\r\n<td>100%<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/section>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]2380[\/ohm2_question]<\/section>\r\n<p>We can also consider the total number of flights for each value of the variable <em>flight status<\/em> and look at the overall relative frequency for each.<\/p>\r\n<section class=\"textbox example\">For example, there were [latex]12,716 + 2,240 = 14,956[\/latex] on-time flights in total for both airlines. The total number of flights overall for both airlines was [latex]13,651 + 2,562 = 16,213[\/latex] flights. Then, the overall relative frequency for on-time flights was:\r\n\r\n<p style=\"text-align: center;\">[latex]\\dfrac{14,956}{16,213}\\approx0.92246962[\/latex]<\/p>\r\n<p>So, about [latex]92.25\\%[\/latex] of flights were on time for both airlines combined. In this case, we will keep more decimal places to avoid rounding errors in our next computations.<\/p>\r\n<\/section>\r\n<section class=\"textbox tryIt\">[ohm2_question hide_question_numbers=1]2382[\/ohm2_question]<\/section>\r\n<\/div>","rendered":"<section class=\"textbox learningGoals\">\n<ul>\n<li>Compute relative frequencies<\/li>\n<\/ul>\n<\/section>\n<h2>Flight Frequencies<\/h2>\n<p><strong>Research question<\/strong>: Do different airlines have the same distribution of flight status (whether the flight is on-time, delayed, canceled, or diverted)?<\/p>\n<p>To answer this research question, we need to compare the distributions of a categorical variable for multiple populations. Our categorical variable will be <em>flight status<\/em>, and the populations we are comparing are the flights for different airlines. The values of our categorical variable are On-Time, Delayed, Canceled, and Diverted.<\/p>\n<p>The following table is a <strong>two-way<\/strong> <strong>table <\/strong>(also called a <strong>contingency table<\/strong>), and it gives the counts for each value of the variable <em>flight status<\/em> for Delta Airlines and Southwest Airlines arrivals at the Atlanta airport in March 2021.<a class=\"footnote\" title=\"U.S. Department of Transportation, Bureau of Transportation Statistics. (n.d.). On-time performance - Reporting operating carrier flight delays at a glance. https:\/\/www.transtats.bts.gov\/HomeDrillChart_Month.asp?5ry_lrn4=FDFD&amp;N44_Qry=E&amp;5ry_Pn44vr4=DDD&amp;5ry_Nv42146=DDD&amp;heY_fryrp6lrn4=FDFE&amp;heY_fryrp6Z106u=F\" id=\"return-footnote-1392-1\" href=\"#footnote-1392-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a> Notice that each row gives the distribution of flight status for an individual airline.<\/p>\n<table>\n<tbody>\n<tr>\n<td>&nbsp;<\/td>\n<td><strong>On-Time Flights<\/strong><\/td>\n<td><strong>Delayed Flights<\/strong><\/td>\n<td><strong>Canceled Flights<\/strong><\/td>\n<td><strong>Diverted Flights<\/strong><\/td>\n<td><strong>Total<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Delta Airlines<\/strong><\/td>\n<td>12,716<\/td>\n<td>904<\/td>\n<td>23<\/td>\n<td>8<\/td>\n<td>13,651<\/td>\n<\/tr>\n<tr>\n<td><strong>Southwest Airlines<\/strong><\/td>\n<td>2,240<\/td>\n<td>299<\/td>\n<td>22<\/td>\n<td>1<\/td>\n<td>2,562<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div>\n<section class=\"textbox example\">For Delta Airlines, we can find the relative frequency of on-time flights, or the proportion of on-time flights, by looking at the ratio of on-time flights to the total number of flights:<\/p>\n<p style=\"text-align: center;\">[latex]\\text{Relative Frequency} = \\dfrac{\\text{the number of times a value of the data occurs}}{\\text{the total number of outcomes}}=\\dfrac{12,716}{13,651}\\approx0.9315[\/latex]<\/p>\n<p>So, about [latex]93.15\\%[\/latex] of Delta Airlines\u2019 arriving flights in Atlanta in March 2021 were on time.<\/p>\n<p>We can perform a similar computation for each value of the variable <em>flight status<\/em> to obtain the relative frequency distribution of flight status for Delta Airlines in terms of percentages, as shown in the following table.<\/p>\n<table>\n<tbody>\n<tr>\n<td>&nbsp;<\/td>\n<td><strong>On-Time Percentage Flights<\/strong><\/td>\n<td><strong>Delayed Percentage Flights<\/strong><\/td>\n<td><strong>Canceled Percentage Flights<\/strong><\/td>\n<td><strong>Diverted Percentage Flights<\/strong><\/td>\n<td><strong>Total<\/strong><\/td>\n<\/tr>\n<tr>\n<td><strong>Delta Airlines<\/strong><\/td>\n<td>93.15%<\/td>\n<td>6.62%<\/td>\n<td>0.17%<\/td>\n<td>0.06%<\/td>\n<td>100%<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/section>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm2380\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=2380&theme=lumen&iframe_resize_id=ohm2380&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<p>We can also consider the total number of flights for each value of the variable <em>flight status<\/em> and look at the overall relative frequency for each.<\/p>\n<section class=\"textbox example\">For example, there were [latex]12,716 + 2,240 = 14,956[\/latex] on-time flights in total for both airlines. The total number of flights overall for both airlines was [latex]13,651 + 2,562 = 16,213[\/latex] flights. Then, the overall relative frequency for on-time flights was:<\/p>\n<p style=\"text-align: center;\">[latex]\\dfrac{14,956}{16,213}\\approx0.92246962[\/latex]<\/p>\n<p>So, about [latex]92.25\\%[\/latex] of flights were on time for both airlines combined. In this case, we will keep more decimal places to avoid rounding errors in our next computations.<\/p>\n<\/section>\n<section class=\"textbox tryIt\"><iframe loading=\"lazy\" id=\"ohm2382\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=2382&theme=lumen&iframe_resize_id=ohm2382&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><\/section>\n<\/div>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-1392-1\">U.S. Department of Transportation, Bureau of Transportation Statistics. (n.d.). On-time performance - Reporting operating carrier flight delays at a glance. https:\/\/www.transtats.bts.gov\/HomeDrillChart_Month.asp?5ry_lrn4=FDFD&amp;N44_Qry=E&amp;5ry_Pn44vr4=DDD&amp;5ry_Nv42146=DDD&amp;heY_fryrp6lrn4=FDFE&amp;heY_fryrp6Z106u=F <a href=\"#return-footnote-1392-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":8,"menu_order":3,"template":"","meta":{"_candela_citation":"[]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":1388,"module-header":"background_you_need","content_attributions":[],"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1392"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/users\/8"}],"version-history":[{"count":6,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1392\/revisions"}],"predecessor-version":[{"id":6856,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1392\/revisions\/6856"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/parts\/1388"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapters\/1392\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/media?parent=1392"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/pressbooks\/v2\/chapter-type?post=1392"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/contributor?post=1392"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/introstatstest\/wp-json\/wp\/v2\/license?post=1392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}