{"id":287,"date":"2020-06-29T14:19:28","date_gmt":"2020-06-29T18:19:28","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=287"},"modified":"2026-02-18T17:38:23","modified_gmt":"2026-02-18T22:38:23","slug":"2-4-five-number-summary-and-boxplot","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/2-4-five-number-summary-and-boxplot\/","title":{"raw":"2.4 Five-Number Summary and Boxplot","rendered":"2.4 Five-Number Summary and Boxplot"},"content":{"raw":"The five-number summary of a data set consists of the minimum (the smallest observation), [latex]Q_1, Q_2,Q_3[\/latex] and the maximum (the largest observation).\r\n\r\nThese five numbers together give us a brief idea about the distribution of the data: [latex]Q_2[\/latex]\u00a0(the median) is the centre of the distribution, the range (the difference between the maximum and the minimum) and the IQR (the difference between [latex]Q_3[\/latex]\u00a0and [latex]Q_1[\/latex]) tell us the spread (variation) of the data. The difference between [latex]Q_1[\/latex]\u00a0and the minimum, between [latex]Q_2[\/latex]\u00a0and [latex]Q_1[\/latex], between [latex]Q_3[\/latex]\u00a0and [latex]Q_2[\/latex], and between the maximum and [latex]Q_3[\/latex]\u00a0give the range of the first, second, third and fourth 25% of the data respectively. Moreover, the five-number summary helps us identify outliers, those observations that are far away from the bulk of the data.\r\n<h2><strong>2.4.1 Identify Outliers <\/strong><\/h2>\r\nOutliers are observations far away from the majority of the data. Quantitatively, any observation that falls outside the interval of (lower limit, upper limit) is considered as an outlier. The upper and lower limits are defined as:\r\n\r\n[latex] \\text{lower limit} = Q_1 - 1.5 \\times IQR; \\quad \\text{upper limit} = Q_3 + 1.5 \\times IQR.[\/latex]\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Identify Outliers<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nIdentify the outliers for the data 3, 1, 9, 7, 5, 11, 21 if any.\r\n\r\nSteps:\r\n<ol start=\"1\" type=\"1\">\r\n \t<li>Find the quartiles. Refer to Example 4, part (a), [latex]Q_1 = 4, Q_2=7, Q_3=10[\/latex].<\/li>\r\n \t<li>[latex]IQR = Q_3 - Q_1 = 10-4=6[\/latex]<\/li>\r\n \t<li>[latex]\\text{lower limit}=Q_1 -1.5 \\times IQR=4-1.5 \\times 6=-5[\/latex]<\/li>\r\n \t<li>[latex]\\text{upper limit}=Q_3+1.5 \\times IQR=10+1.5 \\times 6=19[\/latex]<\/li>\r\n<\/ol>\r\nSince 21 &gt; 19, it is outside the interval (-5, 19), 21 is an outlier.\r\n\r\n<\/div>\r\n<\/div>\r\n<div style=\"height: 55px;margin-top: 2.1428571429em\">\r\n\r\n<img class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" \/>\r\n\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Choose Proper Measures<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nBased on the histogram and five-number summary of the data, answer the following questions.<a id=\"retfig2.2\"><\/a>\r\n<p style=\"text-align: center\"><strong>Table 2.3<\/strong>: Five-Number Summary of the Data<a id=\"retfig2.2\"><\/a><\/p>\r\n\r\n<table style=\"height: 60px;width: 100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\" align=\"center\">\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 45px\">\r\n<td style=\"height: 45px;width: 138px\" valign=\"top\" height=\"45\">\r\n<div align=\"center\"><strong>Summary<\/strong><\/div><\/td>\r\n<td style=\"height: 45px;width: 66px\" valign=\"top\">\r\n<div align=\"center\"><strong>Min<\/strong><\/div><\/td>\r\n<td style=\"height: 45px;width: 68px\" valign=\"top\">\r\n<div align=\"center\"><strong>Q<sub>1<\/sub><\/strong><\/div><\/td>\r\n<td style=\"height: 45px;width: 78px\" valign=\"top\">\r\n<div align=\"center\"><strong>Median<\/strong><\/div><\/td>\r\n<td style=\"height: 45px;width: 68px\" valign=\"top\">\r\n<div align=\"center\"><strong>Q<sub>3<\/sub><\/strong><\/div><\/td>\r\n<td style=\"height: 45px;width: 68px\" valign=\"top\">\r\n<div align=\"center\"><strong>Max<\/strong><\/div><\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px\">\r\n<td style=\"height: 15px;width: 138px\" valign=\"top\">\r\n<div align=\"center\"><strong>\u00a0<\/strong><\/div><\/td>\r\n<td style=\"height: 15px;width: 66px\" valign=\"top\">\r\n<div align=\"center\">0.1<\/div><\/td>\r\n<td style=\"height: 15px;width: 68px\" valign=\"top\">\r\n<div align=\"center\">2<\/div><\/td>\r\n<td style=\"height: 15px;width: 78px\" valign=\"top\">\r\n<div align=\"center\">3.5<\/div><\/td>\r\n<td style=\"height: 15px;width: 68px\" valign=\"top\">\r\n<div align=\"center\">5<\/div><\/td>\r\n<td style=\"height: 15px;width: 68px\" valign=\"top\">\r\n<div align=\"center\">32<\/div><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n[caption id=\"attachment_255\" align=\"aligncenter\" width=\"300\"]<img class=\"wp-image-255 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram-300x267.png\" alt=\"Histogram of the data the same as the one in the review question 1.7. The y-axis is the frequency and the x-axis is survival time in years. Image description available.\" width=\"300\" height=\"267\" \/> <strong>Figure 2.2<\/strong>: Histogram of the Data [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.2\">Image Description (See Appendix D Figure 2.2)<\/a>][\/caption]\r\n<ol>\r\n \t<li>Comment on the distribution (shape, centre, spread).<\/li>\r\n \t<li>Are there any outliers in the data?<\/li>\r\n \t<li>Provide proper measures of the centre and spread of the data. Explain why.<\/li>\r\n<\/ol>\r\n<details><summary>Show\/Hide Answer<\/summary>\r\n<ol>\r\n \t<li>Comment on the distribution (shape, centre, spread).\r\n<span style=\"text-align: initial;font-size: 1em\">The distribution is unimodal, skewed to the right with a median 3.5 and [latex]IQR = 5-2=3[\/latex].<\/span><\/li>\r\n<\/ol>\r\n<ol start=\"2\">\r\n \t<li>Are there any outliers in the data?\r\n<span style=\"text-align: initial;font-size: 1em\">Yes. [latex]\\text{Upper limit} = Q_3 + 1.5 \\times IQR = 5 + 1.5 \\times 3 = 9.5[\/latex].<\/span><span style=\"text-align: initial;font-size: 1em\">\r\n<\/span><span style=\"text-align: initial;font-size: 1em\">Any observation greater than 9.5 is an outlier.<\/span><\/li>\r\n<\/ol>\r\n<ol start=\"3\">\r\n \t<li>Provide proper measures of the centre and spread of the data. Explain why.\r\n<span style=\"text-align: initial;font-size: 1em\">Use median for the centre and IQR for the spread due to outliers and strong skewness.<\/span><\/li>\r\n<\/ol>\r\n<\/details><\/div>\r\n<\/div>\r\n<h2><strong>2.4.2 Boxplot <\/strong><\/h2>\r\nA <strong>boxplot<\/strong>, also called a box-and-whisker plot, is a useful tool to display the centre and spread of a data set by providing a graphical representation of the five-number summary as well as potential outliers. Steps to draw a boxplot:\r\n<ol>\r\n \t<li>Calculate the five-number summary: minimum, [latex]Q_1, Q_2, Q_3[\/latex], and maximum.<\/li>\r\n \t<li>Calculate the lower and upper limits: [latex]\\text{lower limit}=Q_1 -1.5 \\times IQR[\/latex], and [latex]\\text{upper limit} = Q_3 + 1.5 \\times IQR.[\/latex]<\/li>\r\n \t<li>Find the <strong>adjacent values<\/strong>, the largest and smallest observations <strong>within the lower and upper limits<\/strong>. Identify the potential outliers (observations beyond the upper and lower limits), if any exist.<\/li>\r\n \t<li>Draw short horizontal lines at [latex]Q_1, Q_2, Q_3[\/latex] , and connect them with vertical lines to form a box.<\/li>\r\n \t<li>Draw very short horizontal lines at the adjacent values and then draw the whiskers by connecting the adjacent values and the box with vertical lines.<\/li>\r\n \t<li>Plot each potential outlier with an asterisk.<\/li>\r\n \t<li>Put labels and the title.<\/li>\r\n<\/ol>\r\n<div style=\"height: 55px;margin-top: 2.1428571429em\">\r\n\r\n<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\" \/>\r\n\r\n<\/div>\r\n<ul>\r\n \t<li>A boxplot can be drawn vertically or horizontally.<\/li>\r\n \t<li>Symbols such as circles or asterisks are often used to plot potential outliers.<\/li>\r\n<\/ul>\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Draw a Boxplot<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nConstruct a boxplot for the data 3, 1, 9, 7, 5, 11, 21.\r\n<p align=\"left\">Steps:<\/p>\r\n\r\n<ol>\r\n \t<li>Calculate the five-number summary:\r\nsort: 1, 3, 5, 7, 9, 11, 21\r\n[latex] min = 1, Q_1=4, Q_2=7, Q_3=10, max = 21[\/latex]<\/li>\r\n \t<li>Calculate the lower and upper limits\r\n[latex] IQR = Q_3 - Q_1 = 10 - 4 =6[\/latex]\r\n[latex] \\text{lower\u00a0 limit} = Q_1 -1.5 \\times IQR = 4 - 1.5 \\times 6 = -5[\/latex]\r\n[latex] \\text{upper limit} = Q_3 +1.5 \\times IQR = 10 + 1.5 \\times 6 = 19.[\/latex]<\/li>\r\n \t<li>Adjacent values are 1 and 11, so the max 21 is an outlier.<\/li>\r\n \t<li>Form a box based on [latex] Q_1 = 4, Q_2 = 7, Q_3 = 10.[\/latex]<\/li>\r\n \t<li>Mark the adjacent values 1 and 11, \u201cgrow the whiskers,\u201d the dashed lines connecting the box and the adjacent values.<\/li>\r\n \t<li>Plot the potential outlier with 21.<\/li>\r\n \t<li>Title and label the boxplot.<\/li>\r\n<\/ol>\r\n<p style=\"text-align: center\"><strong>Example Boxplot<a id=\"retfig2.3\"><\/a><\/strong><\/p>\r\n\r\n<\/div>\r\n[caption id=\"attachment_254\" align=\"aligncenter\" width=\"400\"]<img class=\"wp-image-254\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot.png\" alt=\"A boxplot with an upper error bar at 11, third quantile at 10, second quantile at 7, first quantile at 2, and a lower error bar at 1. Image description available.\" width=\"400\" height=\"354\" \/> <strong>Figure 2.3<\/strong>: Resulting Boxplot of the Example [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.3\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.3\">(See Appendix D Figure 2.3)<\/a>][\/caption]\r\n<p align=\"center\"><\/p>\r\n\r\n<\/div>\r\nWe can describe the distribution of the data in the following aspects based on a boxplot:\r\n<ul>\r\n \t<li>The centre: the median [latex]Q_2[\/latex].<\/li>\r\n \t<li>The spread (variation): the range and IQR. Note that, however, the range is sensitive to outliers.<\/li>\r\n \t<li>The shape of the distribution:\r\n<ul>\r\n \t<li><strong>Left skewed<\/strong> if the distance between the lower adjacent value and\u00a0[latex]Q_1[\/latex]\u00a0is larger than the distance between the upper adjacent value and [latex]Q_3[\/latex], and the distance between<i> [latex]Q_1[\/latex]<\/i>\u00a0and the median is larger than the distance between\u00a0[latex]Q_3[\/latex]\u00a0and the median.<\/li>\r\n \t<li><strong>Right skewed<\/strong> if the distance between the lower adjacent value and\u00a0[latex]Q_1[\/latex]\u00a0is smaller than the distance between the upper adjacent value and<i> [latex]Q_3[\/latex]<\/i>, and the distance between<i> [latex]Q_1[\/latex]<\/i>\u00a0and the median is smaller than the distance between<i> [latex]Q_3[\/latex]<\/i>\u00a0and the median.<\/li>\r\n \t<li><strong>Symmetry<\/strong> if the distance between the lower adjacent value and [latex]Q_1[\/latex] is approximately equal to the distance between the upper adjacent value and<i> [latex]Q_3[\/latex]<\/i>, and the distance between<i> [latex]Q_1[\/latex]<\/i> and the median is approximately equal to the distance between<i> [latex]Q_3[\/latex]<\/i>\u00a0and the median.<\/li>\r\n \t<li>Note that it is sometimes the case that the whiskers show skewness in one direction while the box shows skewness in the opposite direction. In such cases, it is not always possible to clearly determine skewness or symmetry.<\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Identify outliers.<\/li>\r\n<\/ul>\r\nThe following are three boxplots that show right skewed, symmetric, and left skewed distributions respectively.<a id=\"retfig2.4\"><\/a>\r\n\r\n<img class=\"alignnone wp-image-252 size-full\" style=\"color: #373d3f;font-weight: bold;font-size: 1em\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions.png\" alt=\"Three boxplots representing three distributions. The first is lower than the second and the second is lower than the third. Image description available.\" width=\"1075\" height=\"323\" \/>\r\n\r\n<strong>Figure 2.4<\/strong>: Boxplots of Skewed and Symmetric Distributions. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.4\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.4\">(See Appendix D Figure 2.4)<\/a>]\r\n\r\nSimilar to side-by-side histograms, we can use side-by-side boxplots to compare different groups.\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Side-by-Side Boxplots<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nI want to compare grades of students who attend lectures with those who do not. Both the table and the side-by-side boxplots tell us that:\r\n<ul>\r\n \t<li>Attendees have a larger median score.<\/li>\r\n \t<li>Non-attendees have a slightly larger variation. Both the IQR (height of the box) and standard deviation of non-attendees are larger than that of attendees.<\/li>\r\n \t<li>Grades of both groups are slightly left skewed with a longer tail on the lower end.<\/li>\r\n<\/ul>\r\n<p style=\"text-align: center\"><strong>Table 2.4<\/strong>: Numerical Summaries of Grades of Non-Attendees and Attendees<a id=\"retfig2.5\"><\/a><\/p>\r\n\r\n<div align=\"center\">\r\n<table class=\"first-col-border\" style=\"height: 69px;width: 100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\r\n<thead>\r\n<tr class=\"border-bottom\" style=\"height: 39px\">\r\n<th style=\"height: 39px;width: 20.45209903121636%;text-align: left\" scope=\"row\" valign=\"top\" height=\"39\"><strong>Summary<\/strong><\/th>\r\n<th style=\"height: 39px;width: 10.76426264800861%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Min<\/strong><\/th>\r\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><em><strong>Q<\/strong><\/em><strong><sub>1<\/sub><\/strong><\/th>\r\n<th style=\"height: 39px;width: 12.378902045209902%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Median<\/strong><\/th>\r\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><strong><em>Q<\/em><sub>3<\/sub><\/strong><\/th>\r\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Max<\/strong><\/th>\r\n<th style=\"height: 39px;width: 12.378902045209902%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Mean<\/strong><\/th>\r\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><strong>SD<\/strong><\/th>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px\">\r\n<th style=\"height: 15px;width: 20.45209903121636%\" scope=\"row\" valign=\"top\"><strong>Non-attendees<\/strong><\/th>\r\n<td style=\"height: 15px;width: 10.76426264800861%\" valign=\"top\">35.62<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">52.70<\/td>\r\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">64.76<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">77.78<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">87.30<\/td>\r\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">63.23<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">15.48<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px\">\r\n<th style=\"height: 15px;width: 20.45209903121636%\" scope=\"row\" valign=\"top\"><strong>Attendees<\/strong><\/th>\r\n<td style=\"height: 15px;width: 10.76426264800861%\" valign=\"top\">47.77<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">69.80<\/td>\r\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">77.83<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">85.15<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">96.51<\/td>\r\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">76.92<\/td>\r\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">11.83<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<\/div>\r\n&nbsp;\r\n<p align=\"center\"><img class=\"aligncenter wp-image-258\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot.png\" alt=\"A pair of boxplots comparing the final grades of non-attendees to attendees. The plot of attendees is overall higher. Image description available.\" width=\"400\" height=\"379\" \/><\/p>\r\n<p style=\"text-align: center\"><strong>Figure 2.5<\/strong>: Side-by-Side Boxplots of Non-Attendees and Attendees. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.5\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.5\">(See Appendix D Figure 2.5)<\/a>]<\/p>\r\n\r\n<\/div>\r\n<\/div>\r\n&nbsp;\r\n<div style=\"height: 55px;margin-top: 2.1428571429em\">\r\n\r\n<img class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" \/>\r\n\r\n<\/div>\r\n<div class=\"textbox textbox--exercises\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Exercise: Draw a Boxplot<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\" style=\"text-align: left\">\r\n\r\nDraw a boxplot for the data:\u00a0-5, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95.\r\n\r\n<details><summary>Show\/Hide Answer<\/summary>\r\n<p style=\"text-align: center\"><strong>Boxplot for Sample Data<a id=\"retfig2.6\"><\/a><\/strong><\/p>\r\n\r\n[caption id=\"attachment_253\" align=\"aligncenter\" width=\"400\"]<img class=\"wp-image-253\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise.png\" alt=\"A boxplot of the data above. Lower adjacent value = 0.05, Q1 = 0.2, Q2 = 0.5, Q3 = 0.7, and upper adjacent value = 0.95. There is a potential outlier at -5. Image description available.\" width=\"400\" height=\"371\" \/> <strong>Figure 2.6<\/strong>: Boxplot for the Sampled Data. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.6\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.6\">(See Appendix D Figure 2.6)<\/a>][\/caption]<strong>Steps<\/strong>:\r\n<ol>\r\n \t<li>Calculate five-number summary:\r\n<span style=\"text-align: initial;font-size: 1em\">sort: -5, 0.05, 0.15, 0.25, 0.35, <\/span><strong style=\"text-align: initial;font-size: 1em\">0.45<\/strong><span style=\"text-align: initial;font-size: 1em\">, 0.55, 0.65, 0.75, 0.85, 0.95\r\n<\/span>[latex]min=-5, Q_1=0.2, Q_2=0.45, Q_3=0.7, max=0.95[\/latex]<\/li>\r\n \t<li>Calculate the lower and upper limits\r\n[latex]IQR=Q_3-Q_1=0.7-0.2=0.5[\/latex]\r\n[latex]\\text{lower limit} =Q_1-1.5 \\times IQR=0.2-1.5 \\times 0.5=-0.55[\/latex]\r\n[latex]\\text{upper limit}=Q_3+1.5 \\times IQR=0.7+1.5 \\times 0.5=1.45[\/latex]<\/li>\r\n \t<li><span style=\"text-align: initial;font-size: 1em\"><span style=\"text-align: initial;font-size: 1em\"><span style=\"text-align: initial;font-size: 1em\"><span style=\"text-align: initial;font-size: 1em\">Adjacent values are 0.05 and 0.95, the min -5 is an outlier.<\/span><\/span><\/span><\/span><\/li>\r\n \t<li>Form a box based on [latex]Q_1=0.2,Q_2=0.45,Q_3=0.7.[\/latex]<\/li>\r\n \t<li>Mark the adjacent values 0.05 and 0.95, and then draw the whiskers, the dashed lines connecting the box and the two adjacent values.<\/li>\r\n \t<li>Plot the outlier -5.<\/li>\r\n \t<li>Title and label boxplot.<\/li>\r\n<\/ol>\r\n<\/details><\/div>\r\n<\/div>","rendered":"<p>The five-number summary of a data set consists of the minimum (the smallest observation), [latex]Q_1, Q_2,Q_3[\/latex] and the maximum (the largest observation).<\/p>\n<p>These five numbers together give us a brief idea about the distribution of the data: [latex]Q_2[\/latex]\u00a0(the median) is the centre of the distribution, the range (the difference between the maximum and the minimum) and the IQR (the difference between [latex]Q_3[\/latex]\u00a0and [latex]Q_1[\/latex]) tell us the spread (variation) of the data. The difference between [latex]Q_1[\/latex]\u00a0and the minimum, between [latex]Q_2[\/latex]\u00a0and [latex]Q_1[\/latex], between [latex]Q_3[\/latex]\u00a0and [latex]Q_2[\/latex], and between the maximum and [latex]Q_3[\/latex]\u00a0give the range of the first, second, third and fourth 25% of the data respectively. Moreover, the five-number summary helps us identify outliers, those observations that are far away from the bulk of the data.<\/p>\n<h2><strong>2.4.1 Identify Outliers <\/strong><\/h2>\n<p>Outliers are observations far away from the majority of the data. Quantitatively, any observation that falls outside the interval of (lower limit, upper limit) is considered as an outlier. The upper and lower limits are defined as:<\/p>\n<p>[latex]\\text{lower limit} = Q_1 - 1.5 \\times IQR; \\quad \\text{upper limit} = Q_3 + 1.5 \\times IQR.[\/latex]<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Identify Outliers<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Identify the outliers for the data 3, 1, 9, 7, 5, 11, 21 if any.<\/p>\n<p>Steps:<\/p>\n<ol start=\"1\" type=\"1\">\n<li>Find the quartiles. Refer to Example 4, part (a), [latex]Q_1 = 4, Q_2=7, Q_3=10[\/latex].<\/li>\n<li>[latex]IQR = Q_3 - Q_1 = 10-4=6[\/latex]<\/li>\n<li>[latex]\\text{lower limit}=Q_1 -1.5 \\times IQR=4-1.5 \\times 6=-5[\/latex]<\/li>\n<li>[latex]\\text{upper limit}=Q_3+1.5 \\times IQR=10+1.5 \\times 6=19[\/latex]<\/li>\n<\/ol>\n<p>Since 21 &gt; 19, it is outside the interval (-5, 19), 21 is an outlier.<\/p>\n<\/div>\n<\/div>\n<div style=\"height: 55px;margin-top: 2.1428571429em\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png 250w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-65x13.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-225x45.png 225w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Choose Proper Measures<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Based on the histogram and five-number summary of the data, answer the following questions.<a id=\"retfig2.2\"><\/a><\/p>\n<p style=\"text-align: center\"><strong>Table 2.3<\/strong>: Five-Number Summary of the Data<a><\/a><\/p>\n<table style=\"height: 60px;width: 100%; border-spacing: 0px; margin: auto;\" cellpadding=\"5\">\n<thead>\n<tr class=\"shaded\" style=\"height: 45px\">\n<td style=\"height: 45px;width: 138px; height: 45px;\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Summary<\/strong><\/div>\n<\/td>\n<td style=\"height: 45px;width: 66px\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Min<\/strong><\/div>\n<\/td>\n<td style=\"height: 45px;width: 68px\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Q<sub>1<\/sub><\/strong><\/div>\n<\/td>\n<td style=\"height: 45px;width: 78px\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Median<\/strong><\/div>\n<\/td>\n<td style=\"height: 45px;width: 68px\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Q<sub>3<\/sub><\/strong><\/div>\n<\/td>\n<td style=\"height: 45px;width: 68px\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>Max<\/strong><\/div>\n<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px\">\n<td style=\"height: 15px;width: 138px\" valign=\"top\">\n<div style=\"margin: auto;\"><strong>\u00a0<\/strong><\/div>\n<\/td>\n<td style=\"height: 15px;width: 66px\" valign=\"top\">\n<div style=\"margin: auto;\">0.1<\/div>\n<\/td>\n<td style=\"height: 15px;width: 68px\" valign=\"top\">\n<div style=\"margin: auto;\">2<\/div>\n<\/td>\n<td style=\"height: 15px;width: 78px\" valign=\"top\">\n<div style=\"margin: auto;\">3.5<\/div>\n<\/td>\n<td style=\"height: 15px;width: 68px\" valign=\"top\">\n<div style=\"margin: auto;\">5<\/div>\n<\/td>\n<td style=\"height: 15px;width: 68px\" valign=\"top\">\n<div style=\"margin: auto;\">32<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<figure id=\"attachment_255\" aria-describedby=\"caption-attachment-255\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-255 size-medium\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram-300x267.png\" alt=\"Histogram of the data the same as the one in the review question 1.7. The y-axis is the frequency and the x-axis is survival time in years. Image description available.\" width=\"300\" height=\"267\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram-300x267.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram-65x58.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram-225x200.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram-350x311.png 350w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_FiveNumber_Historgram.png 450w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-255\" class=\"wp-caption-text\"><strong>Figure 2.2<\/strong>: Histogram of the Data [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.2\">Image Description (See Appendix D Figure 2.2)<\/a>]<\/figcaption><\/figure>\n<ol>\n<li>Comment on the distribution (shape, centre, spread).<\/li>\n<li>Are there any outliers in the data?<\/li>\n<li>Provide proper measures of the centre and spread of the data. Explain why.<\/li>\n<\/ol>\n<details>\n<summary>Show\/Hide Answer<\/summary>\n<ol>\n<li>Comment on the distribution (shape, centre, spread).<br \/>\n<span style=\"text-align: initial;font-size: 1em\">The distribution is unimodal, skewed to the right with a median 3.5 and [latex]IQR = 5-2=3[\/latex].<\/span><\/li>\n<\/ol>\n<ol start=\"2\">\n<li>Are there any outliers in the data?<br \/>\n<span style=\"text-align: initial;font-size: 1em\">Yes. [latex]\\text{Upper limit} = Q_3 + 1.5 \\times IQR = 5 + 1.5 \\times 3 = 9.5[\/latex].<\/span><span style=\"text-align: initial;font-size: 1em\"><br \/>\n<\/span><span style=\"text-align: initial;font-size: 1em\">Any observation greater than 9.5 is an outlier.<\/span><\/li>\n<\/ol>\n<ol start=\"3\">\n<li>Provide proper measures of the centre and spread of the data. Explain why.<br \/>\n<span style=\"text-align: initial;font-size: 1em\">Use median for the centre and IQR for the spread due to outliers and strong skewness.<\/span><\/li>\n<\/ol>\n<\/details>\n<\/div>\n<\/div>\n<h2><strong>2.4.2 Boxplot <\/strong><\/h2>\n<p>A <strong>boxplot<\/strong>, also called a box-and-whisker plot, is a useful tool to display the centre and spread of a data set by providing a graphical representation of the five-number summary as well as potential outliers. Steps to draw a boxplot:<\/p>\n<ol>\n<li>Calculate the five-number summary: minimum, [latex]Q_1, Q_2, Q_3[\/latex], and maximum.<\/li>\n<li>Calculate the lower and upper limits: [latex]\\text{lower limit}=Q_1 -1.5 \\times IQR[\/latex], and [latex]\\text{upper limit} = Q_3 + 1.5 \\times IQR.[\/latex]<\/li>\n<li>Find the <strong>adjacent values<\/strong>, the largest and smallest observations <strong>within the lower and upper limits<\/strong>. Identify the potential outliers (observations beyond the upper and lower limits), if any exist.<\/li>\n<li>Draw short horizontal lines at [latex]Q_1, Q_2, Q_3[\/latex] , and connect them with vertical lines to form a box.<\/li>\n<li>Draw very short horizontal lines at the adjacent values and then draw the whiskers by connecting the adjacent values and the box with vertical lines.<\/li>\n<li>Plot each potential outlier with an asterisk.<\/li>\n<li>Put labels and the title.<\/li>\n<\/ol>\n<div style=\"height: 55px;margin-top: 2.1428571429em\">\n<p><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\" \/><\/p>\n<\/div>\n<ul>\n<li>A boxplot can be drawn vertically or horizontally.<\/li>\n<li>Symbols such as circles or asterisks are often used to plot potential outliers.<\/li>\n<\/ul>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Draw a Boxplot<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Construct a boxplot for the data 3, 1, 9, 7, 5, 11, 21.<\/p>\n<p style=\"text-align: left;\">Steps:<\/p>\n<ol>\n<li>Calculate the five-number summary:<br \/>\nsort: 1, 3, 5, 7, 9, 11, 21<br \/>\n[latex]min = 1, Q_1=4, Q_2=7, Q_3=10, max = 21[\/latex]<\/li>\n<li>Calculate the lower and upper limits<br \/>\n[latex]IQR = Q_3 - Q_1 = 10 - 4 =6[\/latex]<br \/>\n[latex]\\text{lower\u00a0 limit} = Q_1 -1.5 \\times IQR = 4 - 1.5 \\times 6 = -5[\/latex]<br \/>\n[latex]\\text{upper limit} = Q_3 +1.5 \\times IQR = 10 + 1.5 \\times 6 = 19.[\/latex]<\/li>\n<li>Adjacent values are 1 and 11, so the max 21 is an outlier.<\/li>\n<li>Form a box based on [latex]Q_1 = 4, Q_2 = 7, Q_3 = 10.[\/latex]<\/li>\n<li>Mark the adjacent values 1 and 11, \u201cgrow the whiskers,\u201d the dashed lines connecting the box and the adjacent values.<\/li>\n<li>Plot the potential outlier with 21.<\/li>\n<li>Title and label the boxplot.<\/li>\n<\/ol>\n<p style=\"text-align: center\"><strong>Example Boxplot<a id=\"retfig2.3\"><\/a><\/strong><\/p>\n<\/div>\n<figure id=\"attachment_254\" aria-describedby=\"caption-attachment-254\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-254\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot.png\" alt=\"A boxplot with an upper error bar at 11, third quantile at 10, second quantile at 7, first quantile at 2, and a lower error bar at 1. Image description available.\" width=\"400\" height=\"354\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot.png 870w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot-300x266.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot-768x681.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot-65x58.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot-225x199.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot-350x310.png 350w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><figcaption id=\"caption-attachment-254\" class=\"wp-caption-text\"><strong>Figure 2.3<\/strong>: Resulting Boxplot of the Example [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.3\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.3\">(See Appendix D Figure 2.3)<\/a>]<\/figcaption><\/figure>\n<p style=\"text-align: center;\">\n<\/div>\n<p>We can describe the distribution of the data in the following aspects based on a boxplot:<\/p>\n<ul>\n<li>The centre: the median [latex]Q_2[\/latex].<\/li>\n<li>The spread (variation): the range and IQR. Note that, however, the range is sensitive to outliers.<\/li>\n<li>The shape of the distribution:\n<ul>\n<li><strong>Left skewed<\/strong> if the distance between the lower adjacent value and\u00a0[latex]Q_1[\/latex]\u00a0is larger than the distance between the upper adjacent value and [latex]Q_3[\/latex], and the distance between<i> [latex]Q_1[\/latex]<\/i>\u00a0and the median is larger than the distance between\u00a0[latex]Q_3[\/latex]\u00a0and the median.<\/li>\n<li><strong>Right skewed<\/strong> if the distance between the lower adjacent value and\u00a0[latex]Q_1[\/latex]\u00a0is smaller than the distance between the upper adjacent value and<i> [latex]Q_3[\/latex]<\/i>, and the distance between<i> [latex]Q_1[\/latex]<\/i>\u00a0and the median is smaller than the distance between<i> [latex]Q_3[\/latex]<\/i>\u00a0and the median.<\/li>\n<li><strong>Symmetry<\/strong> if the distance between the lower adjacent value and [latex]Q_1[\/latex] is approximately equal to the distance between the upper adjacent value and<i> [latex]Q_3[\/latex]<\/i>, and the distance between<i> [latex]Q_1[\/latex]<\/i> and the median is approximately equal to the distance between<i> [latex]Q_3[\/latex]<\/i>\u00a0and the median.<\/li>\n<li>Note that it is sometimes the case that the whiskers show skewness in one direction while the box shows skewness in the opposite direction. In such cases, it is not always possible to clearly determine skewness or symmetry.<\/li>\n<\/ul>\n<\/li>\n<li>Identify outliers.<\/li>\n<\/ul>\n<p>The following are three boxplots that show right skewed, symmetric, and left skewed distributions respectively.<a id=\"retfig2.4\"><\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-252 size-full\" style=\"color: #373d3f;font-weight: bold;font-size: 1em\" src=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions.png\" alt=\"Three boxplots representing three distributions. The first is lower than the second and the second is lower than the third. Image description available.\" width=\"1075\" height=\"323\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions.png 1075w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions-300x90.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions-1024x308.png 1024w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions-768x231.png 768w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions-65x20.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions-225x68.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Distributions-350x105.png 350w\" sizes=\"auto, (max-width: 1075px) 100vw, 1075px\" \/><\/p>\n<p><strong>Figure 2.4<\/strong>: Boxplots of Skewed and Symmetric Distributions. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.4\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.4\">(See Appendix D Figure 2.4)<\/a>]<\/p>\n<p>Similar to side-by-side histograms, we can use side-by-side boxplots to compare different groups.<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Side-by-Side Boxplots<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>I want to compare grades of students who attend lectures with those who do not. Both the table and the side-by-side boxplots tell us that:<\/p>\n<ul>\n<li>Attendees have a larger median score.<\/li>\n<li>Non-attendees have a slightly larger variation. Both the IQR (height of the box) and standard deviation of non-attendees are larger than that of attendees.<\/li>\n<li>Grades of both groups are slightly left skewed with a longer tail on the lower end.<\/li>\n<\/ul>\n<p style=\"text-align: center\"><strong>Table 2.4<\/strong>: Numerical Summaries of Grades of Non-Attendees and Attendees<a id=\"retfig2.5\"><\/a><\/p>\n<div style=\"margin: auto;\">\n<table class=\"first-col-border\" style=\"height: 69px;width: 100%; border-spacing: 0px;\" cellpadding=\"0\">\n<thead>\n<tr class=\"border-bottom\" style=\"height: 39px\">\n<th style=\"height: 39px;width: 20.45209903121636%;text-align: left; height: 39px;\" scope=\"row\" valign=\"top\"><strong>Summary<\/strong><\/th>\n<th style=\"height: 39px;width: 10.76426264800861%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Min<\/strong><\/th>\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><em><strong>Q<\/strong><\/em><strong><sub>1<\/sub><\/strong><\/th>\n<th style=\"height: 39px;width: 12.378902045209902%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Median<\/strong><\/th>\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><strong><em>Q<\/em><sub>3<\/sub><\/strong><\/th>\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Max<\/strong><\/th>\n<th style=\"height: 39px;width: 12.378902045209902%;text-align: left\" scope=\"col\" valign=\"top\"><strong>Mean<\/strong><\/th>\n<th style=\"height: 39px;width: 10.979547900968784%;text-align: left\" scope=\"col\" valign=\"top\"><strong>SD<\/strong><\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px\">\n<th style=\"height: 15px;width: 20.45209903121636%\" scope=\"row\" valign=\"top\"><strong>Non-attendees<\/strong><\/th>\n<td style=\"height: 15px;width: 10.76426264800861%\" valign=\"top\">35.62<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">52.70<\/td>\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">64.76<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">77.78<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">87.30<\/td>\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">63.23<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">15.48<\/td>\n<\/tr>\n<tr style=\"height: 15px\">\n<th style=\"height: 15px;width: 20.45209903121636%\" scope=\"row\" valign=\"top\"><strong>Attendees<\/strong><\/th>\n<td style=\"height: 15px;width: 10.76426264800861%\" valign=\"top\">47.77<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">69.80<\/td>\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">77.83<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">85.15<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">96.51<\/td>\n<td style=\"height: 15px;width: 12.378902045209902%\" valign=\"top\">76.92<\/td>\n<td style=\"height: 15px;width: 10.979547900968784%\" valign=\"top\">11.83<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-258\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot.png\" alt=\"A pair of boxplots comparing the final grades of non-attendees to attendees. The plot of attendees is overall higher. Image description available.\" width=\"400\" height=\"379\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot.png 720w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot-300x284.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot-65x62.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot-225x213.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Side-by-side_BoxPlot-350x332.png 350w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p style=\"text-align: center\"><strong>Figure 2.5<\/strong>: Side-by-Side Boxplots of Non-Attendees and Attendees. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.5\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.5\">(See Appendix D Figure 2.5)<\/a>]<\/p>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<div style=\"height: 55px;margin-top: 2.1428571429em\">\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-99 alignleft\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png\" alt=\"\" width=\"250\" height=\"50\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity.png 250w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-65x13.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/activity-225x45.png 225w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/p>\n<\/div>\n<div class=\"textbox textbox--exercises\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Exercise: Draw a Boxplot<\/p>\n<\/header>\n<div class=\"textbox__content\" style=\"text-align: left\">\n<p>Draw a boxplot for the data:\u00a0-5, 0.05, 0.15, 0.25, 0.35, 0.45, 0.55, 0.65, 0.75, 0.85, 0.95.<\/p>\n<details>\n<summary>Show\/Hide Answer<\/summary>\n<p style=\"text-align: center\"><strong>Boxplot for Sample Data<a id=\"retfig2.6\"><\/a><\/strong><\/p>\n<figure id=\"attachment_253\" aria-describedby=\"caption-attachment-253\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-253\" src=\"https:\/\/openbooks.macewan.ca\/rcommander\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise.png\" alt=\"A boxplot of the data above. Lower adjacent value = 0.05, Q1 = 0.2, Q2 = 0.5, Q3 = 0.7, and upper adjacent value = 0.95. There is a potential outlier at -5. Image description available.\" width=\"400\" height=\"371\" srcset=\"https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise.png 500w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise-300x278.png 300w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise-65x60.png 65w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise-225x209.png 225w, https:\/\/openbooks.macewan.ca\/introstats\/wp-content\/uploads\/sites\/8\/2020\/06\/m02_Boxplot_Exercise-350x325.png 350w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><figcaption id=\"caption-attachment-253\" class=\"wp-caption-text\"><strong>Figure 2.6<\/strong>: Boxplot for the Sampled Data. [<a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.6\">Image Description <\/a><a href=\"https:\/\/openbooks.macewan.ca\/introstats\/back-matter\/image-description\/#fig2.6\">(See Appendix D Figure 2.6)<\/a>]<\/figcaption><\/figure>\n<p><strong>Steps<\/strong>:<\/p>\n<ol>\n<li>Calculate five-number summary:<br \/>\n<span style=\"text-align: initial;font-size: 1em\">sort: -5, 0.05, 0.15, 0.25, 0.35, <\/span><strong style=\"text-align: initial;font-size: 1em\">0.45<\/strong><span style=\"text-align: initial;font-size: 1em\">, 0.55, 0.65, 0.75, 0.85, 0.95<br \/>\n<\/span>[latex]min=-5, Q_1=0.2, Q_2=0.45, Q_3=0.7, max=0.95[\/latex]<\/li>\n<li>Calculate the lower and upper limits<br \/>\n[latex]IQR=Q_3-Q_1=0.7-0.2=0.5[\/latex]<br \/>\n[latex]\\text{lower limit} =Q_1-1.5 \\times IQR=0.2-1.5 \\times 0.5=-0.55[\/latex]<br \/>\n[latex]\\text{upper limit}=Q_3+1.5 \\times IQR=0.7+1.5 \\times 0.5=1.45[\/latex]<\/li>\n<li><span style=\"text-align: initial;font-size: 1em\"><span style=\"text-align: initial;font-size: 1em\"><span style=\"text-align: initial;font-size: 1em\"><span style=\"text-align: initial;font-size: 1em\">Adjacent values are 0.05 and 0.95, the min -5 is an outlier.<\/span><\/span><\/span><\/span><\/li>\n<li>Form a box based on [latex]Q_1=0.2,Q_2=0.45,Q_3=0.7.[\/latex]<\/li>\n<li>Mark the adjacent values 0.05 and 0.95, and then draw the whiskers, the dashed lines connecting the box and the two adjacent values.<\/li>\n<li>Plot the outlier -5.<\/li>\n<li>Title and label boxplot.<\/li>\n<\/ol>\n<\/details>\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-287","chapter","type-chapter","status-publish","hentry"],"part":209,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/287","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":68,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/287\/revisions"}],"predecessor-version":[{"id":5630,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/287\/revisions\/5630"}],"part":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/parts\/209"}],"metadata":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/287\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=287"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=287"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}