#set document(title: "3.2 Measures of Spread", author: "Rachel Webb") #set page(width: 8.5in, height: auto, margin: 1in) #import "@preview/cetz:0.5.2" #set text(font: ("STIX Two Text", "Libertinus Serif", "New Computer Modern"), size: 10.5pt, lang: "en") #show math.equation: set text(font: ("STIX Two Math", "New Computer Modern Math")) #set par(justify: true, leading: 0.62em, spacing: 0.9em) #set enum(spacing: 1.1em) // room between list items so tall inline fractions don't collide #set list(spacing: 1.1em) #set table(stroke: 0.5pt + rgb("#c7ccd3")) #let BLUE = rgb("#183B6F") // brand navy — section bars + example/solution labels (white on navy 11.09:1) #let ORANGE = rgb("#A94509") // brand primary-700 — AA-safe deep orange for TEXT (5.93:1 on white; raw brand #F37021 is 2.94:1 and must never carry text) #let RED = rgb("#DC2626") // brand error-600 #let GREEN = rgb("#059669") // brand success-600 (decoration only; small green text uses green-text #007942) #show heading.where(level: 1): it => block(width: 100%, above: 0pt, below: 16pt, fill: gradient.linear(BLUE, rgb("#2C5AA0")), inset: (x: 14pt, y: 12pt), radius: 3pt, text(fill: white, weight: "bold", size: 19pt, it.body)) #show heading.where(level: 2): it => block(width: 100%, above: 18pt, below: 10pt, fill: BLUE, inset: (x: 10pt, y: 6pt), radius: 2pt, text(fill: white, weight: "bold", size: 12pt, it.body)) #show heading.where(level: 3): it => text(fill: ORANGE, weight: "bold", size: 12.5pt, it.body) #show heading.where(level: 4): it => text(fill: BLUE, weight: "bold", size: 10.5pt, it.body) #let examplebox(label, title, body) = block(width: 100%, breakable: true, fill: rgb("#EFF1F5"), stroke: 0.5pt + rgb("#CFDDF0"), radius: 4pt, inset: 10pt, above: 12pt, below: 12pt)[ #block(below: 6pt)[#box(fill: BLUE, inset: (x: 6pt, y: 2pt), radius: 2pt, text(fill: white, weight: "bold", size: 8.5pt, label)) #h(0.4em) #strong[#title]] #body] // rail = decorative left rule (raw brand token); labelcolor = AA-safe label text shade #let notebox(label, rail, labelcolor, tint, body) = block(width: 100%, breakable: true, fill: tint, stroke: (left: 3pt + rail), inset: (left: 10pt, rest: 8pt), radius: (right: 4pt), above: 11pt, below: 11pt)[ #text(fill: labelcolor, weight: "bold", size: 7.5pt, tracking: 0.5pt)[#upper(label)] #linebreak() #body] #let solutionbox(body) = block(above: 4pt, below: 8pt)[ #text(fill: BLUE, weight: "bold", size: 8.5pt)[Solution] #linebreak() #body] #let figph(msg) = block(width: 100%, height: 60pt, fill: rgb("#f6f7f9"), stroke: (paint: rgb("#c7ccd3"), dash: "dashed"), radius: 4pt, inset: 10pt)[ #align(center + horizon, text(fill: rgb("#889"), style: "italic", size: 9pt, msg))] // Standardize inlined figure sizes: measure the natural CeTZ canvas, then scale to a // consistent envelope (aspect-aware; see build_typst.py FIG_* constants). Unlike the // print preamble, dimensions are FLOORED: in an editor a user can trim a figure to a // degenerate 1-D shape (a bare line), and w/h or tw/w would then divide by zero. #let _STD_W = 3.5 #let _WIDE_W = 5.6 #let _MAX_H = 3.4 #let _ASPECT_WIDE = 2.2 #let _UPSCALE_MAX = 1.15 #let stdfig(body) = context { let m = measure(body) let w = calc.max(m.width / 1in, 0.01) let h = calc.max(m.height / 1in, 0.01) let tw = if w / h > _ASPECT_WIDE { _WIDE_W } else { _STD_W } let s = calc.min(tw / w, _MAX_H / h, _UPSCALE_MAX) align(center, box(scale(x: s * 100%, y: s * 100%, reflow: true, body))) } #show figure: set block(breakable: false) #set figure(gap: 8pt) #show figure.caption: set text(size: 8.5pt, fill: rgb("#555")) == 3.2#h(0.6em)Measures of Spread Variability is an important idea in statistics. If you were to measure the height of everyone in your classroom, every student gives you a different value. That means not every student has the same height. Thus, there is variability in people’s heights. If you were to take a sample of the income level of people in a town, every sample gives you different information. There is variability between samples too. Variability describes how the data are spread out. If the data are very close to each other, then there is low variability. If the data are very spread out, then there is high variability. How do you measure variability? It would be good to have a number that measures it. This section will describe some of the different measures of variability, also known as variation. Numerical statistics for variation can show how spread out data is. The variation of data is relative, and is usually used when comparing two sets of similar data. When we are making inferences about an average, we can make better estimates when there is less variation in the data. The four most common measures of the “spread” of data are called the range, variance, standard deviation, and coefficient of variation. A sample of house prices (in \$1,000): 325, 375, 385, 395, 420, and 825, found the mean house price of \$454,167. How much does this tell you about the price of all houses? Can you tell if most of the prices were close to the mean or were the prices really spread out? What is the highest price and the lowest price? All you know is that the center of the price is \$454,167. What if you were approved for only \$400,000 for a home loan, could you buy a home in this area? You need more information. === 3.2.1 Range The range of a set of data is the difference between the highest and the lowest data values (or maximum and minimum values). Note in statistics we only report a single number which represents the spread from the lowest to highest value. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Range = Max – Min. ] #examplebox("Example 1")[][ Look at the following three sets of data. Find the mean, median and range of each of data set. 1. 10, 20, 30, 40, 50 2. 10, 29, 30, 31, 50 3. 28, 29, 30, 31, 32 #solutionbox[ 1. mean = 30, median = 30, range = 50 – 10 = 40 2. mean = 30, median = 30, range = 50 – 10 = 40 3. mean = 30, median = 30, range = 32 – 28 = 4 Based on the mean, median, and range, the first two distributions are the same, but you can see from the graphs that they are distributed differently. In part 1, the data are spread out equally. In part 2, the data has a clump in the middle and a single value at each end. The mean and median are the same for part 3, but the range is much smaller. All the data is clumped together in the middle. ] ] === 3.2.2 Variance & Standard Deviation The range does not really provide a very detailed picture of the variability. A better way to describe how the data is spread out is needed. Instead of looking at the distance as the highest value from the lowest, how about looking at the distance each value is from the mean? This spread is called the deviation. #examplebox("Example 2")[][ Suppose a vet wants to analyze the weights of cats. The weights (in pounds) of five cats are 6.8, 8.2, 7.5, 9.4, and 8.2. Compute the deviation for each of the data values. The deviation is how far each data point is from the mean. To be consistent always subtract the data point minus the mean. \# Cat weights (lb) -- the book's deviation -\> square -\> divide-by-(n-1) pipeline w \<- c(6.8, 8.2, 7.5, 9.4, 8.2) mean(w) \# x-bar -\> 8.02 sum(w - mean(w)) \# deviations always sum to 0 var(w) \# s^2 = 3.728/4 -\> 0.932 sd(w) \# s = sqrt(0.932) -\> 0.9654 #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Reproduce s and s-squared on the calculator] Run 1-Var Stats on the five cat weights in L1 and read Sx = 0.9654, then square it to confirm the variance 0.932. The card also reports the population σx - these five cats are a sample, so Sx is the value that matches the book. - Sx = 0.9654, so s^2 = 0.932 ] #solutionbox[ Variable: X = weight of a cat. First, find the mean for the data set. The mean is #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$] = #math.equation(block: false, alt: "the fraction Σ open parenthesis x close parenthesis over n")[$frac(Σ ( x ), " n ")$] = #math.equation(block: false, alt: "the fraction (6.8+8.2+7.5+9.4+8.2) over 5")[$frac(" (6.8+8.2+7.5+9.4+8.2) ", " 5 ")$] = 8.02 pounds. Subtract the mean from each data point to get the deviations. #figure(figph[Table titled Deviations of Weights of Cats with columns x and x minus x-bar, listing 6.8 − 8.02 = −1.22, 8.2 − 8.02 = 0.18, 7.5 − 8.02 = −0.52, 9.4 − 8.02 = 1.38, and 8.2 − 8.02 = 0.18.], alt: "Table titled Deviations of Weights of Cats with columns x and x minus x-bar, listing 6.8 − 8.02 = −1.22, 8.2 − 8.02 = 0.18, 7.5 − 8.02 = −0.52, 9.4 − 8.02 = 1.38, and 8.2 − 8.02 = 0.18.", caption: none) Figure 3-11 Now average the deviations. Add the deviations together. #figure(figph[Table titled Sum of Deviations of Weights of Cats repeating the five deviations −1.22, 0.18, −0.52, 1.38, and 0.18, with a Total row showing the deviations add to 0.], alt: "Table titled Sum of Deviations of Weights of Cats repeating the five deviations −1.22, 0.18, −0.52, 1.38, and 0.18, with a Total row showing the deviations add to 0.", caption: none) Figure 3-12 The average distance from the mean cannot be zero. The reason the deviations add to 0 is that there are some positive and negative values. The sum of the deviations from the mean will always be zero. To get rid of the negative signs square each deviation. #figure(figph[Table titled Squared Deviations of Weights of Cats with columns x, x minus x-bar, and the squared deviation: squared values are 1.4884, 0.0324, 0.2704, 1.9044, and 0.0324; the Total row shows the deviations sum to 0 and the squared deviations sum to 3.728.], alt: "Table titled Squared Deviations of Weights of Cats with columns x, x minus x-bar, and the squared deviation: squared values are 1.4884, 0.0324, 0.2704, 1.9044, and 0.0324; the Total row shows the deviations sum to 0 and the squared deviations sum to 3.728.", caption: none) Figure 3-13 Then average the total of the squared deviations. The only thing is that in statistics there is a strange average here. Instead of dividing by the number of data values, you divide by the number of data values minus one. This n – 1 is called the degrees of freedom and will be discussed more later in the text. When we divide by the degrees of freedom, this gives an unbiased statistic. In this case, you would have the following: s#super[2] = #math.equation(block: false, alt: "the fraction open parenthesis x minus x bar close parenthesis squared over n minus 1")[$frac(( x − overline(x) )^(2), n − 1)$] = #math.equation(block: false, alt: "the fraction 3.728 over 5 − 1")[$frac(" 3.728 ", " 5 − 1 ")$] = #math.equation(block: false, alt: "the fraction 3.728 over 4")[$frac(" 3.728 ", " 4 ")$] = 0.932 pounds#super[2] Notice that this statistic is denoted as s#super[2] . This statistic is called the sample variance and it is a measure of the average squared distance from the mean. If you now take the square root, you will get the average distance from the mean. The square root of the variance is called the sample standard deviation, and is denoted with the letter s. s= #math.equation(block: false, alt: "the square root of 0.932")[$sqrt(0.932)$] = 0.9654 pounds ] ] The standard deviation is the average (mean) distance from a data point to the mean. It can be thought of as how much a typical data point differs from the mean. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ The #strong[sample variance]formula: s#super[2]= #math.equation(block: false, alt: "the fraction ∑ open parenthesis x minus x bar close parenthesis squared over n minus 1")[$frac(∑ ( x − overline(x) )^(2), n − 1)$]. ] Where #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$] is the sample mean, n is the sample size, and Σ means to find the sum. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ The #strong[sample standard deviation] formula: s = #math.equation(block: false, alt: "the square root of s squared equals the square root of the fraction ∑ open parenthesis x minus x close parenthesis squared over n minus 1")[$sqrt(s^(2)) = sqrt(frac(∑ ( x − x )^(2), n − 1))$]. ] The n – 1 in the denominator has to do with a concept called degrees of freedom (df). Dividing by the df makes the sample standard deviation a better approximation of the population standard deviation than dividing by n. We rarely will find a population variance or standard deviation, but you will need to know the symbols. The #strong[population variance] formula: #math.equation(block: false, alt: "σ squared equals the fraction ∑ open parenthesis x minus μ close parenthesis squared over N")[$σ^(2) = frac(∑ ( x − μ )^(2), N)$]. The population standard deviation formula: #math.equation(block: false, alt: "σ equals the square root of the fraction ∑ open parenthesis x minus μ close parenthesis squared over N")[$σ = sqrt(frac(∑ ( x − μ )^(2), N))$]. The lower-case Greek letter σ pronounced “sigma” and σ#super[2] represents the population variance, μ is the population mean, and N is the size of the population. Note: the sum of the deviations should always be zero. Try not to round too much in the calculations for standard deviation since each rounding causes a slight error. #examplebox("Example 3")[][ Suppose that a manager wants to test two new training programs. They randomly select 5 people for each training type and measures the time it takes to complete a task after the training. The times for both trainings are in table below. Which training method is more consistent? #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Same mean, very different spread] Both training samples are pre-loaded - run 1-Var Stats on L1, then again on L2. The means tie at 60.2 minutes, but Sx = 9.9348 vs 3.3466 shows training 2 is far more consistent. - Same mean 60.2; Sx = 9.9348 vs 3.3466 ] #figure(figph[Table titled Time to Finish Task in Minutes: Training 1 times are 56, 75, 48, 63, and 59; Training 2 times are 60, 58, 66, 59, and 58.], alt: "Table titled Time to Finish Task in Minutes: Training 1 times are 56, 75, 48, 63, and 59; Training 2 times are 60, 58, 66, 59, and 58.", caption: none) #solutionbox[ It is important that you define what each variable is since there are two of them. Variable 1: X#sub[1] = productivity from training 1 Variable 2: X#sub[2] = productivity from training 2 The units and scale are the same for both groups. To answer which training method better, first you need some descriptive statistics. Start with the mean for each sample. #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$]#sub[1]= #math.equation(block: false, alt: "the fraction 56 + 75 + 48 + 63 + 59 over 5")[$frac(" 56 + 75 + 48 + 63 + 59 ", " 5 ")$] = 60.2 minutes #linebreak() #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$]#sub[2]= #math.equation(block: false, alt: "the fraction 60 + 58 + 66 + 59 + 58 over 5")[$frac(" 60 + 58 + 66 + 59 + 58 ", " 5 ")$] = 60.2 minutes Since both means are the same values, you cannot answer the question about which is better. Now calculate the standard deviation for each sample. #figure(figph[Table titled Squared Deviations for Training 1: times 56, 75, 48, 63, and 59 have deviations −4.2, 14.8, −12.2, 2.8, and −1.2, and squared deviations 17.64, 219.04, 148.84, 7.84, and 1.44; totals are 0 for the deviations and 394.8 for the squared deviations.], alt: "Table titled Squared Deviations for Training 1: times 56, 75, 48, 63, and 59 have deviations −4.2, 14.8, −12.2, 2.8, and −1.2, and squared deviations 17.64, 219.04, 148.84, 7.84, and 1.44; totals are 0 for the deviations and 394.8 for the squared deviations.", caption: none) Figure 3-14 #figure(figph[Table titled Squared Deviations for Training 2: times 60, 58, 66, 59, and 58 have deviations −0.2, −2.2, 5.8, −1.2, and −2.2, and squared deviations 0.04, 4.84, 33.64, 1.44, and 4.84; totals are 0 for the deviations and 44.8 for the squared deviations.], alt: "Table titled Squared Deviations for Training 2: times 60, 58, 66, 59, and 58 have deviations −0.2, −2.2, 5.8, −1.2, and −2.2, and squared deviations 0.04, 4.84, 33.64, 1.44, and 4.84; totals are 0 for the deviations and 44.8 for the squared deviations.", caption: none) Figure 3-15 The variance for each sample is: \\begin{aligned} #linebreak() &s\_{1}^{2}=\\frac{394.8}{4}=98.7 \\text { minutes }^{2} \\\\ #linebreak() &s\_{2}^{2}=\\frac{44.8}{4}=11.2 \\text { minutes }^{2} #linebreak() \\end{aligned} The standard deviations are: s#sub[1]= #math.equation(block: false, alt: "the square root of 98.7")[$sqrt(98.7)$] = 9.9348 minutes s#sub[2]= #math.equation(block: false, alt: "the square root of 11.2")[$sqrt(11.2)$] = 3.3466 minutes. Comparing the standard deviations, the second training method seemed to be the better training since the data is less spread out. This means it is more consistent. It would be better for the managers in this case to have a training program that produces more consistent results so they know what to expect for the time it takes to complete the task. ] ] Descriptive statistics can be time-consuming to calculate by hand so use technology. #strong[One Variable Statistics on the TI Calculator] The procedure for calculating the sample mean ( #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$] ) and the sample standard deviation (s#sub[x]) for the TI calculator are shown below. Note, the TI calculator also gives you the population standard deviation (σ#sub[x]) because it does not know whether the data you input is a population or a sample. You need to decide which value you need to use, based on whether you have a population or sample. In almost all cases you have a sample and will be using s#sub[x]. In addition, the calculator uses the notation of s#sub[x] instead of just s. It is just a way for it to denote the information. #strong[TI-84:] Enter the data in a list and then press \[STAT\]. Use cursor keys to highlight CALC. Press 1 or \[ENTER\] to select #strong[1:1-Var Stats]. Press \[2nd\], then press the number key corresponding to your data list. Press \[Enter\] to calculate the statistics. Note: the calculator always defaults to L1 if you do not specify a data list. #figure(figph[Four TI-84 screens: data entered in list L1, the STAT CALC menu with 1:1-Var Stats highlighted, the 1-Var Stats input screen with List set to L1 and Calculate selected, and results showing x-bar = 2, Σx = 10, Σx² = 36, Sx = 2, σx = 1.788854382, and n = 5.], alt: "Four TI-84 screens: data entered in list L1, the STAT CALC menu with 1:1-Var Stats highlighted, the 1-Var Stats input screen with List set to L1 and Calculate selected, and results showing x-bar = 2, Σx = 10, Σx² = 36, Sx = 2, σx = 1.788854382, and n = 5.", caption: none) s#sub[x] is the sample standard deviation. You can arrow down and find more statistics. Use the min and max to calculate the range by hand. To find the variance simply square the standard deviation. #strong[TI-89:] Press \[APPS\], select #strong[FlashApps] then press \[ENTER\]. Highlight #strong[Stats/List Editor] then press \[ENTER\]. Press \[ENTER\] again to select the main folder. To clear a previously stored list of data values, arrow up to the list name you want to clear, press \[CLEAR\], then press enter. #figure(figph[Two TI-89 Stats/List Editor screens: the F4 Calc menu with 1:1-Var Stats at the top, and the 1-Var Stats dialog with List set to list1, Freq set to 1, and Enter=OK and ESC=CANCEL buttons.], alt: "Two TI-89 Stats/List Editor screens: the F4 Calc menu with 1:1-Var Stats at the top, and the 1-Var Stats dialog with List set to list1, Freq set to 1, and Enter=OK and ESC=CANCEL buttons.", caption: none) Press \[F4\], select 1: 1-Var Stats. To get the list name to the List box, press \[2#super[nd]\] \[Var-Link\], arrow down to list1 and press \[Enter\]. This will bring list1 to the List box. Press \[Enter\] to enter the list name and then enter again to calculate. Use the down arrow key to see all the statistics. #figure(figph[TI-89 VAR-LINK screen listing list1 through list6 in the MAIN folder, with list1 highlighted ready to be selected.], alt: "TI-89 VAR-LINK screen listing list1 through list6 in the MAIN folder, with list1 highlighted ready to be selected.", caption: none) #figure(figph[Two TI-89 1-Var Stats result screens showing x-bar = 2, Σx = 10, Σx² = 36, Sx = 2, σx = 1.78885, n = 5, MinX = 0, Q1X = 0.5, MedX = 1, Q3X = 4, MaxX = 5, and sum of squared deviations 16.], alt: "Two TI-89 1-Var Stats result screens showing x-bar = 2, Σx = 10, Σx² = 36, Sx = 2, σx = 1.78885, n = 5, MinX = 0, Q1X = 0.5, MedX = 1, Q3X = 4, MaxX = 5, and sum of squared deviations 16.", caption: none) Sx is the sample standard deviation. You can arrow down and find more statistics. Use the min and max to calculate the range by hand. To find the variance simply square the standard deviation or take the last sum of squares divided by n – 1. #strong[Excel:] Type in the data into one column, select the Data tab, and choose Data Analysis. Select Descriptive Statistics, and then select OK. #figure(figph[Excel Data ribbon with the Data Analysis dialog open over data values 5, 0, 1, 3, and 1 in column A; Descriptive Statistics is highlighted in the Analysis Tools list, with OK, Cancel, and Help buttons at the right.], alt: "Excel Data ribbon with the Data Analysis dialog open over data values 5, 0, 1, 3, and 1 in column A; Descriptive Statistics is highlighted in the Analysis Tools list, with OK, Cancel, and Help buttons at the right.", caption: none) Highlight the data for the Input Range, if you highlighted a label; check the Labels in first row box. Select the circle to the left of Output Range, then click into the box to the right of the Output Range and select one cell where you want the top left-hand corner of your summary table to start. Select the box next to Summary statistics, then select OK, see below. #figure(figph[Excel Descriptive Statistics dialog with Input Range \$A\$1:\$A\$6, Grouped By set to Columns, Labels in first row checked, Output Range \$B\$1, and the Summary statistics box checked.], alt: "Excel Descriptive Statistics dialog with Input Range $A$1:$A$6, Grouped By set to Columns, Labels in first row checked, Output Range $B$1, and the Summary statistics box checked.", caption: none) We get the following summary statistics: #figure(figph[Excel summary statistics table for x: mean 2, standard error 0.8944, median 1, mode 1, standard deviation 2, sample variance 4, kurtosis −0.1875, skewness 0.9375, range 5, minimum 0, maximum 5, sum 10, and count 5.], alt: "Excel summary statistics table for x: mean 2, standard error 0.8944, median 1, mode 1, standard deviation 2, sample variance 4, kurtosis −0.1875, skewness 0.9375, range 5, minimum 0, maximum 5, sum 10, and count 5.", caption: none) In general, a “small” standard deviation means the data are close together (more consistent) and a “large” standard deviation means the data is spread out (less consistent). Sometimes you want consistent data and sometimes you do not. As an example, if you are making bolts, you want the lengths to be very consistent so you want a small standard deviation. If you are administering a test to see who can be a pilot, you want a large standard deviation so you can tell whom the good and bad pilots are. What do “small” and “large” mean? To a bicyclist whose average speed is 20 mph, s = 20 mph is huge. To an airplane whose average speed is 500 mph, s = 20 mph is nothing. The “size” of the variation depends on the size of the numbers in the problem and the mean. Another situation where you can determine whether a standard deviation is small or large is when you are comparing two different samples. A sample with a smaller standard deviation is more consistent than a sample with a larger standard deviation. If we were to compare the variability between two histograms. The standard deviation and variance measure the average spread from left to right. Take a moment and see if you can order the following histograms from the smallest to the largest standard deviation. #figure(figph[Histogram with unlabeled axes showing a U shape: the tallest bars are at the two ends and heights dip to the shortest bars in the middle.], alt: "Histogram with unlabeled axes showing a U shape: the tallest bars are at the two ends and heights dip to the shortest bars in the middle.", caption: none) Figure 3-16 #figure(figph[Histogram with unlabeled axes showing a bell shape: the tallest bar is at the center and bar heights step down symmetrically toward short bars at both ends.], alt: "Histogram with unlabeled axes showing a bell shape: the tallest bar is at the center and bar heights step down symmetrically toward short bars at both ends.", caption: none) Figure 3-17 #figure(figph[Histogram with unlabeled axes showing a roughly uniform shape: seven tall bars of nearly equal height across the whole plot.], alt: "Histogram with unlabeled axes showing a roughly uniform shape: seven tall bars of nearly equal height across the whole plot.", caption: none) FIgure 3-18 #figure(figph[Histogram with unlabeled axes rising to a peak at the third bar and then steadily decreasing to the right, forming a mound with a longer right tail.], alt: "Histogram with unlabeled axes rising to a peak at the third bar and then steadily decreasing to the right, forming a mound with a longer right tail.", caption: none) Figure 3-19 The histogram that has more of the data close to the mean will have the smallest standard deviation. The histogram that has more of the data towards the end points will have a larger standard deviation. Figure 3-16 will have the largest standard deviation since more of the data is grouped in the first and last class. Figure 3-17 will have the smallest standard deviation since more of the data is grouped in the center class which will be close to the mean in a symmetric distribution. Figures 3-18 and 3-19 are harder to compare without also having access to the mean and median to indicate skewness. However, Figure 3-19 does have smaller frequencies in the first and last three classes compared to Figure 3-18. The correct order from smallest to largest standard deviation would be Figure 3-17, Figure 3-19, Figure 3-18, and then Figure 3-16. One should not compare the range, standard deviation or variance of different data sets that have different units or scale. === 3.2.3 Coefficient of Variation The #strong[coefficient of variation], denoted by CVar or CV, is the standard deviation divided by the mean. The units on the numerator and denominator cancel with one another and the result is usually expressed as a percentage. The coefficient of variation allows you to compare variability among data sets when the units or scale is different. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ Coefficient of Variation = CVar = ( #math.equation(block: false, alt: "the fraction s over \\(\\overline{ x")[$frac(" s ", " \\(\\overline{ x ")$] }}\\) #linebreak() ∙ 100) % ] #examplebox("Example 4")[][ The following is a sample of the alcohol content and calories for 12 oz. beers. Is the alcohol content (alcohol by volume ABV) or calories more variable? #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[No CVar button - divide it yourself] ABV (as printed, in %) is in L1 and calories in L2: run 1-Var Stats on each and divide Sx by the mean - (2.0003/5.005)\*100 = 39.97% for ABV vs (46.39875/160.2)\*100 = 28.96% for calories, so alcohol content varies more. The book's Excel run shows the same ABV numbers in decimal form (0.02003/0.05005); the factor of 100 cancels in CVar. - CVar: ABV 39.97% vs calories 28.96% ] Name Brewery ABV Calories in 12 oz. Big Sky Scape Goat Pale Ale Big Sky Brewing 4.70% 163 Sierra Nevada Harvest Ale Sierra Nevada 6.70% 215 Steel Reserve Miller Coors 8.10% 222 O'Doul's Anheuser Busch 0.40% 70 Coors Light Miller Coors 4.15% 104 Genesee Cream Ale High Falls Brewing 5.10% 162 Breakside Pilsner Breakside 5.00% 158 Dark Ale Alberta Brewing Company 5.00% 155 Flying Dog Doggie Style Flying Dog Brewery 4.70% 158 Big Sky I.P.A. Big Sky Brewing 6.20% 195 #solutionbox[ Type in the data to Excel and run descriptive statistics on both data sets to get the following: #figure(figph[Excel descriptive statistics table titled Alcohol Content: mean 0.05005, standard error 0.006326, median 0.05, mode 0.047, standard deviation 0.020003, and sample variance 0.0004.], alt: "Excel descriptive statistics table titled Alcohol Content: mean 0.05005, standard error 0.006326, median 0.05, mode 0.047, standard deviation 0.020003, and sample variance 0.0004.", caption: none) #figure(figph[Excel descriptive statistics table titled Calories in 12 oz.: mean 160.2, standard error 14.67257, median 160, mode 158, standard deviation 46.39875, and sample variance 2152.844.], alt: "Excel descriptive statistics table titled Calories in 12 oz.: mean 160.2, standard error 14.67257, median 160, mode 158, standard deviation 46.39875, and sample variance 2152.844.", caption: none) Next, compute the coefficient of variation using the mean and standard deviation for both data sets. Alcohol Content CVar = ( #math.equation(block: false, alt: "the fraction 0.02003 over 0.05005")[$frac(" 0.02003 ", " 0.05005")$] ∙ 100) % = 39.97% Calories CVar = ( #math.equation(block: false, alt: "the fraction 46.39875 over 160.2")[$frac(" 46.39875 ", " 160.2 ")$] ∙ 100) % = 28.96% The alcohol content varies more than the number of calories. There is no shortcut on the calculator or Excel for CVar, but you can find s and #math.equation(block: false, alt: "x bar")[$limits(x)^(―)$] then simply divide. ] ] #examplebox("Example 5")[][ ]