{"id":160,"date":"2020-06-22T19:58:13","date_gmt":"2020-06-22T23:58:13","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=160"},"modified":"2025-05-07T17:31:37","modified_gmt":"2025-05-07T21:31:37","slug":"1-4-organizing-data","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/1-4-organizing-data\/","title":{"raw":"1.4 Organizing Data","rendered":"1.4 Organizing Data"},"content":{"raw":"Next, we focus on presenting and summarizing data using different tables and figures.\r\n\r\nGiven a set of data, how can you present the data? It is essential to plot the data before conducting any data analysis. The definition of descriptive statistics tells us we can use tables and graphs to present the data. Different tables and graphs are used to describe the two different types of data\u2014qualitative and quantitative. Let us start with qualitative variables, then continuous and then discrete variables.\r\n<h2>1.4.1 Organizing Qualitative Data<\/h2>\r\nNumerically, we can use frequency or relative frequency tables to summarize qualitative\/categorical data. Graphically, we can use pie charts or bar charts.\r\n\r\nThe distribution of a qualitative variable is given in a <strong>frequency (relative frequency) table<\/strong>. For example, the students were asked, \"How you came to school today?\" Fifty-three students answered by car, 136 by public transportation, nine by bicycle, 74 by walking, and one by other means. The results are summarized in the following table.\r\n<p style=\"text-align: center;\"><strong>Table 1.3<\/strong>: Frequency and Relative Frequency Table of \"Transportation\"<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"aligncenter\" style=\"width: 100%; height: 155px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"1\">\r\n<thead>\r\n<tr style=\"height: 37px;\">\r\n<td style=\"height: 37px; width: 26.49122807017544%;\" bgcolor=\"#F3F0F0\" width=\"244\"><strong>Transportation<\/strong><\/td>\r\n<td style=\"height: 37px; width: 15.478070175438596%;\" bgcolor=\"#F3F0F0\" width=\"219\"><strong>Frequency<\/strong><\/td>\r\n<td style=\"height: 37px; width: 31.013157894736842%;\" bgcolor=\"#F3F0F0\" width=\"319\"><strong>Relative Frequency<\/strong><\/td>\r\n<td style=\"height: 37px; width: 26.842105263157894%;\" bgcolor=\"#F3F0F0\" width=\"336\"><strong>Percentage<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"height: 22px; width: 26.49122807017544%;\">Car<\/td>\r\n<td style=\"height: 22px; width: 15.478070175438596%;\">53<\/td>\r\n<td style=\"height: 22px; width: 31.013157894736842%;\">53\/273 = 0.1941<\/td>\r\n<td style=\"height: 22px; width: 26.842105263157894%;\">19.41%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"height: 22px; width: 26.49122807017544%;\">Public<\/td>\r\n<td style=\"height: 22px; width: 15.478070175438596%;\">136<\/td>\r\n<td style=\"height: 22px; width: 31.013157894736842%;\">136\/273 = 0.4982<\/td>\r\n<td style=\"height: 22px; width: 26.842105263157894%;\">49.82%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"height: 22px; width: 26.49122807017544%;\">Bicycle<\/td>\r\n<td style=\"height: 22px; width: 15.478070175438596%;\">9<\/td>\r\n<td style=\"height: 22px; width: 31.013157894736842%;\">9\/273 = 0.0330<\/td>\r\n<td style=\"height: 22px; width: 26.842105263157894%;\">3.30%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 22px;\">\r\n<td style=\"height: 22px; width: 26.49122807017544%;\">Walking<\/td>\r\n<td style=\"height: 22px; width: 15.478070175438596%;\">74<\/td>\r\n<td style=\"height: 22px; width: 31.013157894736842%;\">74\/273 = 0.2710<\/td>\r\n<td style=\"height: 22px; width: 26.842105263157894%;\">27.10%<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"width: 26.4912%; height: 15px;\">Other<\/td>\r\n<td style=\"width: 15.4781%; height: 15px;\">1<\/td>\r\n<td style=\"width: 31.0132%; height: 15px;\">1\/273 = 0.0037<\/td>\r\n<td style=\"width: 26.8421%; height: 15px;\">0.36%<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<tfoot>\r\n<tr class=\"shaded\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 26.49122807017544%;\"><strong>Total<\/strong><\/td>\r\n<td style=\"height: 15px; width: 15.478070175438596%;\">273<\/td>\r\n<td style=\"height: 15px; width: 31.013157894736842%;\">1.000<\/td>\r\n<td style=\"height: 15px; width: 26.842105263157894%;\">100%<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<\/table>\r\n<\/div>\r\n<ul>\r\n \t<li>The first column gives all possible outcomes of the variable, which are called categories.<\/li>\r\n \t<li>The second column gives the number of observations falling into each category; we call this number the <strong>frequency<\/strong> of that category. For example, the frequency of taking public transit is 136.<\/li>\r\n \t<li>The third column gives the <strong>relative frequency<\/strong>, which is calculated as:\r\n<p style=\"text-align: center;\">[latex]\\text{relative frequency} = \\frac{\\text{frequency}}{\\text{total}}.[\/latex]<\/p>\r\nFor example, the relative frequency of taking public transit is 0.4982, which means 49.82% of the students came to school by public transit. Note that the relative frequencies always add up to 1 across all the categories.<\/li>\r\n \t<li>The fourth column gives the percentage, which is calculated as [latex]\\text{percentage=relative frequency}\\times 100[\/latex].<\/li>\r\n<\/ul>\r\nBased on the (relative) frequency table, we can draw a bar chart or a pie chart to summarize the data.\r\n<ul>\r\n \t<li>A <strong>bar chart<\/strong> represents each category with a bar whose height equals each category's relative frequency or frequency. The bars are plotted next to each other without touching each other. One bar for one category.<\/li>\r\n \t<li>A <strong>pie chart<\/strong> is a disc divided into wedge-shaped pieces whose areas are proportional to the relative frequencies. One slice for one category, the angle of each slice = relative frequency x 360\u00b0.<a id=\"retfig1.2\"><\/a><\/li>\r\n<\/ul>\r\n[caption id=\"attachment_66\" align=\"aligncenter\" width=\"1625\"]<img class=\"wp-image-66 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170.png\" alt=\"A bar graph on the left panel showing relative frequency of how students came to school. A pie chart on the right panel showing percentages of how students came to school. Image description available.\" width=\"1625\" height=\"771\" \/> <strong>Figure 1.2<\/strong>: Bar Chart (left panel) and Pie Chart (right panel) of \"Transportation\" [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.2\">Image Description (See Appendix D Figure 1.2)<\/a>][\/caption]If the bar chart and pie chart are generated based on counts, the charts won't change except for the scale\u2014the relative frequency in the bar chart and the percentage in the pie chart will be replaced by counts or frequency.\r\n\r\nSuppose that another qualitative variable recorded in the study was \"gender.\", we can also present the data characterized by two qualitative variables in what is referred to as a <strong>contingency table<\/strong>. Below is the contingency table with the two qualitative variables, gender and transport:\r\n<p style=\"text-align: center;\"><strong>Table 1.4<\/strong>: Contingency Table of \"Gender\" and \"Transportation\"<\/p>\r\n\r\n<table class=\"aligncenter first-col-border last-col-border\" style=\"width: 100%; height: 75px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"1\">\r\n<thead>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 12.249999999999998%;\"><\/td>\r\n<th class=\"border-top\" style=\"height: 15px; width: 16.375%;\" scope=\"col\" width=\"70\"><span class=\"bluetext\">Car <\/span><\/th>\r\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%;\" scope=\"col\" width=\"70\"><span class=\"bluetext\">Public<\/span><\/th>\r\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%;\" scope=\"col\" width=\"70\"><span class=\"bluetext\">Bicycle<\/span><\/th>\r\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%;\" scope=\"col\" width=\"70\"><span class=\"bluetext\">Walking<\/span><\/th>\r\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%;\" scope=\"col\" width=\"70\"><span class=\"bluetext\">Others<\/span><\/th>\r\n<th class=\"border-top\" style=\"height: 15px; width: 14.374999999999998%;\" scope=\"col\" width=\"70\"><strong>Total<\/strong><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 12.249999999999998%;\" scope=\"row\"><span class=\"redtext\">Female<\/span><\/th>\r\n<td style=\"height: 15px; width: 16.375%;\"><strong>25<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>80<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>5<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>38<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>0<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.374999999999998%;\"><span class=\"redtext\">148<\/span><\/td>\r\n<\/tr>\r\n<tr class=\"border-bottom\" style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 12.249999999999998%;\" scope=\"row\"><span class=\"redtext\">Male<\/span><\/th>\r\n<td style=\"height: 15px; width: 16.375%;\"><strong>28<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>56<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>4<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>36<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>1<\/strong><\/td>\r\n<td style=\"height: 15px; width: 14.374999999999998%;\"><span class=\"redtext\">125<\/span><\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<th style=\"height: 15px; width: 12.249999999999998%;\" scope=\"row\"><strong>Total<\/strong><\/th>\r\n<td style=\"height: 15px; width: 16.375%;\"><span class=\"bluetext\">53<\/span><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">136<\/span><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">9<\/span><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">74<\/span><\/td>\r\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">1<\/span><\/td>\r\n<td style=\"height: 15px; width: 14.374999999999998%;\">273<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nThe variable \"<strong class=\"redtext\">Gender<\/strong>\" is called <strong class=\"redtext\">the row variable<\/strong> (shown in red font in the table) and \"<span class=\"bluetext\"><strong>Transportation<\/strong><\/span><strong>\"<\/strong> is the <strong class=\"bluetext\">column variable <\/strong>(shown in blue font in the table). The totals \"148\" and \"125\" (in red) are called <strong class=\"redtext\">row totals<\/strong> (sum across transportation for each category of \"gender\"). The totals \"53,\" \"136,\" \"9,\" \"74,\" \"1\" are called <strong class=\"bluetext\">column totals<\/strong> (sum across gender for each category of \"Transportation\"), and \"273\" is the <strong>grand total<\/strong>. Those 10 numbers in bold are called <strong>cells<\/strong>.\r\n\r\nOne interesting question is whether the pattern of transportation among females is the same as that among males. We can compare the relative frequencies of all the categories for females with their counterparts among males. There are 148 female students and 125 male students in total; therefore, the relative frequencies of the five categories for females are 25\/148, 80\/148, 5\/148, 38\/148, 0\/148 as compared to 28\/125, 56\/125, 4\/125, 36\/125, 1\/125 for males.\r\n\r\nThe distributions of \"transportation\" for females and males can be compared graphically using a side-by-side pie chart and a side-by-side bar chart.<a id=\"retfig1.3\"><\/a>\r\n\r\n[caption id=\"attachment_74\" align=\"aligncenter\" width=\"1891\"]<img class=\"wp-image-74 size-full\" style=\"color: #373d3f; font-weight: bold; font-size: 1em;\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368.png\" alt=\"A pie chart for female on the left panel showing percentages of how female students came to school. Image description available.\" width=\"1891\" height=\"746\" \/> <strong>Figure 1.3<\/strong>: Side-by-side pie Chart of \"Transportation\" for Females and Males. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.3\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.3\">(See Appendix D Figure 1.3)<\/a>][\/caption]The side-by-side pie chart shows that the patterns in transportation among females and male are very similar, since the two pie charts are almost identical. The side-by-side bar chart based on the <strong>relative<\/strong> <strong>frequency<\/strong> gives the same conclusion: the distributions of \"transportation\" for female and male are very similar, which implies there is no significant difference between female and male in the way they come to school.<a id=\"retfig1.4\"><\/a>\r\n\r\n[caption id=\"attachment_73\" align=\"aligncenter\" width=\"598\"]<img class=\"wp-image-73 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart.png\" alt=\"A side-by-side bar graph comparing relative frequency of how female and male students came to school. Image description available.\" width=\"598\" height=\"500\" \/> <strong>Figure 1.4<\/strong>: Side-by-Side Bar Chart of \"Transportation\" for Female and Male. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.4\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.4\">(See Appendix D Figure 1.4)<\/a>][\/caption]\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\nWhen we compare the distributions of two different groups using a side-by-side bar chart, we should use the relative frequency as the y-axis. Using frequency as the y-axis and comparing the frequencies alone, without taking into account the total of each group, can be misleading.\r\n<h2>1.4.2 Organizing Quantitative Discrete Data<\/h2>\r\nWe are able to list all possible values for a quantitative discrete variable; therefore, for a quantitative discrete variable with only a few different values, we can describe it using tools similar to those for qualitative variables, i.e., a (relative) frequency table and histogram.\r\n\r\nA histogram is somewhat similar to a bar chart. The x-axis shows the value of the variable of interest and the y-axis displays either frequencies or relative frequencies. Histograms can be used to describe both quantitative discrete and quantitative continuous variables. For a continuous variable, we cut the range of the variable into subintervals of equal width and draw one rectangle for each subinterval; the height of the rectangle is the number of observations falling into the corresponding subinterval. For a discrete variable with a small number of possible values, we can draw a rectangle with equal width for each value, the height of each rectangle is either the frequency or relative frequency.\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example:\u00a0Organizing Quantitative Discrete Variables<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nThere are 100 students in a class; ten have no siblings, thirty have one sibling, thirty-five have two siblings, fifteen have three siblings, and ten have more than three siblings.\r\n\r\nWe can use a (relative) frequency table and a histogram to summarize the data.<a id=\"retfig1.5\"><\/a>\r\n<p style=\"text-align: center;\"><strong>Table 1.5<\/strong>: Frequency and Relative Frequency Table of \"# of Siblings\"<\/p>\r\n\r\n<table class=\"aligncenter\" style=\"width: 100%; height: 120px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tfoot>\r\n<tr class=\"shaded\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">Total<\/td>\r\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">100<\/td>\r\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">1.00<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 30px;\">\r\n<td style=\"height: 30px; width: 37.77335984095428%;\" align=\"center\"><strong># of<\/strong>\u00a0<strong>Siblings<\/strong><\/td>\r\n<td style=\"height: 30px; width: 28.628230616302183%;\" align=\"center\"><strong>Frequency<\/strong><\/td>\r\n<td style=\"height: 30px; width: 33.39960238568588%;\" align=\"center\"><strong>Relative Frequency<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">0<\/td>\r\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">10<\/td>\r\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.10<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">1<\/td>\r\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">30<\/td>\r\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.30<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">2<\/td>\r\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">35<\/td>\r\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.35<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">3<\/td>\r\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">15<\/td>\r\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.15<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">&gt;3<\/td>\r\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">10<\/td>\r\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.10<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[caption id=\"attachment_69\" align=\"aligncenter\" width=\"400\"]<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable.png\"><img class=\"wp-image-69\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable.png\" alt=\"Histogram of number of siblings, the y-axis is frequency and x-axis is the number of siblings. Image description available\" width=\"400\" height=\"407\" \/><\/a> <strong>Figure 1.5<\/strong>: Histogram of \"# of Siblings\" [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.5\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.5\">(See Appendix D Figure 1.5)<\/a>] Click on image to enlarge.[\/caption]<\/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\nDifference between a bar chart and a histogram:\r\n<ul>\r\n \t<li>The bars of a bar chart do not touch one another. Since there is often no inherent ordering among the categories, the order among the bars is usually irrelevant (i.e., bars can be switched without affecting the usefulness of the graph).<\/li>\r\n \t<li>The adjacent bars of a histogram do touch one another. Since there is ordering among numbers, that ordering is to be preserved among the bars of a histogram. That is, the first bar corresponds to the smallest value (or the interval of the smallest values), the second bar corresponds to the second smallest value (or the interval of the second smallest values), and so on.<\/li>\r\n<\/ul>\r\n<h2>1.4.3 Organizing Quantitative Continuous Data<\/h2>\r\n<strong>Example: Organizing Quantitative Continuous Variables<\/strong>\r\n\r\nHere are the 50 grades for an exam:\r\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">72<\/td>\r\n<td style=\"width: 10%;\">59<\/td>\r\n<td style=\"width: 10%;\">56<\/td>\r\n<td style=\"width: 10%;\">60<\/td>\r\n<td style=\"width: 10%;\">40<\/td>\r\n<td style=\"width: 10%;\">55<\/td>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">76<\/td>\r\n<td style=\"width: 10%;\">75<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">46<\/td>\r\n<td style=\"width: 10%;\">59<\/td>\r\n<td style=\"width: 10%;\">37<\/td>\r\n<td style=\"width: 10%;\">54<\/td>\r\n<td style=\"width: 10%;\">83<\/td>\r\n<td style=\"width: 10%;\">85<\/td>\r\n<td style=\"width: 10%;\">29<\/td>\r\n<td style=\"width: 10%;\">55<\/td>\r\n<td style=\"width: 10%;\">56<\/td>\r\n<td style=\"width: 10%;\">42<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">50<\/td>\r\n<td style=\"width: 10%;\">49<\/td>\r\n<td style=\"width: 10%;\">65<\/td>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">61<\/td>\r\n<td style=\"width: 10%;\">53<\/td>\r\n<td style=\"width: 10%;\">55<\/td>\r\n<td style=\"width: 10%;\">92<\/td>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">48<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">79<\/td>\r\n<td style=\"width: 10%;\">51<\/td>\r\n<td style=\"width: 10%;\">24<\/td>\r\n<td style=\"width: 10%;\">57<\/td>\r\n<td style=\"width: 10%;\">48<\/td>\r\n<td style=\"width: 10%;\">71<\/td>\r\n<td style=\"width: 10%;\">90<\/td>\r\n<td style=\"width: 10%;\">81<\/td>\r\n<td style=\"width: 10%;\">34<\/td>\r\n<td style=\"width: 10%;\">60<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">47<\/td>\r\n<td style=\"width: 10%;\">39<\/td>\r\n<td style=\"width: 10%;\">65<\/td>\r\n<td style=\"width: 10%;\">74<\/td>\r\n<td style=\"width: 10%;\">49<\/td>\r\n<td style=\"width: 10%;\">52<\/td>\r\n<td style=\"width: 10%;\">59<\/td>\r\n<td style=\"width: 10%;\">9<\/td>\r\n<td style=\"width: 10%;\">62<\/td>\r\n<td style=\"width: 10%;\">37<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nHow to present and summarize these data?\r\n<h3><strong>Grouping Table and Histogram<\/strong><\/h3>\r\nRecall that all values of a discrete variable can be listed. However, this is not the case for a continuous variable: we cannot list all possible values for a continuous variable. For example, even though the above 50 grades are all reported as whole numbers, there is no reason why a grade couldn\u2019t contain a decimal, such as [latex]46.5[\/latex], or [latex] 66. \\bar{6} [\/latex]. For this reason, it is most appropriate to view the grade variable as a continuous variable. Even though we cannot list all possible values of a continuous variable, we can cut the range of a continuous variable into subintervals of equal width and use histograms to summarize quantitative continuous data. The range of grade is [0, 100], a convenient and neat cut is by intervals with width of 10 or 20. If we cut by intervals of 10, the resulting grouping data and histogram are as follows:\r\n<p style=\"text-align: center;\"><strong>Table 1.6<\/strong>: Grouping Table of Grade for Histogram<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"aligncenter\" style=\"height: 180px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\r\n<tfoot>\r\n<tr class=\"shaded\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\"><strong>Total<\/strong><\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">50<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">1.00<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<thead>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\" valign=\"top\" bgcolor=\"#F3F0F0\"><strong>Interval<\/strong><\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\" valign=\"top\" bgcolor=\"#F3F0F0\"><strong>Frequency<\/strong><\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\" valign=\"top\" bgcolor=\"#F3F0F0\"><strong>Relative Frequency<\/strong><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[0, 10)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">1<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">1\/50=0.02<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[10, 20)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">0<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">0\/50=0.00<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[20, 30)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">2<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">2\/50=0.04<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[30, 40)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">4<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">4\/50=0.08<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[40, 50)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">8<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">8\/50=0.16<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[50, 60)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">14<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">14\/50=0.28<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[60, 70)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">10<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">10\/50=0.20<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[70, 80)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">6<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">6\/50=0.12<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[80, 90)<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">3<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">3\/50=0.06<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 88.875px;\">[90, 100]<\/td>\r\n<td style=\"height: 15px; width: 103.734375px;\">2<\/td>\r\n<td style=\"height: 15px; width: 206.609375px;\">2\/50=0.04<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nPlease note that <strong>we still need to keep those intervals that have no observations<\/strong>. \u00a0For example, the interval [10, 20) includes 10 but excludes 20, and has no observations. We need to keep this interval when we draw a histogram for the data.<a id=\"retfig1.6\"><\/a>\r\n\r\n[caption id=\"attachment_68\" align=\"aligncenter\" width=\"351\"]<img class=\"wp-image-68 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_example_Grades_Histogram.png\" alt=\"Histogram of grade, the y-axis is frequency and x-axis is grades. Image description available\" width=\"351\" height=\"334\" \/> <strong>Figure 1.6<\/strong>: Histogram of Grade [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.6\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.6\">(See Appendix D Figure 1.6)<\/a>][\/caption]\r\n<h4><img src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/instructornote.png\" \/><\/h4>\r\n<ol>\r\n \t<li>A common question when drawing histograms is whether to use [, ) or (, ] intervals. Please note that different software may follow different rules. It is important to consistently follow the same rule for all intervals in your histogram.<\/li>\r\n \t<li>Another common question is how many bins is proper. A rule of thumb is the square root of the number of observations. For the grade example, since [latex]n=50[\/latex] and [latex]\\sqrt{n}=\\sqrt{50}=7.07[\/latex]. The range of grade is [0, 100], to create convenient cuts, we can divide the range either into 10 subintervals with equal length, i.e., [latex][0, 10), [10, 20), \\cdots, [90, 100][\/latex] or 5 subintervals with equal width, i.e., [latex][0, 20), [20, 40), \\cdots, [80, 100][\/latex].<\/li>\r\n \t<li>Note that histograms with different number of bins might appear very different. When investigating the shape of the distribution of a variable using a histogram, it is always better to draw a boxplot and normal Q-Q plot as well. Boxplot and normal Q-Q plot will be covered in sections 2.4 and 5.6 respectively.<\/li>\r\n<\/ol>\r\n<h3><strong>Stem-and-Leaf Diagram<\/strong><\/h3>\r\nAnother way to present quantitative data is a stem-and-leaf diagram. To construct a stem-and-leaf diagram:\r\n<ul type=\"disc\">\r\n \t<li>Think of each observation consisting of a stem (all but the rightmost digit) and a leaf (the rightmost digit, a single digit).<\/li>\r\n \t<li>Draw a vertical line, write the stems from the smallest to the largest in a vertical column to the left of the vertical line.<\/li>\r\n \t<li>Write each leaf to the right of the vertical line in the same row as its corresponding stem.<\/li>\r\n \t<li>Arrange the leaves in each row from the smallest to the largest.<\/li>\r\n \t<li>Indicate the decimal place of the data if applicable.<\/li>\r\n<\/ul>\r\nLet\u2019s return to the grades data:\r\n<table style=\"border-collapse: collapse; width: 100%;\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">72<\/td>\r\n<td style=\"width: 10%;\">59<\/td>\r\n<td style=\"width: 10%;\">56<\/td>\r\n<td style=\"width: 10%;\">60<\/td>\r\n<td style=\"width: 10%;\">40<\/td>\r\n<td style=\"width: 10%;\">55<\/td>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">76<\/td>\r\n<td style=\"width: 10%;\">75<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">46<\/td>\r\n<td style=\"width: 10%;\">59<\/td>\r\n<td style=\"width: 10%;\">37<\/td>\r\n<td style=\"width: 10%;\">54<\/td>\r\n<td style=\"width: 10%;\">83<\/td>\r\n<td style=\"width: 10%;\">85<\/td>\r\n<td style=\"width: 10%;\">29<\/td>\r\n<td style=\"width: 10%;\">55<\/td>\r\n<td style=\"width: 10%;\">56<\/td>\r\n<td style=\"width: 10%;\">42<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">50<\/td>\r\n<td style=\"width: 10%;\">49<\/td>\r\n<td style=\"width: 10%;\">65<\/td>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">61<\/td>\r\n<td style=\"width: 10%;\">53<\/td>\r\n<td style=\"width: 10%;\">55<\/td>\r\n<td style=\"width: 10%;\">92<\/td>\r\n<td style=\"width: 10%;\">68<\/td>\r\n<td style=\"width: 10%;\">48<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">79<\/td>\r\n<td style=\"width: 10%;\">51<\/td>\r\n<td style=\"width: 10%;\">24<\/td>\r\n<td style=\"width: 10%;\">57<\/td>\r\n<td style=\"width: 10%;\">48<\/td>\r\n<td style=\"width: 10%;\">71<\/td>\r\n<td style=\"width: 10%;\">90<\/td>\r\n<td style=\"width: 10%;\">81<\/td>\r\n<td style=\"width: 10%;\">34<\/td>\r\n<td style=\"width: 10%;\">60<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 10%;\">47<\/td>\r\n<td style=\"width: 10%;\">39<\/td>\r\n<td style=\"width: 10%;\">65<\/td>\r\n<td style=\"width: 10%;\">74<\/td>\r\n<td style=\"width: 10%;\">49<\/td>\r\n<td style=\"width: 10%;\">52<\/td>\r\n<td style=\"width: 10%;\">59<\/td>\r\n<td style=\"width: 10%;\">9<\/td>\r\n<td style=\"width: 10%;\">62<\/td>\r\n<td style=\"width: 10%;\">37<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nWe can group the grades by the first digits (in intervals of 10) as follows,\r\n<p style=\"text-align: center;\"><strong>Table 1.7<\/strong>: Working Table for Stem-and-Leaf Diagram<\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"aligncenter\" style=\"height: 165px;\" border=\"1\" cellspacing=\"0\" cellpadding=\"2\">\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\" bgcolor=\"#F3F0F0\"><strong>Interval<\/strong><\/td>\r\n<td style=\"height: 15px; width: 432.125px;\" bgcolor=\"#F3F0F0\"><strong>Data<\/strong><\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[0, 10)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">9<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[10, 20)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[20, 30)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">24, 29<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[30, 40)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">34, 37, 37, 39<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[40, 50)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">40, 42, 46, 47, 48, 48, 49, 49,<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[50, 60)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">50, 51, 52, 53, 54, 55, 55, 55,56, 56, 57, 59, 59, 59<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[60, 70)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">60, 60, 61, 62, 65, 65, 68, 68, 68, 68, 68<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[70, 80)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">71, 72, 74, 75, 76, 79<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[80, 90)<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">81, 83, 85<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 100px;\">[90, 100]<\/td>\r\n<td style=\"height: 15px; width: 432.125px;\">90, 92<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\nIf we take apart the grades and mark the first digit at left side of the line and the second digit at the right side of the line, it becomes a stem-leaf diagram:<a id=\"retfig1.7\"><\/a>\r\n<p align=\"center\"><img class=\"aligncenter wp-image-77 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf.png\" alt=\"Stem and leaf diagram of grade. The stems are listed vertically to the left and the leaves of each stem are listed horizontally to the right. Image description available\" width=\"214\" height=\"218\" \/><\/p>\r\n<p style=\"padding-left: 240px;\">Decimal place: 9|0 = 90<\/p>\r\n<p style=\"text-align: center;\"><strong>Figure 1.7<\/strong>: Stem-and-Leaf Diagram of Grade [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.7\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.7\">(See Appendix D Figure 1.7)<\/a>]<\/p>\r\nThe part \"Decimal place: 9|0 = 90\" indicates that the decimal point is one digit to the right of the vertical line.\r\n\r\nSome other useful guidelines of the stem-and-leaf diagram are as follows:\r\n<table class=\"aligncenter no-border\" style=\"width: 100%;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 75%;\">\r\n<ul>\r\n \t<li>Keep the stems within the range of the data even though they have no leaf.<\/li>\r\n \t<li>If there are too many leaves, break down each stem into two lines. Leaves from 0 to 4 are placed in the first line and 5 to 9 in the second. (See in plot on the right for the grade example. Because the interval [50, 60) has too many leaves, we break the leaves into 2 lines: the first line lists those leaves ranging from 0 to 4, the second line lists leaves ranging from 5 to 9. Do the same to all the other stems.<\/li>\r\n \t<li>Divide or multiply the numbers by 10, 100, etc., and then round if necessary to create integers that have at most three digits, and indicate the decimal point if applicable.<\/li>\r\n<\/ul>\r\n<\/td>\r\n<td style=\"width: 228.703125px;\" align=\"center\"><img class=\"size-medium wp-image-75 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf-02-129x300.png\" alt=\"\" width=\"129\" height=\"300\" \/><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nLet's consider two data sets. Data set I: 3600, 1500, 6900 and Data set II: 0.36, 0.15, 0.69. It is not a good idea to draw the stem-and-leaf diagram based on the original data sets. Take Data set I for example, all three numbers have a leaf of 0 (the right most digit) and there are many stems without leaves between 150 and 360. Therefore, we divide the numbers by 100 and transform the numbers to 36, 15 69 to draw a stem-and-leaf diagram. Finally, we indicate the decimal point by putting 6|9=6900 at the bottom of the graph. Similarly, we multiply all three numbers 0.36, 0.15, 0.69 by 100 to create a new data set: 36, 15, 69 and then draw a stem-and-leaf diagram.\r\n\r\nThese two data sets have the same resulting stem-and-leaf diagram as the data set 36, 15, and 69. However, the decimal point is 3 digits to the right of the vertical line for Date set I, i.e., we should indicate 6|9=6900; the decimal point is one digit to the left of the vertical line for Date set II, i.e., 6|9=0.69.\r\n<table class=\"no-border\" style=\"border-collapse: collapse; width: 100%;\" border=\"0\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 50%;\">Stem-and-Leaf Diagram for Data set 1: 3600, 1500, 6900\r\n<table class=\"aligncenter\" style=\"border-collapse: collapse; height: 108px; width: 20%;\" border=\"0\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">Stem<\/td>\r\n<td style=\"width: 87.65625px; height: 14px;\">Leaf<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"border-top\" style=\"height: 26px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 26px; text-align: right;\">1<\/td>\r\n<td style=\"width: 87.65625px; height: 26px;\">5<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 12px; text-align: right;\">2<\/td>\r\n<td style=\"width: 87.65625px; height: 12px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">3<\/td>\r\n<td style=\"width: 87.65625px; height: 14px;\">6<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">4<\/td>\r\n<td style=\"width: 87.65625px; height: 14px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\"><\/td>\r\n<td style=\"width: 87.65625px; height: 14px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">6<\/td>\r\n<td style=\"width: 87.65625px; height: 14px;\">9<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p style=\"text-align: center;\">Decimal 6|9=6900<\/p>\r\n<\/td>\r\n<td style=\"width: 50%;\">Stem-and-Leaf Diagram for Data set 2: 0.36, 0.15, 0.69\r\n<table class=\"aligncenter\" style=\"border-collapse: collapse; width: 20%; height: 110px;\" border=\"0\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">Stem<\/td>\r\n<td style=\"width: 20.514464567076082%; height: 14px;\">Leaf<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr class=\"border-top\" style=\"height: 26px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 26px; text-align: right;\">1<\/td>\r\n<td style=\"width: 20.514464567076082%; height: 26px;\">\u00a05<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">2<\/td>\r\n<td style=\"width: 20.514464567076082%; height: 14px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">3<\/td>\r\n<td style=\"width: 20.514464567076082%; height: 14px;\">6<\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">4<\/td>\r\n<td style=\"width: 20.514464567076082%; height: 14px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\"><\/td>\r\n<td style=\"width: 20.514464567076082%; height: 14px;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 14px;\">\r\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">6<\/td>\r\n<td style=\"width: 20.514464567076082%; height: 14px;\">9<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p style=\"text-align: center;\">Decimal 6|9=0.69<\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n<\/div>","rendered":"<p>Next, we focus on presenting and summarizing data using different tables and figures.<\/p>\n<p>Given a set of data, how can you present the data? It is essential to plot the data before conducting any data analysis. The definition of descriptive statistics tells us we can use tables and graphs to present the data. Different tables and graphs are used to describe the two different types of data\u2014qualitative and quantitative. Let us start with qualitative variables, then continuous and then discrete variables.<\/p>\n<h2>1.4.1 Organizing Qualitative Data<\/h2>\n<p>Numerically, we can use frequency or relative frequency tables to summarize qualitative\/categorical data. Graphically, we can use pie charts or bar charts.<\/p>\n<p>The distribution of a qualitative variable is given in a <strong>frequency (relative frequency) table<\/strong>. For example, the students were asked, &#8220;How you came to school today?&#8221; Fifty-three students answered by car, 136 by public transportation, nine by bicycle, 74 by walking, and one by other means. The results are summarized in the following table.<\/p>\n<p style=\"text-align: center;\"><strong>Table 1.3<\/strong>: Frequency and Relative Frequency Table of &#8220;Transportation&#8221;<\/p>\n<div style=\"margin: auto;\">\n<table class=\"aligncenter\" style=\"width: 100%; height: 155px; border-spacing: 0px;\" cellpadding=\"1\">\n<thead>\n<tr style=\"height: 37px;\">\n<td style=\"height: 37px; width: 26.49122807017544%; background-color: #F3F0F0; width: 244px;\"><strong>Transportation<\/strong><\/td>\n<td style=\"height: 37px; width: 15.478070175438596%; background-color: #F3F0F0; width: 219px;\"><strong>Frequency<\/strong><\/td>\n<td style=\"height: 37px; width: 31.013157894736842%; background-color: #F3F0F0; width: 319px;\"><strong>Relative Frequency<\/strong><\/td>\n<td style=\"height: 37px; width: 26.842105263157894%; background-color: #F3F0F0; width: 336px;\"><strong>Percentage<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 26.49122807017544%;\">Car<\/td>\n<td style=\"height: 22px; width: 15.478070175438596%;\">53<\/td>\n<td style=\"height: 22px; width: 31.013157894736842%;\">53\/273 = 0.1941<\/td>\n<td style=\"height: 22px; width: 26.842105263157894%;\">19.41%<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 26.49122807017544%;\">Public<\/td>\n<td style=\"height: 22px; width: 15.478070175438596%;\">136<\/td>\n<td style=\"height: 22px; width: 31.013157894736842%;\">136\/273 = 0.4982<\/td>\n<td style=\"height: 22px; width: 26.842105263157894%;\">49.82%<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 26.49122807017544%;\">Bicycle<\/td>\n<td style=\"height: 22px; width: 15.478070175438596%;\">9<\/td>\n<td style=\"height: 22px; width: 31.013157894736842%;\">9\/273 = 0.0330<\/td>\n<td style=\"height: 22px; width: 26.842105263157894%;\">3.30%<\/td>\n<\/tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; width: 26.49122807017544%;\">Walking<\/td>\n<td style=\"height: 22px; width: 15.478070175438596%;\">74<\/td>\n<td style=\"height: 22px; width: 31.013157894736842%;\">74\/273 = 0.2710<\/td>\n<td style=\"height: 22px; width: 26.842105263157894%;\">27.10%<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"width: 26.4912%; height: 15px;\">Other<\/td>\n<td style=\"width: 15.4781%; height: 15px;\">1<\/td>\n<td style=\"width: 31.0132%; height: 15px;\">1\/273 = 0.0037<\/td>\n<td style=\"width: 26.8421%; height: 15px;\">0.36%<\/td>\n<\/tr>\n<\/tbody>\n<tfoot>\n<tr class=\"shaded\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 26.49122807017544%;\"><strong>Total<\/strong><\/td>\n<td style=\"height: 15px; width: 15.478070175438596%;\">273<\/td>\n<td style=\"height: 15px; width: 31.013157894736842%;\">1.000<\/td>\n<td style=\"height: 15px; width: 26.842105263157894%;\">100%<\/td>\n<\/tr>\n<\/tfoot>\n<\/table>\n<\/div>\n<ul>\n<li>The first column gives all possible outcomes of the variable, which are called categories.<\/li>\n<li>The second column gives the number of observations falling into each category; we call this number the <strong>frequency<\/strong> of that category. For example, the frequency of taking public transit is 136.<\/li>\n<li>The third column gives the <strong>relative frequency<\/strong>, which is calculated as:\n<p style=\"text-align: center;\">[latex]\\text{relative frequency} = \\frac{\\text{frequency}}{\\text{total}}.[\/latex]<\/p>\n<p>For example, the relative frequency of taking public transit is 0.4982, which means 49.82% of the students came to school by public transit. Note that the relative frequencies always add up to 1 across all the categories.<\/li>\n<li>The fourth column gives the percentage, which is calculated as [latex]\\text{percentage=relative frequency}\\times 100[\/latex].<\/li>\n<\/ul>\n<p>Based on the (relative) frequency table, we can draw a bar chart or a pie chart to summarize the data.<\/p>\n<ul>\n<li>A <strong>bar chart<\/strong> represents each category with a bar whose height equals each category&#8217;s relative frequency or frequency. The bars are plotted next to each other without touching each other. One bar for one category.<\/li>\n<li>A <strong>pie chart<\/strong> is a disc divided into wedge-shaped pieces whose areas are proportional to the relative frequencies. One slice for one category, the angle of each slice = relative frequency x 360\u00b0.<a id=\"retfig1.2\"><\/a><\/li>\n<\/ul>\n<figure id=\"attachment_66\" aria-describedby=\"caption-attachment-66\" style=\"width: 1625px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-66 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170.png\" alt=\"A bar graph on the left panel showing relative frequency of how students came to school. A pie chart on the right panel showing percentages of how students came to school. Image description available.\" width=\"1625\" height=\"771\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170.png 1625w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-300x142.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-1024x486.png 1024w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-768x364.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-1536x729.png 1536w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-65x31.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-225x107.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Charts.png-includes-both-charts-e1594667896170-350x166.png 350w\" sizes=\"auto, (max-width: 1625px) 100vw, 1625px\" \/><figcaption id=\"caption-attachment-66\" class=\"wp-caption-text\"><strong>Figure 1.2<\/strong>: Bar Chart (left panel) and Pie Chart (right panel) of &#8220;Transportation&#8221; [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.2\">Image Description (See Appendix D Figure 1.2)<\/a>]<\/figcaption><\/figure>\n<p>If the bar chart and pie chart are generated based on counts, the charts won&#8217;t change except for the scale\u2014the relative frequency in the bar chart and the percentage in the pie chart will be replaced by counts or frequency.<\/p>\n<p>Suppose that another qualitative variable recorded in the study was &#8220;gender.&#8221;, we can also present the data characterized by two qualitative variables in what is referred to as a <strong>contingency table<\/strong>. Below is the contingency table with the two qualitative variables, gender and transport:<\/p>\n<p style=\"text-align: center;\"><strong>Table 1.4<\/strong>: Contingency Table of &#8220;Gender&#8221; and &#8220;Transportation&#8221;<\/p>\n<table class=\"aligncenter first-col-border last-col-border\" style=\"width: 100%; height: 75px; border-spacing: 0px;\" cellpadding=\"1\">\n<thead>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 12.249999999999998%;\"><\/td>\n<th class=\"border-top\" style=\"height: 15px; width: 16.375%; width: 70px;\" scope=\"col\"><span class=\"bluetext\">Car <\/span><\/th>\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%; width: 70px;\" scope=\"col\"><span class=\"bluetext\">Public<\/span><\/th>\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%; width: 70px;\" scope=\"col\"><span class=\"bluetext\">Bicycle<\/span><\/th>\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%; width: 70px;\" scope=\"col\"><span class=\"bluetext\">Walking<\/span><\/th>\n<th class=\"border-top\" style=\"height: 15px; width: 14.249999999999998%; width: 70px;\" scope=\"col\"><span class=\"bluetext\">Others<\/span><\/th>\n<th class=\"border-top\" style=\"height: 15px; width: 14.374999999999998%; width: 70px;\" scope=\"col\"><strong>Total<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 12.249999999999998%;\" scope=\"row\"><span class=\"redtext\">Female<\/span><\/th>\n<td style=\"height: 15px; width: 16.375%;\"><strong>25<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>80<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>5<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>38<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>0<\/strong><\/td>\n<td style=\"height: 15px; width: 14.374999999999998%;\"><span class=\"redtext\">148<\/span><\/td>\n<\/tr>\n<tr class=\"border-bottom\" style=\"height: 15px;\">\n<th style=\"height: 15px; width: 12.249999999999998%;\" scope=\"row\"><span class=\"redtext\">Male<\/span><\/th>\n<td style=\"height: 15px; width: 16.375%;\"><strong>28<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>56<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>4<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>36<\/strong><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><strong>1<\/strong><\/td>\n<td style=\"height: 15px; width: 14.374999999999998%;\"><span class=\"redtext\">125<\/span><\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<th style=\"height: 15px; width: 12.249999999999998%;\" scope=\"row\"><strong>Total<\/strong><\/th>\n<td style=\"height: 15px; width: 16.375%;\"><span class=\"bluetext\">53<\/span><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">136<\/span><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">9<\/span><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">74<\/span><\/td>\n<td style=\"height: 15px; width: 14.249999999999998%;\"><span class=\"bluetext\">1<\/span><\/td>\n<td style=\"height: 15px; width: 14.374999999999998%;\">273<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The variable &#8220;<strong class=\"redtext\">Gender<\/strong>&#8221; is called <strong class=\"redtext\">the row variable<\/strong> (shown in red font in the table) and &#8220;<span class=\"bluetext\"><strong>Transportation<\/strong><\/span><strong>&#8220;<\/strong> is the <strong class=\"bluetext\">column variable <\/strong>(shown in blue font in the table). The totals &#8220;148&#8221; and &#8220;125&#8221; (in red) are called <strong class=\"redtext\">row totals<\/strong> (sum across transportation for each category of &#8220;gender&#8221;). The totals &#8220;53,&#8221; &#8220;136,&#8221; &#8220;9,&#8221; &#8220;74,&#8221; &#8220;1&#8221; are called <strong class=\"bluetext\">column totals<\/strong> (sum across gender for each category of &#8220;Transportation&#8221;), and &#8220;273&#8221; is the <strong>grand total<\/strong>. Those 10 numbers in bold are called <strong>cells<\/strong>.<\/p>\n<p>One interesting question is whether the pattern of transportation among females is the same as that among males. We can compare the relative frequencies of all the categories for females with their counterparts among males. There are 148 female students and 125 male students in total; therefore, the relative frequencies of the five categories for females are 25\/148, 80\/148, 5\/148, 38\/148, 0\/148 as compared to 28\/125, 56\/125, 4\/125, 36\/125, 1\/125 for males.<\/p>\n<p>The distributions of &#8220;transportation&#8221; for females and males can be compared graphically using a side-by-side pie chart and a side-by-side bar chart.<a id=\"retfig1.3\"><\/a><\/p>\n<figure id=\"attachment_74\" aria-describedby=\"caption-attachment-74\" style=\"width: 1891px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-74 size-full\" style=\"color: #373d3f; font-weight: bold; font-size: 1em;\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368.png\" alt=\"A pie chart for female on the left panel showing percentages of how female students came to school. Image description available.\" width=\"1891\" height=\"746\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368.png 1891w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-300x118.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-1024x404.png 1024w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-768x303.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-1536x606.png 1536w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-65x26.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-225x89.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_PieChart-e1594672889368-350x138.png 350w\" sizes=\"auto, (max-width: 1891px) 100vw, 1891px\" \/><figcaption id=\"caption-attachment-74\" class=\"wp-caption-text\"><strong>Figure 1.3<\/strong>: Side-by-side pie Chart of &#8220;Transportation&#8221; for Females and Males. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.3\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.3\">(See Appendix D Figure 1.3)<\/a>]<\/figcaption><\/figure>\n<p>The side-by-side pie chart shows that the patterns in transportation among females and male are very similar, since the two pie charts are almost identical. The side-by-side bar chart based on the <strong>relative<\/strong> <strong>frequency<\/strong> gives the same conclusion: the distributions of &#8220;transportation&#8221; for female and male are very similar, which implies there is no significant difference between female and male in the way they come to school.<a id=\"retfig1.4\"><\/a><\/p>\n<figure id=\"attachment_73\" aria-describedby=\"caption-attachment-73\" style=\"width: 598px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-73 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart.png\" alt=\"A side-by-side bar graph comparing relative frequency of how female and male students came to school. Image description available.\" width=\"598\" height=\"500\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart.png 598w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart-300x251.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart-65x54.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart-225x188.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Side-By-Side_BarChart-350x293.png 350w\" sizes=\"auto, (max-width: 598px) 100vw, 598px\" \/><figcaption id=\"caption-attachment-73\" class=\"wp-caption-text\"><strong>Figure 1.4<\/strong>: Side-by-Side Bar Chart of &#8220;Transportation&#8221; for Female and Male. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.4\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.4\">(See Appendix D Figure 1.4)<\/a>]<\/figcaption><\/figure>\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>When we compare the distributions of two different groups using a side-by-side bar chart, we should use the relative frequency as the y-axis. Using frequency as the y-axis and comparing the frequencies alone, without taking into account the total of each group, can be misleading.<\/p>\n<h2>1.4.2 Organizing Quantitative Discrete Data<\/h2>\n<p>We are able to list all possible values for a quantitative discrete variable; therefore, for a quantitative discrete variable with only a few different values, we can describe it using tools similar to those for qualitative variables, i.e., a (relative) frequency table and histogram.<\/p>\n<p>A histogram is somewhat similar to a bar chart. The x-axis shows the value of the variable of interest and the y-axis displays either frequencies or relative frequencies. Histograms can be used to describe both quantitative discrete and quantitative continuous variables. For a continuous variable, we cut the range of the variable into subintervals of equal width and draw one rectangle for each subinterval; the height of the rectangle is the number of observations falling into the corresponding subinterval. For a discrete variable with a small number of possible values, we can draw a rectangle with equal width for each value, the height of each rectangle is either the frequency or relative frequency.<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example:\u00a0Organizing Quantitative Discrete Variables<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>There are 100 students in a class; ten have no siblings, thirty have one sibling, thirty-five have two siblings, fifteen have three siblings, and ten have more than three siblings.<\/p>\n<p>We can use a (relative) frequency table and a histogram to summarize the data.<a id=\"retfig1.5\"><\/a><\/p>\n<p style=\"text-align: center;\"><strong>Table 1.5<\/strong>: Frequency and Relative Frequency Table of &#8220;# of Siblings&#8221;<\/p>\n<table class=\"aligncenter\" style=\"width: 100%; height: 120px; border-spacing: 0px;\" cellpadding=\"0\">\n<tfoot>\n<tr class=\"shaded\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">Total<\/td>\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">100<\/td>\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">1.00<\/td>\n<\/tr>\n<\/tfoot>\n<thead>\n<tr class=\"shaded\" style=\"height: 30px;\">\n<td style=\"height: 30px; width: 37.77335984095428%;\" align=\"center\"><strong># of<\/strong>\u00a0<strong>Siblings<\/strong><\/td>\n<td style=\"height: 30px; width: 28.628230616302183%;\" align=\"center\"><strong>Frequency<\/strong><\/td>\n<td style=\"height: 30px; width: 33.39960238568588%;\" align=\"center\"><strong>Relative Frequency<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">0<\/td>\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">10<\/td>\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.10<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">1<\/td>\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">30<\/td>\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.30<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">2<\/td>\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">35<\/td>\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.35<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">3<\/td>\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">15<\/td>\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.15<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 37.77335984095428%;\" align=\"center\">&gt;3<\/td>\n<td style=\"height: 15px; width: 28.628230616302183%;\" align=\"center\">10<\/td>\n<td style=\"height: 15px; width: 33.39960238568588%;\" align=\"center\">0.10<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<figure id=\"attachment_69\" aria-describedby=\"caption-attachment-69\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-69\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable.png\" alt=\"Histogram of number of siblings, the y-axis is frequency and x-axis is the number of siblings. Image description available\" width=\"400\" height=\"407\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable.png 860w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable-295x300.png 295w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable-768x782.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable-65x66.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable-225x229.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Histogram_DiscretVariable-350x357.png 350w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><figcaption id=\"caption-attachment-69\" class=\"wp-caption-text\"><strong>Figure 1.5<\/strong>: Histogram of &#8220;# of Siblings&#8221; [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.5\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.5\">(See Appendix D Figure 1.5)<\/a>] Click on image to enlarge.<\/figcaption><\/figure>\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>Difference between a bar chart and a histogram:<\/p>\n<ul>\n<li>The bars of a bar chart do not touch one another. Since there is often no inherent ordering among the categories, the order among the bars is usually irrelevant (i.e., bars can be switched without affecting the usefulness of the graph).<\/li>\n<li>The adjacent bars of a histogram do touch one another. Since there is ordering among numbers, that ordering is to be preserved among the bars of a histogram. That is, the first bar corresponds to the smallest value (or the interval of the smallest values), the second bar corresponds to the second smallest value (or the interval of the second smallest values), and so on.<\/li>\n<\/ul>\n<h2>1.4.3 Organizing Quantitative Continuous Data<\/h2>\n<p><strong>Example: Organizing Quantitative Continuous Variables<\/strong><\/p>\n<p>Here are the 50 grades for an exam:<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">72<\/td>\n<td style=\"width: 10%;\">59<\/td>\n<td style=\"width: 10%;\">56<\/td>\n<td style=\"width: 10%;\">60<\/td>\n<td style=\"width: 10%;\">40<\/td>\n<td style=\"width: 10%;\">55<\/td>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">76<\/td>\n<td style=\"width: 10%;\">75<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">46<\/td>\n<td style=\"width: 10%;\">59<\/td>\n<td style=\"width: 10%;\">37<\/td>\n<td style=\"width: 10%;\">54<\/td>\n<td style=\"width: 10%;\">83<\/td>\n<td style=\"width: 10%;\">85<\/td>\n<td style=\"width: 10%;\">29<\/td>\n<td style=\"width: 10%;\">55<\/td>\n<td style=\"width: 10%;\">56<\/td>\n<td style=\"width: 10%;\">42<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">50<\/td>\n<td style=\"width: 10%;\">49<\/td>\n<td style=\"width: 10%;\">65<\/td>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">61<\/td>\n<td style=\"width: 10%;\">53<\/td>\n<td style=\"width: 10%;\">55<\/td>\n<td style=\"width: 10%;\">92<\/td>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">48<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">79<\/td>\n<td style=\"width: 10%;\">51<\/td>\n<td style=\"width: 10%;\">24<\/td>\n<td style=\"width: 10%;\">57<\/td>\n<td style=\"width: 10%;\">48<\/td>\n<td style=\"width: 10%;\">71<\/td>\n<td style=\"width: 10%;\">90<\/td>\n<td style=\"width: 10%;\">81<\/td>\n<td style=\"width: 10%;\">34<\/td>\n<td style=\"width: 10%;\">60<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">47<\/td>\n<td style=\"width: 10%;\">39<\/td>\n<td style=\"width: 10%;\">65<\/td>\n<td style=\"width: 10%;\">74<\/td>\n<td style=\"width: 10%;\">49<\/td>\n<td style=\"width: 10%;\">52<\/td>\n<td style=\"width: 10%;\">59<\/td>\n<td style=\"width: 10%;\">9<\/td>\n<td style=\"width: 10%;\">62<\/td>\n<td style=\"width: 10%;\">37<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>How to present and summarize these data?<\/p>\n<h3><strong>Grouping Table and Histogram<\/strong><\/h3>\n<p>Recall that all values of a discrete variable can be listed. However, this is not the case for a continuous variable: we cannot list all possible values for a continuous variable. For example, even though the above 50 grades are all reported as whole numbers, there is no reason why a grade couldn\u2019t contain a decimal, such as [latex]46.5[\/latex], or [latex]66. \\bar{6}[\/latex]. For this reason, it is most appropriate to view the grade variable as a continuous variable. Even though we cannot list all possible values of a continuous variable, we can cut the range of a continuous variable into subintervals of equal width and use histograms to summarize quantitative continuous data. The range of grade is [0, 100], a convenient and neat cut is by intervals with width of 10 or 20. If we cut by intervals of 10, the resulting grouping data and histogram are as follows:<\/p>\n<p style=\"text-align: center;\"><strong>Table 1.6<\/strong>: Grouping Table of Grade for Histogram<\/p>\n<div style=\"margin: auto;\">\n<table class=\"aligncenter\" style=\"height: 180px; border-spacing: 0px;\" cellpadding=\"2\">\n<tfoot>\n<tr class=\"shaded\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\"><strong>Total<\/strong><\/td>\n<td style=\"height: 15px; width: 103.734375px;\">50<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">1.00<\/td>\n<\/tr>\n<\/tfoot>\n<thead>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px; background-color: #F3F0F0;\" valign=\"top\"><strong>Interval<\/strong><\/td>\n<td style=\"height: 15px; width: 103.734375px; background-color: #F3F0F0;\" valign=\"top\"><strong>Frequency<\/strong><\/td>\n<td style=\"height: 15px; width: 206.609375px; background-color: #F3F0F0;\" valign=\"top\"><strong>Relative Frequency<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[0, 10)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">1<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">1\/50=0.02<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[10, 20)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">0<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">0\/50=0.00<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[20, 30)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">2<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">2\/50=0.04<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[30, 40)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">4<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">4\/50=0.08<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[40, 50)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">8<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">8\/50=0.16<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[50, 60)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">14<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">14\/50=0.28<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[60, 70)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">10<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">10\/50=0.20<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[70, 80)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">6<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">6\/50=0.12<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[80, 90)<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">3<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">3\/50=0.06<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 88.875px;\">[90, 100]<\/td>\n<td style=\"height: 15px; width: 103.734375px;\">2<\/td>\n<td style=\"height: 15px; width: 206.609375px;\">2\/50=0.04<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>Please note that <strong>we still need to keep those intervals that have no observations<\/strong>. \u00a0For example, the interval [10, 20) includes 10 but excludes 20, and has no observations. We need to keep this interval when we draw a histogram for the data.<a id=\"retfig1.6\"><\/a><\/p>\n<figure id=\"attachment_68\" aria-describedby=\"caption-attachment-68\" style=\"width: 351px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-68 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_example_Grades_Histogram.png\" alt=\"Histogram of grade, the y-axis is frequency and x-axis is grades. Image description available\" width=\"351\" height=\"334\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_example_Grades_Histogram.png 351w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_example_Grades_Histogram-300x285.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_example_Grades_Histogram-65x62.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_example_Grades_Histogram-225x214.png 225w\" sizes=\"auto, (max-width: 351px) 100vw, 351px\" \/><figcaption id=\"caption-attachment-68\" class=\"wp-caption-text\"><strong>Figure 1.6<\/strong>: Histogram of Grade [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.6\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.6\">(See Appendix D Figure 1.6)<\/a>]<\/figcaption><\/figure>\n<h4><img decoding=\"async\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/instructornote.png\" alt=\"image\" \/><\/h4>\n<ol>\n<li>A common question when drawing histograms is whether to use [, ) or (, ] intervals. Please note that different software may follow different rules. It is important to consistently follow the same rule for all intervals in your histogram.<\/li>\n<li>Another common question is how many bins is proper. A rule of thumb is the square root of the number of observations. For the grade example, since [latex]n=50[\/latex] and [latex]\\sqrt{n}=\\sqrt{50}=7.07[\/latex]. The range of grade is [0, 100], to create convenient cuts, we can divide the range either into 10 subintervals with equal length, i.e., [latex][0, 10), [10, 20), \\cdots, [90, 100][\/latex] or 5 subintervals with equal width, i.e., [latex][0, 20), [20, 40), \\cdots, [80, 100][\/latex].<\/li>\n<li>Note that histograms with different number of bins might appear very different. When investigating the shape of the distribution of a variable using a histogram, it is always better to draw a boxplot and normal Q-Q plot as well. Boxplot and normal Q-Q plot will be covered in sections 2.4 and 5.6 respectively.<\/li>\n<\/ol>\n<h3><strong>Stem-and-Leaf Diagram<\/strong><\/h3>\n<p>Another way to present quantitative data is a stem-and-leaf diagram. To construct a stem-and-leaf diagram:<\/p>\n<ul type=\"disc\">\n<li>Think of each observation consisting of a stem (all but the rightmost digit) and a leaf (the rightmost digit, a single digit).<\/li>\n<li>Draw a vertical line, write the stems from the smallest to the largest in a vertical column to the left of the vertical line.<\/li>\n<li>Write each leaf to the right of the vertical line in the same row as its corresponding stem.<\/li>\n<li>Arrange the leaves in each row from the smallest to the largest.<\/li>\n<li>Indicate the decimal place of the data if applicable.<\/li>\n<\/ul>\n<p>Let\u2019s return to the grades data:<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">72<\/td>\n<td style=\"width: 10%;\">59<\/td>\n<td style=\"width: 10%;\">56<\/td>\n<td style=\"width: 10%;\">60<\/td>\n<td style=\"width: 10%;\">40<\/td>\n<td style=\"width: 10%;\">55<\/td>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">76<\/td>\n<td style=\"width: 10%;\">75<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">46<\/td>\n<td style=\"width: 10%;\">59<\/td>\n<td style=\"width: 10%;\">37<\/td>\n<td style=\"width: 10%;\">54<\/td>\n<td style=\"width: 10%;\">83<\/td>\n<td style=\"width: 10%;\">85<\/td>\n<td style=\"width: 10%;\">29<\/td>\n<td style=\"width: 10%;\">55<\/td>\n<td style=\"width: 10%;\">56<\/td>\n<td style=\"width: 10%;\">42<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">50<\/td>\n<td style=\"width: 10%;\">49<\/td>\n<td style=\"width: 10%;\">65<\/td>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">61<\/td>\n<td style=\"width: 10%;\">53<\/td>\n<td style=\"width: 10%;\">55<\/td>\n<td style=\"width: 10%;\">92<\/td>\n<td style=\"width: 10%;\">68<\/td>\n<td style=\"width: 10%;\">48<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">79<\/td>\n<td style=\"width: 10%;\">51<\/td>\n<td style=\"width: 10%;\">24<\/td>\n<td style=\"width: 10%;\">57<\/td>\n<td style=\"width: 10%;\">48<\/td>\n<td style=\"width: 10%;\">71<\/td>\n<td style=\"width: 10%;\">90<\/td>\n<td style=\"width: 10%;\">81<\/td>\n<td style=\"width: 10%;\">34<\/td>\n<td style=\"width: 10%;\">60<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 10%;\">47<\/td>\n<td style=\"width: 10%;\">39<\/td>\n<td style=\"width: 10%;\">65<\/td>\n<td style=\"width: 10%;\">74<\/td>\n<td style=\"width: 10%;\">49<\/td>\n<td style=\"width: 10%;\">52<\/td>\n<td style=\"width: 10%;\">59<\/td>\n<td style=\"width: 10%;\">9<\/td>\n<td style=\"width: 10%;\">62<\/td>\n<td style=\"width: 10%;\">37<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>We can group the grades by the first digits (in intervals of 10) as follows,<\/p>\n<p style=\"text-align: center;\"><strong>Table 1.7<\/strong>: Working Table for Stem-and-Leaf Diagram<\/p>\n<div style=\"margin: auto;\">\n<table class=\"aligncenter\" style=\"height: 165px; border-spacing: 0px;\" cellpadding=\"2\">\n<tbody>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px; background-color: #F3F0F0;\"><strong>Interval<\/strong><\/td>\n<td style=\"height: 15px; width: 432.125px; background-color: #F3F0F0;\"><strong>Data<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[0, 10)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">9<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[10, 20)<\/td>\n<td style=\"height: 15px; width: 432.125px;\"><\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[20, 30)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">24, 29<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[30, 40)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">34, 37, 37, 39<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[40, 50)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">40, 42, 46, 47, 48, 48, 49, 49,<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[50, 60)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">50, 51, 52, 53, 54, 55, 55, 55,56, 56, 57, 59, 59, 59<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[60, 70)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">60, 60, 61, 62, 65, 65, 68, 68, 68, 68, 68<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[70, 80)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">71, 72, 74, 75, 76, 79<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[80, 90)<\/td>\n<td style=\"height: 15px; width: 432.125px;\">81, 83, 85<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 100px;\">[90, 100]<\/td>\n<td style=\"height: 15px; width: 432.125px;\">90, 92<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>If we take apart the grades and mark the first digit at left side of the line and the second digit at the right side of the line, it becomes a stem-leaf diagram:<a id=\"retfig1.7\"><\/a><\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-77 size-full\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf.png\" alt=\"Stem and leaf diagram of grade. The stems are listed vertically to the left and the leaves of each stem are listed horizontally to the right. Image description available\" width=\"214\" height=\"218\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf.png 214w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf-65x66.png 65w\" sizes=\"auto, (max-width: 214px) 100vw, 214px\" \/><\/p>\n<p style=\"padding-left: 240px;\">Decimal place: 9|0 = 90<\/p>\n<p style=\"text-align: center;\"><strong>Figure 1.7<\/strong>: Stem-and-Leaf Diagram of Grade [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.7\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig1.7\">(See Appendix D Figure 1.7)<\/a>]<\/p>\n<p>The part &#8220;Decimal place: 9|0 = 90&#8221; indicates that the decimal point is one digit to the right of the vertical line.<\/p>\n<p>Some other useful guidelines of the stem-and-leaf diagram are as follows:<\/p>\n<table class=\"aligncenter no-border\" style=\"width: 100%; border-spacing: 0px;\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td style=\"width: 75%;\">\n<ul>\n<li>Keep the stems within the range of the data even though they have no leaf.<\/li>\n<li>If there are too many leaves, break down each stem into two lines. Leaves from 0 to 4 are placed in the first line and 5 to 9 in the second. (See in plot on the right for the grade example. Because the interval [50, 60) has too many leaves, we break the leaves into 2 lines: the first line lists those leaves ranging from 0 to 4, the second line lists leaves ranging from 5 to 9. Do the same to all the other stems.<\/li>\n<li>Divide or multiply the numbers by 10, 100, etc., and then round if necessary to create integers that have at most three digits, and indicate the decimal point if applicable.<\/li>\n<\/ul>\n<\/td>\n<td style=\"width: 228.703125px;\" align=\"center\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-75 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf-02-129x300.png\" alt=\"\" width=\"129\" height=\"300\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf-02-129x300.png 129w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf-02-65x152.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m01_Stem-leaf-02.png 171w\" sizes=\"auto, (max-width: 129px) 100vw, 129px\" \/><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Let&#8217;s consider two data sets. Data set I: 3600, 1500, 6900 and Data set II: 0.36, 0.15, 0.69. It is not a good idea to draw the stem-and-leaf diagram based on the original data sets. Take Data set I for example, all three numbers have a leaf of 0 (the right most digit) and there are many stems without leaves between 150 and 360. Therefore, we divide the numbers by 100 and transform the numbers to 36, 15 69 to draw a stem-and-leaf diagram. Finally, we indicate the decimal point by putting 6|9=6900 at the bottom of the graph. Similarly, we multiply all three numbers 0.36, 0.15, 0.69 by 100 to create a new data set: 36, 15, 69 and then draw a stem-and-leaf diagram.<\/p>\n<p>These two data sets have the same resulting stem-and-leaf diagram as the data set 36, 15, and 69. However, the decimal point is 3 digits to the right of the vertical line for Date set I, i.e., we should indicate 6|9=6900; the decimal point is one digit to the left of the vertical line for Date set II, i.e., 6|9=0.69.<\/p>\n<table class=\"no-border\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 50%;\">Stem-and-Leaf Diagram for Data set 1: 3600, 1500, 6900<\/p>\n<table class=\"aligncenter\" style=\"border-collapse: collapse; height: 108px; width: 20%;\">\n<thead>\n<tr class=\"shaded\" style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">Stem<\/td>\n<td style=\"width: 87.65625px; height: 14px;\">Leaf<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"border-top\" style=\"height: 26px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 26px; text-align: right;\">1<\/td>\n<td style=\"width: 87.65625px; height: 26px;\">5<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 12px; text-align: right;\">2<\/td>\n<td style=\"width: 87.65625px; height: 12px;\"><\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">3<\/td>\n<td style=\"width: 87.65625px; height: 14px;\">6<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">4<\/td>\n<td style=\"width: 87.65625px; height: 14px;\"><\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\"><\/td>\n<td style=\"width: 87.65625px; height: 14px;\"><\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 64.359375px; height: 14px; text-align: right;\">6<\/td>\n<td style=\"width: 87.65625px; height: 14px;\">9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\">Decimal 6|9=6900<\/p>\n<\/td>\n<td style=\"width: 50%;\">Stem-and-Leaf Diagram for Data set 2: 0.36, 0.15, 0.69<\/p>\n<table class=\"aligncenter\" style=\"border-collapse: collapse; width: 20%; height: 110px;\">\n<thead>\n<tr class=\"shaded\" style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">Stem<\/td>\n<td style=\"width: 20.514464567076082%; height: 14px;\">Leaf<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr class=\"border-top\" style=\"height: 26px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 26px; text-align: right;\">1<\/td>\n<td style=\"width: 20.514464567076082%; height: 26px;\">\u00a05<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">2<\/td>\n<td style=\"width: 20.514464567076082%; height: 14px;\"><\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">3<\/td>\n<td style=\"width: 20.514464567076082%; height: 14px;\">6<\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">4<\/td>\n<td style=\"width: 20.514464567076082%; height: 14px;\"><\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\"><\/td>\n<td style=\"width: 20.514464567076082%; height: 14px;\"><\/td>\n<\/tr>\n<tr style=\"height: 14px;\">\n<td class=\"border-right\" style=\"width: 17.646771832818345%; height: 14px; text-align: right;\">6<\/td>\n<td style=\"width: 20.514464567076082%; height: 14px;\">9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"text-align: center;\">Decimal 6|9=0.69<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"author":19,"menu_order":4,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-160","chapter","type-chapter","status-publish","hentry"],"part":34,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/160","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":104,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/160\/revisions"}],"predecessor-version":[{"id":5479,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/160\/revisions\/5479"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/34"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/160\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=160"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=160"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=160"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=160"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}