{"id":267,"date":"2020-06-29T12:28:33","date_gmt":"2020-06-29T16:28:33","guid":{"rendered":"https:\/\/openbooks.macewan.ca\/rcommander\/?post_type=chapter&#038;p=267"},"modified":"2025-05-07T17:38:13","modified_gmt":"2025-05-07T21:38:13","slug":"2-3-spread-of-a-distribution","status":"publish","type":"chapter","link":"https:\/\/openbooks.macewan.ca\/introstats\/chapter\/2-3-spread-of-a-distribution\/","title":{"raw":"2.3 Spread (Variation) of a Distribution","rendered":"2.3 Spread (Variation) of a Distribution"},"content":{"raw":"Besides to the centre, we need another descriptive measure to describe how the data spread out. That is called the <strong>spread<\/strong> or <strong>variability<\/strong> of the distribution. Measures of variation covered are the range, interquartile range (IQR), and standard deviation.\r\n<h2><strong>2.3.1 Range and Interquartile Range (IQR)<\/strong><\/h2>\r\nOne intuitive measure of the spread is the <strong>range<\/strong> of the data, which is defined as the difference between the largest and the smallest observations,\r\n<p style=\"text-align: center;\">[latex]\\text{range=maximum-minimum=largest-smallest}.[\/latex]<\/p>\r\nSimilar to the mean, range is sensitive to outliers.\r\n\r\nWe can use the interquartile range\r\n<p style=\"text-align: center;\">[latex] IQR = Q_3 - Q_1,[\/latex]<\/p>\r\nwhich is the difference between [latex]Q_3[\/latex] and [latex]Q_1[\/latex] to describe the spread if the distribution is extremely skewed or outliers exist. The IQR is often paired with the median to describe the spread and the centre of a distribution respectively.\r\n<h2><strong>2.3.2 Standard Deviation<\/strong><\/h2>\r\nLike the mean, the standard deviation takes into account all the observations and measures variation by indicating on average of how far the observations are away from the mean. For a data set with a large amount of variation, i.e., the observations are very different from one another, the standard deviation will be large. For a data set with a small amount of variation, on average, the observations are close to the mean, so the standard deviation will be small.\r\n\r\nSteps to calculate the sample standard deviation are:\r\n<ol>\r\n \t<li>Calculate the sample mean of the data set, [latex] \\bar{x}[\/latex].<\/li>\r\n \t<li>For each observation [latex] x_i[\/latex], find its deviation from the mean [latex] \\bar{x}[\/latex], denoted as [latex] (x_i - \\bar{x})[\/latex]. The sum of the deviations always equals zero, i.e., \u00a0[latex] \\sum _{i=1} ^n (x_i - \\bar{x}) = 0[\/latex].<\/li>\r\n \t<li>In order to obtain quantities that do not sum to zero, take the square of the deviations. The sum of squared deviations, [latex] \\sum _{i=1} ^n (x_i - \\bar{x})^2[\/latex]\u00a0gives a measure of total variation of all the observations.<\/li>\r\n \t<li>Finally, the <strong>sample standard deviation<\/strong>, denoted as [latex]s[\/latex], is calculated as[latex] s = \\sqrt{\\frac{\\sum _{i=1} ^n (x_i - \\bar{x})^2}{n-1}}.[\/latex]<\/li>\r\n<\/ol>\r\nThis is referred as the defining formula of the sample standard deviation.\r\n\r\nThe term\r\n<p style=\"text-align: center;\">[latex] \\begin{equation} s^2 = \\frac{\\sum _{i=1} ^n (x_i - \\bar{x})^2}{n-1} \\end{equation} [\/latex]<\/p>\r\nis defined as the <strong>sample variance<\/strong> of the data. Roughly speaking, it gives the average squared distance from each observation [latex]x_i[\/latex] to the sample mean [latex] \\bar{x}[\/latex]. The square root of the sample variance [latex]s^2[\/latex]\u00a0gives the sample standard deviation [latex]s[\/latex]. Roughly speaking, the sample standard deviation [latex]s[\/latex] can be interpreted as the average distance from each observation [latex]x_i[\/latex]\u00a0to the sample mean [latex] \\bar{x}[\/latex]. Just as the sample mean [latex] \\bar{x}[\/latex]\u00a0is used to estimate the population mean [latex]\\mu[\/latex], the sample variance [latex]s^2[\/latex]\u00a0can be used to estimate the population variance [latex]\\sigma^2[\/latex], and the sample standard deviation [latex]s [\/latex] can be used to estimate the population standard deviation [latex]\\sigma[\/latex].\r\n\r\nIt can be shown that\r\n<p style=\"text-align: center;\">[latex] \\sum _{i=1} ^n (x_i - \\bar{x})^2 = \\sum_{i=1}^n x_i^2 - \\frac{(\\sum_{i=1}^n x_i)^2}{n}.[\/latex]<\/p>\r\nAnd the sample standard deviation becomes\r\n<p style=\"text-align: center;\">[latex] s= \\sqrt{\\frac{(\\sum x_i^2) - \\frac{(\\sum x_i)^2}{n}}{n-1}}.[\/latex]<\/p>\r\nThis is referred as the <strong>computing formula<\/strong> of the sample standard deviation. The defining formula [latex] s= \\sqrt{\\frac{\\sum (x_i - \\bar{x})^2}{n-1}}[\/latex] is\u00a0 helpful in understanding the meaning of the sample standard deviation; while the computing formula [latex]s= \\sqrt{\\frac{(\\sum x_i^2) - \\frac{(\\sum x_i)^2}{n}}{n-1}}[\/latex] is useful in calculating the sample standard deviation by hand since it involves much less calculations.\r\n\r\nThe standard deviation is often paired with the mean to describe the spread and the centre of a distribution respectively.\r\n<div class=\"textbox textbox--examples\"><header class=\"textbox__header\">\r\n<p class=\"textbox__title\">Example: Measures of Spread (Variation)<\/p>\r\n\r\n<\/header>\r\n<div class=\"textbox__content\">\r\n\r\nFind the range, IQR, and sample standard deviation for 3, 5, 3, 7, 7.\r\n<ol>\r\n \t<li>For range\r\n<ul>\r\n \t<li>Sort into <strong>3<\/strong>, 3, 5, 7, <strong>7<\/strong>. The minimum (smallest observation) is 3, and the maximum (largest observation) is 7.<\/li>\r\n \t<li>[latex]\\text{range=maximum-minimum}=7-3=4[\/latex]<\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>For IQR\r\n<ul>\r\n \t<li>Sort into 3, 3, <strong>5<\/strong>, 7, 7.<\/li>\r\n \t<li>[latex]n=5[\/latex] is odd, median [latex]Q_2=5[\/latex].<\/li>\r\n \t<li>The first half is 3, <strong>3<\/strong>, 5. The median of the first half is [latex]Q_1=3[\/latex].\u00a0The second half is 5, <strong>7<\/strong>, 7. The median of the second half is [latex]Q_3=7[\/latex].<\/li>\r\n \t<li>[latex]IQR=Q_3-Q_1=7-3=4[\/latex]<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ol>\r\n<ol start=\"3\">\r\n \t<li>For sample standard deviation, the following table shows the calculation of the sample standard deviation.<\/li>\r\n<\/ol>\r\n<p style=\"text-align: center;\"><strong>Table 2.1<\/strong>: Calculate the Sample Standard deviation Using the Computing Formula<\/p>\r\n\r\n<table class=\"aligncenter\" style=\"height: 105px; width: 100%;\" border=\"0\" width=\"60%\" align=\"center\">\r\n<tfoot>\r\n<tr class=\"shaded\" style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">[latex] \\sum x_i = 25[\/latex]<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">[latex] \\sum x_i^2 = 141[\/latex]<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">[latex] x_i[\/latex]<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">[latex] x_i^2[\/latex]<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">3<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">3<sup>2<\/sup>=9<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">5<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">5<sup>2<\/sup>=25<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">3<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">3<sup>2<\/sup>=9<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">7<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">7<sup>2<\/sup>=49<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">7<\/td>\r\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">7<sup>2<\/sup>=49<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n&nbsp;\r\n<p align=\"center\">[latex]\\begin{align*} s &amp; = \\sqrt{\\frac{(\\sum x_i^2) - \\frac{(\\sum x_i)^2}{n}}{n-1}} \\\\ &amp; = \\sqrt{\\frac{141 - \\frac{25^2}{5}}{5-1}} = \\sqrt{\\frac{141-125}{4}} = \\sqrt{\\frac{16}{4}} = \\sqrt{4} = 2. \\end{align*}[\/latex]<\/p>\r\n<strong>Interpretation<\/strong>: Roughly speaking, the average distance between the observations and the sample mean is 2.\r\n\r\nIf you would like to use the defining formula, it is helpful to construct the following table:\r\n<p style=\"text-align: center;\"><strong>Table 2.2<\/strong>: Calculate the Sample Standard deviation Using the Defining Formula<\/p>\r\n\r\n<table class=\"aligncenter\" style=\"height: 116px; width: 75%;\" border=\"0\" align=\"center\">\r\n<tfoot>\r\n<tr class=\"shaded\" style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 25.336322869955158%;\">[latex] \\sum x =25 [\/latex]<\/td>\r\n<td style=\"height: 15px; width: 40.134529147982065%;\">[latex] \\sum(x_i -\\bar{x})=0[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 34.30493273542601%;\">[latex] \\sum(x_i - \\bar{x})^2 =16[\/latex]<\/td>\r\n<\/tr>\r\n<\/tfoot>\r\n<thead>\r\n<tr class=\"shaded\" style=\"height: 26px;\">\r\n<td style=\"height: 26px; width: 25.336322869955158%; text-align: left;\">[latex] x_i[\/latex]<\/td>\r\n<td style=\"height: 26px; width: 40.134529147982065%; text-align: left;\">Deviation: [latex](x_i - \\bar{x})[\/latex]<\/td>\r\n<td style=\"height: 26px; width: 34.30493273542601%; text-align: left;\">[latex] (x_i -\\bar{x})^2[\/latex]<\/td>\r\n<\/tr>\r\n<\/thead>\r\n<tbody>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]3[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]3-5=-2[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex](-2)^2=4[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]5[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]5-5=0[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex]0^2=0[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]3[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]3-5=-2[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex](-2)^2=4[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]7[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]7-5=2[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex]2^2=4[\/latex]<\/td>\r\n<\/tr>\r\n<tr style=\"height: 15px;\">\r\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]7[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]7-5=2[\/latex]<\/td>\r\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex]2^2=4[\/latex]<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n&nbsp;\r\n\r\nThe sample standard deviation calculated by the defining formula is\r\n<p style=\"text-align: center;\">[latex] s = \\sqrt{\\frac{\\sum _{i=1} ^n (x_i - \\bar{x})^2}{n-1}} = \\sqrt{\\frac{16}{5-1}} = 2[\/latex]<\/p>\r\nwhich is the same as the value obtained by the computing formula.\r\n\r\n<\/div>\r\n<\/div>\r\n<h2><strong>2.3.3 Summary: Choose Proper Measures<\/strong><\/h2>\r\nHere are some guidelines for choosing proper measures to describe the centre and spread (variation) of a distribution:\r\n<ul>\r\n \t<li>Use the <strong>median<\/strong> and the <strong>IQR<\/strong> for the centre and spread respectively when the distribution is skewed or outliers exist.<\/li>\r\n \t<li>Use the <strong>mean<\/strong> and the <strong>standard deviation<\/strong> for the centre and spread respectively when the distribution is roughly symmetric and there are no outliers.<\/li>\r\n \t<li>Although the mode may also be used as a measure of centre for numerical data, it is usually not as informative as the median or the mean.<\/li>\r\n \t<li>For categorical data, the mode is the only descriptive measure we can use to describe the center of qualitative\/categorical data. None of the measures of spread covered in this chapter (i.e., range, IQR, standard deviation) can be applied to qualitative\/categorical data.<\/li>\r\n<\/ul>","rendered":"<p>Besides to the centre, we need another descriptive measure to describe how the data spread out. That is called the <strong>spread<\/strong> or <strong>variability<\/strong> of the distribution. Measures of variation covered are the range, interquartile range (IQR), and standard deviation.<\/p>\n<h2><strong>2.3.1 Range and Interquartile Range (IQR)<\/strong><\/h2>\n<p>One intuitive measure of the spread is the <strong>range<\/strong> of the data, which is defined as the difference between the largest and the smallest observations,<\/p>\n<p style=\"text-align: center;\">[latex]\\text{range=maximum-minimum=largest-smallest}.[\/latex]<\/p>\n<p>Similar to the mean, range is sensitive to outliers.<\/p>\n<p>We can use the interquartile range<\/p>\n<p style=\"text-align: center;\">[latex]IQR = Q_3 - Q_1,[\/latex]<\/p>\n<p>which is the difference between [latex]Q_3[\/latex] and [latex]Q_1[\/latex] to describe the spread if the distribution is extremely skewed or outliers exist. The IQR is often paired with the median to describe the spread and the centre of a distribution respectively.<\/p>\n<h2><strong>2.3.2 Standard Deviation<\/strong><\/h2>\n<p>Like the mean, the standard deviation takes into account all the observations and measures variation by indicating on average of how far the observations are away from the mean. For a data set with a large amount of variation, i.e., the observations are very different from one another, the standard deviation will be large. For a data set with a small amount of variation, on average, the observations are close to the mean, so the standard deviation will be small.<\/p>\n<p>Steps to calculate the sample standard deviation are:<\/p>\n<ol>\n<li>Calculate the sample mean of the data set, [latex]\\bar{x}[\/latex].<\/li>\n<li>For each observation [latex]x_i[\/latex], find its deviation from the mean [latex]\\bar{x}[\/latex], denoted as [latex](x_i - \\bar{x})[\/latex]. The sum of the deviations always equals zero, i.e., \u00a0[latex]\\sum _{i=1} ^n (x_i - \\bar{x}) = 0[\/latex].<\/li>\n<li>In order to obtain quantities that do not sum to zero, take the square of the deviations. The sum of squared deviations, [latex]\\sum _{i=1} ^n (x_i - \\bar{x})^2[\/latex]\u00a0gives a measure of total variation of all the observations.<\/li>\n<li>Finally, the <strong>sample standard deviation<\/strong>, denoted as [latex]s[\/latex], is calculated as[latex]s = \\sqrt{\\frac{\\sum _{i=1} ^n (x_i - \\bar{x})^2}{n-1}}.[\/latex]<\/li>\n<\/ol>\n<p>This is referred as the defining formula of the sample standard deviation.<\/p>\n<p>The term<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{equation} s^2 = \\frac{\\sum _{i=1} ^n (x_i - \\bar{x})^2}{n-1} \\end{equation}[\/latex]<\/p>\n<p>is defined as the <strong>sample variance<\/strong> of the data. Roughly speaking, it gives the average squared distance from each observation [latex]x_i[\/latex] to the sample mean [latex]\\bar{x}[\/latex]. The square root of the sample variance [latex]s^2[\/latex]\u00a0gives the sample standard deviation [latex]s[\/latex]. Roughly speaking, the sample standard deviation [latex]s[\/latex] can be interpreted as the average distance from each observation [latex]x_i[\/latex]\u00a0to the sample mean [latex]\\bar{x}[\/latex]. Just as the sample mean [latex]\\bar{x}[\/latex]\u00a0is used to estimate the population mean [latex]\\mu[\/latex], the sample variance [latex]s^2[\/latex]\u00a0can be used to estimate the population variance [latex]\\sigma^2[\/latex], and the sample standard deviation [latex]s[\/latex] can be used to estimate the population standard deviation [latex]\\sigma[\/latex].<\/p>\n<p>It can be shown that<\/p>\n<p style=\"text-align: center;\">[latex]\\sum _{i=1} ^n (x_i - \\bar{x})^2 = \\sum_{i=1}^n x_i^2 - \\frac{(\\sum_{i=1}^n x_i)^2}{n}.[\/latex]<\/p>\n<p>And the sample standard deviation becomes<\/p>\n<p style=\"text-align: center;\">[latex]s= \\sqrt{\\frac{(\\sum x_i^2) - \\frac{(\\sum x_i)^2}{n}}{n-1}}.[\/latex]<\/p>\n<p>This is referred as the <strong>computing formula<\/strong> of the sample standard deviation. The defining formula [latex]s= \\sqrt{\\frac{\\sum (x_i - \\bar{x})^2}{n-1}}[\/latex] is\u00a0 helpful in understanding the meaning of the sample standard deviation; while the computing formula [latex]s= \\sqrt{\\frac{(\\sum x_i^2) - \\frac{(\\sum x_i)^2}{n}}{n-1}}[\/latex] is useful in calculating the sample standard deviation by hand since it involves much less calculations.<\/p>\n<p>The standard deviation is often paired with the mean to describe the spread and the centre of a distribution respectively.<\/p>\n<div class=\"textbox textbox--examples\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Example: Measures of Spread (Variation)<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>Find the range, IQR, and sample standard deviation for 3, 5, 3, 7, 7.<\/p>\n<ol>\n<li>For range\n<ul>\n<li>Sort into <strong>3<\/strong>, 3, 5, 7, <strong>7<\/strong>. The minimum (smallest observation) is 3, and the maximum (largest observation) is 7.<\/li>\n<li>[latex]\\text{range=maximum-minimum}=7-3=4[\/latex]<\/li>\n<\/ul>\n<\/li>\n<li>For IQR\n<ul>\n<li>Sort into 3, 3, <strong>5<\/strong>, 7, 7.<\/li>\n<li>[latex]n=5[\/latex] is odd, median [latex]Q_2=5[\/latex].<\/li>\n<li>The first half is 3, <strong>3<\/strong>, 5. The median of the first half is [latex]Q_1=3[\/latex].\u00a0The second half is 5, <strong>7<\/strong>, 7. The median of the second half is [latex]Q_3=7[\/latex].<\/li>\n<li>[latex]IQR=Q_3-Q_1=7-3=4[\/latex]<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<ol start=\"3\">\n<li>For sample standard deviation, the following table shows the calculation of the sample standard deviation.<\/li>\n<\/ol>\n<p style=\"text-align: center;\"><strong>Table 2.1<\/strong>: Calculate the Sample Standard deviation Using the Computing Formula<\/p>\n<table class=\"aligncenter\" style=\"height: 105px; width: 100%; width: 60%; margin: auto;\">\n<tfoot>\n<tr class=\"shaded\" style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">[latex]\\sum x_i = 25[\/latex]<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">[latex]\\sum x_i^2 = 141[\/latex]<\/td>\n<\/tr>\n<\/tfoot>\n<thead>\n<tr class=\"shaded\" style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">[latex]x_i[\/latex]<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">[latex]x_i^2[\/latex]<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">3<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">3<sup>2<\/sup>=9<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">5<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">5<sup>2<\/sup>=25<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">3<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">3<sup>2<\/sup>=9<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">7<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">7<sup>2<\/sup>=49<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"width: 224.546875px; height: 15px; text-align: left;\">7<\/td>\n<td style=\"width: 253.59375px; height: 15px; text-align: left;\">7<sup>2<\/sup>=49<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\">[latex]\\begin{align*} s & = \\sqrt{\\frac{(\\sum x_i^2) - \\frac{(\\sum x_i)^2}{n}}{n-1}} \\\\ & = \\sqrt{\\frac{141 - \\frac{25^2}{5}}{5-1}} = \\sqrt{\\frac{141-125}{4}} = \\sqrt{\\frac{16}{4}} = \\sqrt{4} = 2. \\end{align*}[\/latex]<\/p>\n<p><strong>Interpretation<\/strong>: Roughly speaking, the average distance between the observations and the sample mean is 2.<\/p>\n<p>If you would like to use the defining formula, it is helpful to construct the following table:<\/p>\n<p style=\"text-align: center;\"><strong>Table 2.2<\/strong>: Calculate the Sample Standard deviation Using the Defining Formula<\/p>\n<table class=\"aligncenter\" style=\"height: 116px; width: 75%; margin: auto;\">\n<tfoot>\n<tr class=\"shaded\" style=\"height: 15px;\">\n<td style=\"height: 15px; width: 25.336322869955158%;\">[latex]\\sum x =25[\/latex]<\/td>\n<td style=\"height: 15px; width: 40.134529147982065%;\">[latex]\\sum(x_i -\\bar{x})=0[\/latex]<\/td>\n<td style=\"height: 15px; width: 34.30493273542601%;\">[latex]\\sum(x_i - \\bar{x})^2 =16[\/latex]<\/td>\n<\/tr>\n<\/tfoot>\n<thead>\n<tr class=\"shaded\" style=\"height: 26px;\">\n<td style=\"height: 26px; width: 25.336322869955158%; text-align: left;\">[latex]x_i[\/latex]<\/td>\n<td style=\"height: 26px; width: 40.134529147982065%; text-align: left;\">Deviation: [latex](x_i - \\bar{x})[\/latex]<\/td>\n<td style=\"height: 26px; width: 34.30493273542601%; text-align: left;\">[latex](x_i -\\bar{x})^2[\/latex]<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]3[\/latex]<\/td>\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]3-5=-2[\/latex]<\/td>\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex](-2)^2=4[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]5[\/latex]<\/td>\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]5-5=0[\/latex]<\/td>\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex]0^2=0[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]3[\/latex]<\/td>\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]3-5=-2[\/latex]<\/td>\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex](-2)^2=4[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]7[\/latex]<\/td>\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]7-5=2[\/latex]<\/td>\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex]2^2=4[\/latex]<\/td>\n<\/tr>\n<tr style=\"height: 15px;\">\n<td style=\"height: 15px; width: 25.336322869955158%; text-align: left;\">[latex]7[\/latex]<\/td>\n<td style=\"height: 15px; width: 40.134529147982065%; text-align: left;\">[latex]7-5=2[\/latex]<\/td>\n<td style=\"height: 15px; width: 34.30493273542601%; text-align: left;\">[latex]2^2=4[\/latex]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>The sample standard deviation calculated by the defining formula is<\/p>\n<p style=\"text-align: center;\">[latex]s = \\sqrt{\\frac{\\sum _{i=1} ^n (x_i - \\bar{x})^2}{n-1}} = \\sqrt{\\frac{16}{5-1}} = 2[\/latex]<\/p>\n<p>which is the same as the value obtained by the computing formula.<\/p>\n<\/div>\n<\/div>\n<h2><strong>2.3.3 Summary: Choose Proper Measures<\/strong><\/h2>\n<p>Here are some guidelines for choosing proper measures to describe the centre and spread (variation) of a distribution:<\/p>\n<ul>\n<li>Use the <strong>median<\/strong> and the <strong>IQR<\/strong> for the centre and spread respectively when the distribution is skewed or outliers exist.<\/li>\n<li>Use the <strong>mean<\/strong> and the <strong>standard deviation<\/strong> for the centre and spread respectively when the distribution is roughly symmetric and there are no outliers.<\/li>\n<li>Although the mode may also be used as a measure of centre for numerical data, it is usually not as informative as the median or the mean.<\/li>\n<li>For categorical data, the mode is the only descriptive measure we can use to describe the center of qualitative\/categorical data. None of the measures of spread covered in this chapter (i.e., range, IQR, standard deviation) can be applied to qualitative\/categorical data.<\/li>\n<\/ul>\n","protected":false},"author":19,"menu_order":3,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-267","chapter","type-chapter","status-publish","hentry"],"part":209,"_links":{"self":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/267","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":54,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/267\/revisions"}],"predecessor-version":[{"id":5485,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapters\/267\/revisions\/5485"}],"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\/267\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/media?parent=267"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/pressbooks\/v2\/chapter-type?post=267"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/contributor?post=267"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/openbooks.macewan.ca\/introstats\/wp-json\/wp\/v2\/license?post=267"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}