#set document(title: "2.3 Graphical Displays", 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")) == 2.3#h(0.6em)Graphical Displays Statistical graphs are useful in getting the audience’s attention in a publication or presentation. Data presented graphically is easier to summarize at a glance compared to frequency distributions or numerical summaries. Graphs are useful to reinforce a critical point, summarize a data set, or discover patterns or trends over a period of time. Florence Nightingale (1820-1910) was one of the first people to use graphical representations to present data. Nightingale was a nurse in the Crimean War and used a type of graph that she called polar area diagram, or coxcombs to display mortality figures for contagious diseases such as cholera and typhus. #figure(figph[Black-and-white portrait photograph of Florence Nightingale, a young woman wearing a lace cap and lace collar over a dark dress.], alt: "Black-and-white portrait photograph of Florence Nightingale, a young woman wearing a lace cap and lace collar over a dark dress.", caption: none) #link("https://mathshistory.st-andrews.ac.uk/Biographies/Nightingale/")[Nightingale] #figure(figph[Florence Nightingale's polar area diagram titled Diagram of the Causes of Mortality in the Army in the East: two coxcomb charts of monthly wedges for April 1854 to March 1855 and April 1855 to March 1856, where blue wedge areas show deaths from preventable diseases, red deaths from wounds, and black deaths from all other causes.], alt: "Florence Nightingale's polar area diagram titled Diagram of the Causes of Mortality in the Army in the East: two coxcomb charts of monthly wedges for April 1854 to March 1855 and April 1855 to March 1856, where blue wedge areas show deaths from preventable diseases, red deaths from wounds, and black deaths from all other causes.", caption: none) Nightingale-mortality.jpg. (2021, May 18). #emph[Wikimedia Commons, the free media repository]. Retrieved July 2021 from #link("https://commons.wikimedia.org/w/index.php?title=File:Nightingale-mortality.jpg&oldid=561529217.")[https://commons.wikimedia.org/w/index.php?title=File:Nightingale-mortality.jpg&oldid=561529217.] It is hard to provide a complete overview of the most recent developments in data visualization with the onset of technology. The development of a variety of highly interactive software has accelerated the pace and variety of graphical displays across a wide range of disciplines. === 2.3.1 Stem-and-Leaf Plot Stem-and-leaf plots (or stemplots) are a useful way of getting a quick picture of the shape of a distribution by hand. Turn the graph sideways and you can see the shape of your data. You can now easily identify outliers. Each observation is divided into two pieces; the stem and the leaf. If the number is just two digits then the stem would be the tens digit and the leaf would be the ones digit. When a number is more than two digits then the cut point should split the data into enough classes that is useful to see the shape of the data. To create a stem-and-leaf plot: + Separate each observation into a stem and a leaf. + Write the stems in a vertical column in ascending order (from smallest to largest). Fill in missing numbers even if there are gaps in the data. Draw a vertical line to the right of this column. + Write each leaf in the row to the right of its stem, in increasing order. #examplebox("Example 1")[][ Create a stem-and-leaf plot for the sample of 35 ages. \# The 35 ages -- R draws both of the book's stemplots ages \<- c(46,47,49,25,46,22,42,24,46,40,39,27,25,30,33,27,46,21,29,20, 26,25,25,26,35,49,33,26,32,31,39,30,39,29,26) stem(ages, scale = 0.5) \# single stems 2|3|4 -\> Figure 2-6 stem(ages) \# each stem split 0-4 / 5-9 -\> Figure 2-7 \# R prints leaves without spaces: 2 | 0124 reads 20, 21, 22, 24 46 47 49 25 46 22 42 24 46 40 39 27 25 30 33 27 46 21 29 20 26 25 25 26 35 49 33 26 32 31 39 30 39 29 26 #solutionbox[ Divide each number so that the tens digit is the stem and the ones digit is the leaf. The smallest observation is 20. The stem = 2 and the leaf = 0. The next value is 21 and the stem = 2 and the leaf = 1, up to the last value of 49 which would have a stem = 4 and a leaf = 9. If we use the tens categories we have the stems 2, 3 and 4. Line up the stems without skipping a number even if there are no values in that stem. In other words, the stems should have equal spacing (for example, count by ones, tens, hundreds, thousands, etc.). Then place a vertical line to the right of the stems. In each row put the leaves with a space between each leaf. Sort each row from smallest to largest. In Figure 2- 6 the 2 | 0 = 20. \\begin{array}{l|llllllllllllllll} #linebreak() 2 & 0 & 1 & 2 & 4 & 5 & 5 & 5 & 5 & 6 & 6 & 6 & 6 & 7 & 7 & 9 & 9 \\\\ #linebreak() 3 & 0 & 0 & 1 & 2 & 3 & 3 & 5 & 9 & 9 & 9 \\\\ #linebreak() 4 & 0 & 2 & 6 & 6 & 6 & 6 & 7 & 9 & 9 #linebreak() \\end{array} Figure 2-6 It is hard to see the shape with so few classes and so many leaves in each class. We can break each stem in half, putting leaves 0-4 in the first row and 5-9 in the second row, as in Figure 2-7. \\begin{array}{l|llllllllllll} #linebreak() 2 & 0 & 1 & 2 & 4 \\\\ #linebreak() 2 & 5 & 5 & 5 & 5 & 6 & 6 & 6 & 6 & 7 & 7 & 9 & 9 \\\\ #linebreak() 3 & 0 & 0 & 1 & 2 & 3 & 3 \\\\ #linebreak() 3 & 5 & 9 & 9 & 9 \\\\ #linebreak() 4 & 0 & 2 \\\\ #linebreak() 4 & 6 & 6 & 6 & 6 & 7 & 9 & 9 #linebreak() \\end{array} Figure 2-7 Now, add labels and make sure the leaves are in ascending order. Be careful to line the leaves up in columns. You need to be able to compare the lengths of the rows when you interpret the graph. Imagine lines around the leaves and turn the graph 90 degrees to the left. You can now see in Figure 2-8 the shape of the distribution. Note that Excel uses the upper class limit for the axis label. #figure(figph[Stem-and-leaf plot turned on its side so the leaf columns form bars over stems 2, 2, 3, 3, 4, 4, shown beside an Excel histogram of the same data labeled 24 through 49 with a matching shape.], alt: "Stem-and-leaf plot turned on its side so the leaf columns form bars over stems 2, 2, 3, 3, 4, 4, shown beside an Excel histogram of the same data labeled 24 through 49 with a matching shape.", caption: none) Figure 2-8 If a leaf takes on more than the ones category then supply a footnote at the bottom of the plot with the units. ] ] #examplebox("Example 2")[][ A small sample of house prices in thousands of dollars was collected: 375, 189, 432, 225, 305, 275. Make a stem-and-leaf plot. #solutionbox[ If we were to split the stem and leaf between the ones and tens place, then we would need stems going from 18 up to 43. Twenty-six stems for only six data points is too many. The next break then for a stem would be between the tens and hundreds. This would give stems from 1 to 4. Then each leaf will be the ones and tens. For example, then number 375 would have a stem = 3 and a leaf = 75. \\begin{array}{l|ll} #linebreak() 1 & 89 \\\\ #linebreak() 2 & 25 & 75 \\\\ #linebreak() 3 & 05 & 75 \\\\ #linebreak() 4 & 32 #linebreak() \\end{array} Leaf = \$1000 ] ] #examplebox("Example 3")[][ A small sample of coffee prices: 3.75, 1.89, 4.32, 2.25, 3.05, 2.75 was collected. Make a stem-and-leaf plot. #solutionbox[ \\begin{array}{l|ll} #linebreak() 1 & 89 \\\\ #linebreak() 2 & 25 & 75 \\\\ #linebreak() 3 & 05 & 75 \\\\ #linebreak() 4 & 32 #linebreak() \\end{array} Leaf = \$0.01 Note that the last two stem-and-leaf plots look identical except for the footnote. It is important to include units to tell people what the stems and leaves mean by inserting a legend. Back-to-back stem-and-leaf plots let us compare two data sets on the same number line. The two samples share the same set of stems. The sample on the right is written backward from largest leaf to smallest leaf, and the sample on the left has leaves from smallest to largest. ] ] #examplebox("Example 4")[][ Use the following back-to-back stem-and-leaf plot to compare pulse rates before and after exercise. #figure(figph[Back-to-back stem-and-leaf plot of pulse rates before and after exercise sharing stems 6 through 12; before-exercise leaves on the left run from 62 to 104 and after-exercise leaves on the right run from 85 to 128.], alt: "Back-to-back stem-and-leaf plot of pulse rates before and after exercise sharing stems 6 through 12; before-exercise leaves on the left run from 62 to 104 and after-exercise leaves on the right run from 85 to 128.", caption: none) #solutionbox[ The group on the left has leaves going in descending order and represent the pulse rates before exercise. The stems are in the middle column. The group on the right has leaves going in ascending order and represent the pulse rates after exercise. The first row has pulse rates of 62, 65, 66, 67, 68, 68 and 69. The last row of pulse rates are 124, 125, and 128. ] ] === 2.3.2 Histogram A #strong[histogram]is a graph for quantitative data (we call these bar graphs for qualitative data). The data is divided into a number of classes. The class limits become the horizontal axis demarcated with a number line and the vertical axis is either the frequency or the relative frequency of each class. Figure 2-9 is an example of a histogram. The histogram for quantitative data looks similar to a bar graph, except there are some major differences. First, in a bar graph the categories can be put in any order on the horizontal axis. There is no set order for these nominal data. You cannot say how the data is distributed based on the shape, since the shape can change just by putting the categories in different orders. With quantitative data, the data are in a specific order, since you are dealing with numbers. With quantitative data, you can talk about a distribution shape. This leads to the second difference from bar graphs. In a bar graph, the categories that you made in the frequency table were the words used for the category name. In quantitative data, the categories are numerical categories, and the numbers are determined by how many classes you choose. If two people have the same number of categories, then they will have the same frequency distribution. Whereas in qualitative data, there can be many different categories depending on the point of view of the author. The third difference is that the bars touch with quantitative data, and there will be no gaps in the graph. The reason that bar graphs have gaps is to show that the categories do not continue on, as they do in quantitative data. Since the graph for quantitative data is different from qualitative data, it is given a different name of histogram. Some key features of a histogram: - Equal spacing on each axis - Bars are the same width - Label each axis and title the graph - Show the scale on the frequency axis - Label the categories on the category axis - The bars should touch at the class boundaries #figure(figph[Histogram of ages with class boundaries 25.5 through 75.5 on the x-axis and frequency up to 60 on the y-axis; bar heights 5, 20, 50, 20, and 5 form a symmetric shape peaking between 45.5 and 55.5.], alt: "Histogram of ages with class boundaries 25.5 through 75.5 on the x-axis and frequency up to 60 on the y-axis; bar heights 5, 20, 50, 20, and 5 form a symmetric shape peaking between 45.5 and 55.5.", caption: [Figure 2-9]) To create a histogram, you must first create a frequency distribution. Software and calculators can create histograms easily when a large amount of sample data is being analyzed. #strong[Excel] To create a histogram in Excel you will need to first install the Data Analysis tool. If your Data Analysis is not showing in the Data tab, follow the directions for installing the free add-in here: https://support.office.com/en-us/article/Load-the-Analysis-ToolPak-in-Excel-6a63e598-cd6d-42e3-9317- 6b40ba1a66b4. Type in the data into one blank column in any order. If you want to have class widths other than Excel’s default setting, type in a new column the endpoints of each class found in your frequency distribution, these are called the bins in Excel. #examplebox("Example 5")[][ Using the sample of 35 ages, make a histogram using Excel. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Skip the Data Analysis add-in] Opens a histogram of the 35 ages in L1: with Class width 5 and the first class starting at 20 (the panel suggests exactly that) the bars read 4, 12, 6, 4, 2, 7 like Figure 2-9, and the table under the chart is Figure 2-1's frequency table with relative frequencies alongside. Change the width to 10 - the same data gives a different impression, the book's warning about choosing classes. - Histogram of the 35 ages: bars 4, 12, 6, 4, 2, 7 ] 46 47 49 25 46 22 42 24 46 40 39 27 25 30 33 27 46 21 29 20 26 25 25 26 35 49 33 26 32 31 39 30 39 29 26 #solutionbox[ Type the data in any order into column A and the bins in order in column B as shown below. Then select the Data tab, select Data Analysis, select Histogram, then select OK. #figure(figph[Excel Data tab with the Data Analysis dialog open and Histogram selected in the Analysis Tools list; the worksheet has Age data starting at 20 in column A and bins 24, 29, 34, 39, 44, 49 in column B.], alt: "Excel Data tab with the Data Analysis dialog open and Histogram selected in the Analysis Tools list; the worksheet has Age data starting at 20 in column A and bins 24, 29, 34, 39, 44, 49 in column B.", caption: none) In the dialogue box, click into the Input Range box, then use your mouse and highlight the ages including the label. Then click into the Bin Range box and use your mouse to highlight the bins including the label. Select the box for Labels only if you included the labels in your ranges. You can have your output default to a new worksheet, or select the circle to the left of Output Range, click into the box to the right of Output Range and then select one blank cell on your spreadsheet where you want the top left-hand corner of your table and graph to start. Then check the boxes next to Cumulative Percentage and Chart Output. Then select OK, and see below. #figure(figph[Excel Histogram dialog with Input Range \$A\$1:\$A\$36, Bin Range \$B\$1:\$B\$7, Labels checked, Output Range set to \$C\$1, and the Cumulative Percentage and Chart Output boxes both checked.], alt: "Excel Histogram dialog with Input Range $A$1:$A$36, Bin Range $B$1:$B$7, Labels checked, Output Range set to $C$1, and the Cumulative Percentage and Chart Output boxes both checked.", caption: none) A histogram needs to have bars that touch, which is not the default in Excel. To get the bars to touch, right-click on one of the blue bars and select Format Data Series and slide the Gap Width to 0%. #figure(figph[Excel worksheet with a bin, frequency, and cumulative percent table beside a histogram whose right-click menu is open at Format Data Series; the Format Data Series pane shows Series Overlap and Gap Width at 0%.], alt: "Excel worksheet with a bin, frequency, and cumulative percent table beside a histogram whose right-click menu is open at Format Data Series; the Format Data Series pane shows Series Overlap and Gap Width at 0%.", caption: none) Excel produces both a frequency table and a histogram. The table has the frequencies and the cumulative relative frequencies. #figure(table( columns: 3, align: left, inset: 6pt, table.header([Bin], [Frequency], [Cumulative %]), [24], [4], [11.43%], [29], [12], [45.71%], [34], [6], [62.86%], [39], [4], [74.29%], [44], [2], [80.00%], [49], [7], [100.00%], [More], [0], [100.00%], )) The histogram has bars for the height of each frequency and then makes a line graph of the cumulative relative frequencies over the bars. This red line is a line graph of the cumulative relative frequencies, also called an ogive and is discussed in a later section. #figure(figph[Excel histogram with blue frequency bars of heights 4, 12, 6, 4, 2, and 7 for bins 24 through 49 plus More, and an orange cumulative percent line rising to 100% against a secondary axis on the right.], alt: "Excel histogram with blue frequency bars of heights 4, 12, 6, 4, 2, and 7 for bins 24 through 49 plus More, and an orange cumulative percent line rising to 100% against a secondary axis on the right.", caption: none) It is important to note that the number of classes that are used and the value of the first class boundary will change the shape of the histogram. A relative frequency histogram is when the relative frequencies are used for the vertical axis instead of the frequencies and the y-axis will represent a percent instead of the number of people. In Excel, after you create your histogram, you can manually change the frequency column to the relative frequency values by dividing each number by the sample size. Here is a screen shot just as the last number was changed, note as soon as you hit enter the bars will shrink and adjust. #figure(figph[Excel worksheet mid-edit where the histogram frequencies are being replaced by relative frequencies 0.114286 through 0.057143 with =7/35 typed for bin 49; the chart still shows one tall bar of height 7 at bin 49 above nearly flat bars.], alt: "Excel worksheet mid-edit where the histogram frequencies are being replaced by relative frequencies 0.114286 through 0.057143 with =7/35 typed for bin 49; the chart still shows one tall bar of height 7 at bin 49 above nearly flat bars.", caption: none) After the last value =7/35 was entered and the label changed to Relative Frequency you get the following graph. #figure(figph[Excel relative frequency histogram of ages with bins 24 through 49; the bars rise to 0.114286, 0.342857, 0.171429, 0.114286, 0.057143, and 0.2, with the tallest bar at bin 29.], alt: "Excel relative frequency histogram of ages with bins 24 through 49; the bars rise to 0.114286, 0.342857, 0.171429, 0.114286, 0.057143, and 0.2, with the tallest bar at bin 29.", caption: none) The shape of the histogram will be the same for the relative frequency distribution and the frequency distribution; the height, though, is the proportion instead of frequency. ] ] #strong[TI-84:] To make a histogram, enter the data by pressing \[STAT\]. The first option is already highlighted (1:Edit) so you can either press \[ENTER\] or \[1\]. Make sure the cursor is in the list, not on the list name and type the desired values pressing \[ENTER\] after each one. #figure(figph[Two TI-84 screens: the STAT EDIT menu listing 1:Edit, 2:SortA(, 3:SortD(, 4:ClrList, and 5:SetUpEditor, and the list editor with values 27, 29, 49, 39, 26, 26 entered into list L1.], alt: "Two TI-84 screens: the STAT EDIT menu listing 1:Edit, 2:SortA(, 3:SortD(, 4:ClrList, and 5:SetUpEditor, and the list editor with values 27, 29, 49, 39, 26, 26 entered into list L1.", caption: none) Press \[2nd\] \[QUIT\] to return to the home screen. To clear a previously stored list of data values, arrow up to the list name you want to clear, press \[CLEAR\], and then press enter. An alternative way is press \[STAT\], press 4 for 4:ClrList, press \[2nd\], then press the number key corresponding to the data list you wish to clear, for example, \[2#super[nd]\] \[1\] will clear L#sub[1], then press \[ENTER\]. After you enter the data, press \[2#super[nd]\] \[STAT PLOT\]. Select the first plot by hitting \[Enter\] or the number \[1:Plot 1\]. Turn the plot \[On\] by moving the cursor to On and selecting Enter. Select the Histogram option using the right arrow keys. Select \[Zoom\], then \[ZoomStat\]. #figure(figph[Four TI-84 screens for making a histogram: the STAT PLOTS menu with the STAT PLOT key circled, the Plot1 setup turned On with the histogram type and Xlist L1, the Zoom menu with 9:ZoomStat highlighted and the ZOOM key circled, and the resulting histogram.], alt: "Four TI-84 screens for making a histogram: the STAT PLOTS menu with the STAT PLOT key circled, the Plot1 setup turned On with the histogram type and Xlist L1, the Zoom menu with 9:ZoomStat highlighted and the ZOOM key circled, and the resulting histogram.", caption: none) You can see and change the class width by selecting \[Window\], then change the minimum #emph[x] value Xmin=20, the maximum #emph[x] value Xmax=50, the x-scale to Xscl=5 and the minimum #emph[y] value Ymin=-6.5 and the maximum #emph[y] value to Ymax=14. Select the \[GRAPH\] button. We get a similar looking Histogram compared to the stem-and-leaf plot and Excel histogram. Select the \[TRACE\] button to see the height of each bar and the classes. #figure(figph[Two TI-84 screens: the WINDOW settings Xmin=20, Xmax=50, Xscl=5, Ymin=-2, Ymax=14, Yscl=1, and the graphed histogram whose tallest bar is second from the left.], alt: "Two TI-84 screens: the WINDOW settings Xmin=20, Xmax=50, Xscl=5, Ymin=-2, Ymax=14, Yscl=1, and the graphed histogram whose tallest bar is second from the left.", caption: none) #strong[TI-89:] First, enter the data into the Stat/List editor under list 1. Press \[APP\] then scroll down to Stat/List Editor, on the older style TI-89 calculators, go into the Flash/App menu, and then scroll down the list. Make sure the cursor is in the list, not on the list name, and type the desired values pressing \[ENTER\] after each one. To clear a previously stored list of data values, arrow up to the list name you want to clear, press \[CLEAR\], and then press enter. After you enter the data, select Press \[F2\] Plots, scroll down to \[1: Plot Setup\] and press \[Enter\]. #figure(figph[Four TI-89 screens: the Apps desktop with Stats/List Editor highlighted, the folder selection dialog with current folder main, the Plots menu open over list1 with 1:Plot Setup at the top, and the Plot Setup screen listing Plot 1 through Plot 9.], alt: "Four TI-89 screens: the Apps desktop with Stats/List Editor highlighted, the folder selection dialog with current folder main, the Plots menu open over list1 with 1:Plot Setup at the top, and the Plot Setup screen listing Plot 1 through Plot 9.", caption: none) Select \[F1\] Define. Use your arrow keys to select Histogram for Type, and then scroll down to the x-variable box. Press \[2#super[nd]\] \[Var-Link\] this key is above the \[+\] sign. Then arrow down until you find your List1 name under the Main file folder. Then press \[Enter\] and this will bring the name List1 back to the menu. You will now see that Plot1 has a small picture of a histogram. To view the histogram, select \[F5\] \[Zoom Data\]. #figure(figph[Four TI-89 screens defining a histogram: the Plot Type menu with 4:Histogram highlighted, the VAR-LINK screen listing list1 through list6, the Define Plot 1 form with x set to list1 and Hist. Bucket Width 5, and the Plot Setup screen with Plot 1 checked.], alt: "Four TI-89 screens defining a histogram: the Plot Type menu with 4:Histogram highlighted, the VAR-LINK screen listing list1 through list6, the Define Plot 1 form with x set to list1 and Hist. Bucket Width 5, and the Plot Setup screen with Plot 1 checked.", caption: none) The histogram looks a little different from Excel; you can change the settings for the bucket to match your table. Press \[♦\] \[F2:Window\]. Change the minimum #emph[x] value xmin=20, the maximum #emph[x] value xmax=50, the x-scale to xscl=5 and the minimum y value ymin=-6.5 and the maximum y value to ymax=14. Then press the \[♦\] \[F3:GRAPH\] button. Select \[F3:Trace\] to see the frequency for each bar. Then use your left and right arrow keys to move to the other bars. #figure(figph[Two TI-89 screens: window settings xmin=20, xmax=50, xscl=5, ymin=-6.5, ymax=14, yscl=1, and the traced histogram P1 with the cursor on the first bar reading min: 20, max: 25, n: 4.], alt: "Two TI-89 screens: window settings xmin=20, xmax=50, xscl=5, ymin=-6.5, ymax=14, yscl=1, and the traced histogram P1 with the cursor on the first bar reading min: 20, max: 25, n: 4.", caption: none) #examplebox("Example 6")[][ Make a histogram for the following random sample of student rent prices using Excel. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Spot the rent outlier] The 24 rents load into L1. Set Class width to 315 and the first class to start at 349.5 - the book's class boundaries - and the bars read 4, 8, 5, 6, 0, 0, 1: after two empty classes one value sits alone in 2239.5-2554.5, the \$2,550 outlier the book investigates. - Rent histogram: bars 4, 8, 5, 6, 0, 0, 1 (outlier \$2,550) ] 1500 1350 350 1200 850 900 1500 1150 1500 900 1400 1100 1250 600 610 960 890 1325 900 800 2550 495 1200 690 #solutionbox[ Start by making a relative frequency distribution table with 7 classes. + Find the range: largest value – smallest value = 2550 – 350 = 2200, range = \$2,200. + Find the class width: width = #math.equation(block: false, alt: "the fraction range over 7")[$frac(" range ", " 7 ")$] = #math.equation(block: false, alt: "the fraction 2000 over 7")[$frac(" 2000 ", " 7 ")$] ≈ 314.286. Round up to 315. Always round up to the next integer even if the width is already an integer. + Find the class limits: Start at the smallest observation. This is the lower class limit for the first class. Add the class width to get the lower limit of the next class. Keep adding the class width to get all the lower limits, 350 + 315 = 665, 665 + 315 = 980, 980 + 315 = 1295, etc. The upper limit is one unit less than the next lower limit: so, for the first class the upper class limit would be 665 – 1 = 664. When you have all 7 classes, make sure the last number, in this case the 2550, is at least as large as the largest value in the data. If not, you made a mistake somewhere. Using Excel: Type the raw data in Excel in column A, the right-hand class endpoints for the bins in column B. Select Data, Data Analysis, Histogram. Select the Input Range, Bin Range, Labels (if you selected them), output option, Chart Output, then OK. See finished histogram below in Figure 2-13. #figure(figph[Excel Histogram dialog for rent data with Input Range \$A\$1:\$A\$25, Bin Range \$B\$1:\$B\$8, Labels checked, Output Range \$D\$1, and Chart Output checked; column A lists monthly rents and column B the bins 664 through 2554.], alt: "Excel Histogram dialog for rent data with Input Range $A$1:$A$25, Bin Range $B$1:$B$8, Labels checked, Output Range $D$1, and Chart Output checked; column A lists monthly rents and column B the bins 664 through 2554.", caption: none) Figure 2-10 By hand: Tally and find the frequency of the data. #strong[Frequency Distribution for Monthly Rent] #figure(table( columns: 4, align: left, inset: 6pt, table.header([Class Limits], [Tally], [Frequency], [Relative Frequency]), [350-664], [4], [4], [0.1667], [665-979], [8], [8], [0.333], [980-1294], [5], [5], [0.2083], [1295-1609], [6], [6], [0.25], [1610-1924], [0], [0], [0], [1925-2239], [0], [0], [0], [2240-2554], [1], [1], [0.0417], [Total], [0], [24], [1], )) Figure 2-11 Make sure the total of the frequencies is the same as the number of data points and the total of the relative frequency is one. Since we want the bars on the histogram to touch, the number line needs to use the class boundaries that are half way between the endpoints of the class limits. Start by finding the distance between the class endpoints and divide by two: (665-664)/2 = 0.5. Then subtract 0.5 from the left-hand side of each class limit and this will give you the points to use on the x-axis: 349.5, 664.5, 979.5, 1294.5, 1609.5, 1924.5, 2239.5, and 2554.5. Then draw your graph as in Figure 2-12. You can use frequencies or relative frequencies for the y-axis. #figure(figph[Hand-drawn histogram of monthly rent with frequency up to 8 on the y-axis and class boundaries 349.5 through 2554.5 on the x-axis; bar heights are 4, 8, 5, and 6 for the first four classes, zero for the next two, and 1 for the last.], alt: "Hand-drawn histogram of monthly rent with frequency up to 8 on the y-axis and class boundaries 349.5 through 2554.5 on the x-axis; bar heights are 4, 8, 5, and 6 for the first four classes, zero for the next two, and 1 for the last.", caption: none) Figure 2-12 #figure(figph[Excel histogram of rent prices with bins labeled 664, 979, 1294, 1609, 1924, 2239, 2554, and More; frequencies are 4, 8, 5, 6, then 0, 0, and 1, with the tallest bar of 8 at bin 979.], alt: "Excel histogram of rent prices with bins labeled 664, 979, 1294, 1609, 1924, 2239, 2554, and More; frequencies are 4, 8, 5, 6, then 0, 0, and 1, with the tallest bar of 8 at bin 979.", caption: none) Figure 2-13 Reviewing the graph in Figure 2-13, you can see that most of the students pay around \$750 per month for rent, with about \$1,500 being the other common value. Most students pay between \$600 and \$1,600 per month for rent. Of course, these values are just estimates pulled from the graph. There is a large gap between the \$1,500 class and the highest data value. This seems to say that one student is paying a great deal more than everyone else is. This value may be an outlier. ] ] An #strong[outlier]is a data value that is far from the rest of the values. It may be an unusual value or a mistake. It is a data value that should be investigated. In this case, the student lives in a very expensive part of town, thus the value is not a mistake, and is just very unusual. There are other aspects that can be discussed, but first some other concepts need to be introduced. === 2.3.3 Ogive The line graph for the cumulative or cumulative relative frequency is called an #strong[ogive] (#link("https://en.Wikipedia.org/wiki/Ogive")[oh-jyve]). To create an ogive, first create a scale on both the horizontal and vertical axes that will fit the data. Then plot the points of the upper class boundary versus the cumulative (or cumulative relative) frequency. Make sure you include the point with the lowest class and the zero cumulative frequency. Then just connect the dots. The steeper the line the more accumulation occurs across the corresponding class. If the line is flat then the frequency for that class is zero. The ogive graph will always be going uphill from left to right and should never dip below the previous point. Figure 2-14 is an example of an ogive. Ogive comes from the uphill shape used in architecture. Here is an example of an ogive in the East Hall staircase at PSU. #figure(figph[White staircase newel post whose cap curves upward to a central point in an ogive shape, an architectural example of the ogive curve.], alt: "White staircase newel post whose cap curves upward to a central point in an ogive shape, an architectural example of the ogive curve.", caption: none) #figure(figph[Ogive titled Ogive for Room & Board Costs plotting cumulative relative frequency against dollars, rising through labeled points 0.00 at 3000, 0.06 at 4000, 0.25 at 5000, 0.35 at 6000, 0.60 at 7000, 0.75 at 8000, 0.95 at 9000, and 1.00 at 10000.], alt: "Ogive titled Ogive for Room & Board Costs plotting cumulative relative frequency against dollars, rising through labeled points 0.00 at 3000, 0.06 at 4000, 0.25 at 5000, 0.35 at 6000, 0.60 at 7000, 0.75 at 8000, 0.95 at 9000, and 1.00 at 10000.", caption: none) Figure 2-14 #examplebox("Example 7")[][ Make an ogive for the following random sample of rent prices students pay with the corresponding cumulative frequency distribution table. 1500 1350 350 1200 850 900 1250 600 610 960 890 1325 1500 1150 1500 900 1400 1100 900 800 2550 495 1200 690 #figure(table( columns: 3, align: left, inset: 6pt, table.header([Class Limits], [Frequency], [Cumulative Frequency]), [350 - 664], [4], [4], [665 - 979], [8], [12], [980 - 1294], [5], [17], [1295 - 1609], [6], [23], [1610 - 1924], [0], [23], [1925 - 2239], [0], [23], [2240 - 2554], [1], [24], )) #solutionbox[ Find the class boundaries, 349.5, 664.5 … use these for the tick mark labels on the horizontal x-axis, the same as what was used for the histogram. The y-axis uses the cumulative frequencies. The largest cumulative frequency is 24. Every third number is marked on the y-axis units. See Figure 2-15 and Figure 2-16. By hand: #figure(figph[Hand-drawn ogive of monthly rent with cumulative frequency marked in threes up to 24 on the y-axis; the curve starts at 0 at 349.5, rises steeply between 664.5 and 1609.5, and levels off near 24 through 2554.5.], alt: "Hand-drawn ogive of monthly rent with cumulative frequency marked in threes up to 24 on the y-axis; the curve starts at 0 at 349.5, rises steeply between 664.5 and 1609.5, and levels off near 24 through 2554.5.", caption: none) Figure 2-15 Using software: #figure(figph[Ogive titled Cumulative Frequency for Monthly Rent with open-circle points rising from 0 at about \$350 through 4, 12, 17, and 23, staying flat at 23 between about \$1,600 and \$2,250, and ending at 24.], alt: "Ogive titled Cumulative Frequency for Monthly Rent with open-circle points rising from 0 at about $350 through 4, 12, 17, and 23, staying flat at 23 between about $1,600 and $2,250, and ending at 24.", caption: none) Figure 2-16 The usefulness of an ogive is to allow the reader to find out how many students pay less than a certain value, and what amount of monthly rent a certain number of students pay. For instance, if you want to know how many students pay less than \$1,500 a month in rent, then you can go up from the \$1,500 until you hit the line and then you go left to the cumulative frequency axis to see what cumulative frequency corresponds to \$1,500. It appears that around 21 students pay less than \$1,500. See Figure 2-17. If you want to know the cost of rent that 15 students pay less than, then you start at 15 on the vertical axis and then go right to the line and down to the horizontal axis to the monthly rent of about \$1,200. You can see that about 15 students pay less than about \$1,200 a month. See Figure 2-18. #figure(figph[Ogive of cumulative frequency for monthly rent annotated with blue arrows that start at 15 on the vertical axis, run right to the curve, and drop down to the horizontal axis at about \$1,200.], alt: "Ogive of cumulative frequency for monthly rent annotated with blue arrows that start at 15 on the vertical axis, run right to the curve, and drop down to the horizontal axis at about $1,200.", caption: none) Figure 2-17 #figure(figph[Ogive of cumulative frequency for monthly rent annotated with blue arrows that rise from \$1,500 on the horizontal axis up to the curve and run left to the vertical axis at a cumulative frequency of 21.], alt: "Ogive of cumulative frequency for monthly rent annotated with blue arrows that rise from $1,500 on the horizontal axis up to the curve and run left to the vertical axis at a cumulative frequency of 21.", caption: none) Figure 2-18 If you graph the cumulative relative frequency then you can find out what percentage is below a certain number instead of just the number of people below a certain value. ] ] #examplebox("Example 8")[][ Using the sample of 35 ages, make an ogive. 46 47 49 25 46 22 42 24 46 40 39 27 25 30 33 27 46 21 29 20 26 25 25 26 35 49 33 26 32 31 39 30 39 29 26 #solutionbox[ #strong[Excel] Excel will plot an ogive over a histogram as one of its options, but the scale is harder to read. Type the data in any order into column A and the bins in order in column B as shown below. Then select the Data tab, select Data Analysis, select Histogram, then select OK, see below. #figure(figph[Excel Data Analysis dialog opened from the Data tab with Histogram highlighted in the Analysis Tools list; the worksheet behind it holds Age values in column A and bins 24 through 49 in column B.], alt: "Excel Data Analysis dialog opened from the Data tab with Histogram highlighted in the Analysis Tools list; the worksheet behind it holds Age values in column A and bins 24 through 49 in column B.", caption: none) In the dialogue box, click into the Input Range box, then use your mouse and highlight the ages including the label. Then click into the Bin Range box and use your mouse to highlight the bins including the label. Select the box for Labels only if you included the labels in your ranges. You can have your output default to a new worksheet, or select the circle to the left of Output Range, click into the box to the right of Output Range and then select one blank cell on your spreadsheet where you want the top left-hand corner of your table and graph to start. Then check the boxes next to Cumulative Percentage and Chart Output. Then select OK. #figure(figph[Excel Histogram dialog box showing Input Range \$A\$1:\$A\$36, Bin Range \$B\$1:\$B\$7, and Labels checked, with Output Range \$C\$1 selected and both Cumulative Percentage and Chart Output checked.], alt: "Excel Histogram dialog box showing Input Range $A$1:$A$36, Bin Range $B$1:$B$7, and Labels checked, with Output Range $C$1 selected and both Cumulative Percentage and Chart Output checked.", caption: none) A histogram needs to have bars that touch, which is not the default in Excel. To get the bars to touch, right-click on one of the blue bars and select Format Data Series and slide the Gap Width to 0%. #figure(figph[Excel histogram right-clicked to open its context menu with Format Data Series highlighted; the Format Data Series pane on the right shows Series Overlap and Gap Width both set to 0% so the bars touch.], alt: "Excel histogram right-clicked to open its context menu with Format Data Series highlighted; the Format Data Series pane on the right shows Series Overlap and Gap Width both set to 0% so the bars touch.", caption: none) Excel produces both a frequency table and a histogram. The table has the frequencies and the cumulative relative frequencies. #figure(table( columns: 3, align: left, inset: 6pt, table.header([#emph[Bin]], [#emph[Frequency]], [#emph[Cumulative %]]), [24], [4], [11.43%], [29], [12], [45.71%], [34], [6], [62.86%], [39], [4], [74.29%], [44], [2], [80.00%], [49], [7], [100.00%], [More], [0], [100.00%], )) The orange line is the ogive and the vertical axis is on the right side. #figure(figph[Excel histogram with touching blue frequency bars of heights 4, 12, 6, 4, 2, and 7 for bins 24 through 49, and an orange ogive line of cumulative percentages on a right-hand secondary axis topping out at 100%.], alt: "Excel histogram with touching blue frequency bars of heights 4, 12, 6, 4, 2, and 7 for bins 24 through 49, and an orange ogive line of cumulative percentages on a right-hand secondary axis topping out at 100%.", caption: none) ] ] === 2.3.4 Pie Chart You cannot make stem-and-leaf plots, histograms, ogives or time series graphs for qualitative data. Instead, we use bar or pie charts for a qualitative variable, which lists the categories and gives either the frequency (count) or the relative frequency (percent) of individual items that fall into each category. A #strong[pie chart] or pie graph is a very common and easy-to-construct graph for qualitative data. A pie chart takes a circle and divides the circle into pie shaped wedges that are proportional to the size of the relative frequency. There are 360 degrees in a full circle. Relative frequency is just the percentage as a decimal. To find the angle for each pie wedge, multiply the relative frequency for each category by 360 degrees. Figure 2-19 is an example of a pie chart. #figure(figph[Pie chart titled Soft Drink Purchases with wedges Coke Classic 38%, Pepsi-Cola 26%, Diet Coke 16%, Dr. Pepper 10%, and Sprite 10%.], alt: "Pie chart titled Soft Drink Purchases with wedges Coke Classic 38%, Pepsi-Cola 26%, Diet Coke 16%, Dr. Pepper 10%, and Sprite 10%.", caption: none) Figure 2-19 #examplebox("Example 9")[][ Use Excel to make a pie chart for the following frequency distribution of marital status. Marital Status Frequency Divorced (D) 16 Married (M) 44 Single (S) 23 Widowed (W) 9 #solutionbox[ In Excel, type in the table as it appears, then use your mouse and highlight the entire table. Select the Insert tab, then select the pie graph icon, then select the first option under the 2-D Pie. #figure(figph[Excel Insert tab with the pie chart menu open to 2-D Pie, 3-D Pie, and Doughnut options; the highlighted table lists Divorced (D) 16, Married (M) 44, Single (S) 23, and Widowed (W) 9, with a draft pie chart below.], alt: "Excel Insert tab with the pie chart menu open to 2-D Pie, 3-D Pie, and Doughnut options; the highlighted table lists Divorced (D) 16, Married (M) 44, Single (S) 23, and Widowed (W) 9, with a draft pie chart below.", caption: none) Once you have the pie chart you can select the Design window to get a graph to your liking. #figure(figph[Excel Chart Tools Design tab with the chart styles gallery open above a pie chart titled Frequency built from the marital status table, showing labels such as Divorced (D) 17% and Widowed (W) 10%.], alt: "Excel Chart Tools Design tab with the chart styles gallery open above a pie chart titled Frequency built from the marital status table, showing labels such as Divorced (D) 17% and Widowed (W) 10%.", caption: none) It is good practice to include the class label and the percent. The percent should add up to 100%, although with rounding sometimes the sum can be off by 1%. You can also click on the green plus sign to the right of the graph and add different formatting options, or the paintbrush to change colors. #figure(figph[Excel pie chart titled Marital Status with the Chart Elements menu open: Chart Title and Data Labels are checked, Legend is unchecked, and label position options include Center, Inside End, Outside End, Best Fit, and Data Callout.], alt: "Excel pie chart titled Marital Status with the Chart Elements menu open: Chart Title and Data Labels are checked, Legend is unchecked, and label position options include Center, Inside End, Outside End, Best Fit, and Data Callout.", caption: none) Here is the finished pie graph. #figure(figph[Finished pie chart titled Marital Status in shades of blue: Married (M) 48%, Single (S) 25%, Divorced (D) 17%, and Widowed (W) 10%.], alt: "Finished pie chart titled Marital Status in shades of blue: Married (M) 48%, Single (S) 25%, Divorced (D) 17%, and Widowed (W) 10%.", caption: none) ] ] === 2.3.5 Bar Graph A bar graph (column graph or bar chart) is another graph of a distribution for qualitative data. #strong[Bar graphs or charts] consist of frequencies on one axis and categories on the other axis. Then you draw rectangles for each category with a height (if frequency is on the vertical axis) or length (if frequency is on the horizontal axis) that is equal to the frequency. All of the rectangles should be the same width, and there should be equally wide gaps between each bar. Figure 2-20 is an example of a bar chart. Figure 2-20 Some key features of a bar graph: - Equal spacing on each axis - Bars are the same width - Label each axis and title the graph - Show the scale on the frequency axis - Label the categories on the category axis - The bars do not touch. You can draw a bar graph with frequency or relative frequency on the vertical axis. The relative frequency is useful when you want to compare two samples with different sample sizes. The relative frequency graph and the frequency graph should look the same, except for the scaling on the frequency axis. #examplebox("Example 10")[][ Use Excel to make a bar chart for the following frequency distribution of marital status. Marital Status Frequency Divorced (D) 16 Married (M) 44 Single (S) 23 Widowed (W) 9 #solutionbox[ In Excel, type in the table as it appears, then use your mouse and highlight the entire table. Similar steps as the pie chart, but this time choose the column graph option we get the following bar graph for marital status. #figure(figph[Excel Insert tab with the column chart menu open showing 2-D Column, 3-D Column, 2-D Bar, and 3-D Bar options; below is a draft column chart of the marital status frequencies 16, 44, 23, and 9.], alt: "Excel Insert tab with the column chart menu open showing 2-D Column, 3-D Column, 2-D Bar, and 3-D Bar options; below is a draft column chart of the marital status frequencies 16, 44, 23, and 9.", caption: none) Then format the graph as needed. #figure(figph[Excel Chart Tools Design tab with the chart styles gallery above an orange column chart titled Marital Status showing bars for Divorced 16, Married 44, Single 23, and Widowed 9.], alt: "Excel Chart Tools Design tab with the chart styles gallery above an orange column chart titled Marital Status showing bars for Divorced 16, Married 44, Single 23, and Widowed 9.", caption: none) The completed bar graph is below. #figure(figph[Bar chart titled Marital Status with frequency on the y-axis: Divorced (D) 16, Married (M) 44, Single (S) 23, and Widowed (W) 9, with Married the tallest bar.], alt: "Bar chart titled Marital Status with frequency on the y-axis: Divorced (D) 16, Married (M) 44, Single (S) 23, and Widowed (W) 9, with Married the tallest bar.", caption: none) Pie charts are useful for comparing sizes of categories. Bar charts show similar information. It really is a personal preference and what information you are trying to address. However, pie charts are best when you only have a few categories and the data can be expressed as a percentage. The data does not have to be percentages to draw the pie chart, but if a data value can fit into multiple categories, you cannot use a pie chart to display the data. As an example, if you are asking people which is their favorite national park and you ask them to pick their top three choices, then the total number of answers can add up to more than 100% of the people surveyed. Therefore, you cannot use a pie chart to display the favorite national park, but a bar chart would be appropriate. ] ] === 2.3.6 Pareto Chart A Pareto (pronounced pə-RAY-toh) chart is a bar graph that starts from the most frequent class to the least frequent class. The advantage of Pareto charts is that you can visually see the more popular answer to the least popular. This is especially useful in business applications, where you want to know what services your customers like the most, what processes result in more injuries, which issues employees find more important, and other type of questions where you are interested in comparing frequency. Figure 2-21 is an example of a Pareto chart. #figure(figph[Black-and-white portrait photograph of Vilfredo Pareto, a man with a full dark beard wearing a formal suit.], alt: "Black-and-white portrait photograph of Vilfredo Pareto, a man with a full dark beard wearing a formal suit.", caption: none) #link("https://en.Wikipedia.org/wiki/Vilfredo_Pareto")[Pareto] #figure(figph[Pareto chart titled Sources for Job Applicants with bars in descending order: Networking 280, Help Wanted Ads 56, Executive Search Firms 44, and Mass Mailing 20.], alt: "Pareto chart titled Sources for Job Applicants with bars in descending order: Networking 280, Help Wanted Ads 56, Executive Search Firms 44, and Mass Mailing 20.", caption: none) Figure 2-21 #examplebox("Example 11")[][ Use Excel to make a Pareto chart for the following frequency distribution of marital status. Marital Status Frequency Divorced (D) 16 Married (M) 44 Single (S) 23 Widowed (W) 9 #solutionbox[ In Excel, type in the table as it appears, then use your mouse and highlight the entire table. Highlight the table, then select the Home tab, then select Sort & Filter, then select Custom Sort. #figure(figph[Excel worksheet with a highlighted marital status frequency table (Divorced 16, Married 44, Single 23, Widowed 9) and the Home tab's Sort & Filter menu open with Custom Sort selected; a bar chart titled Marital Status is partly visible below.], alt: "Excel worksheet with a highlighted marital status frequency table (Divorced 16, Married 44, Single 23, Widowed 9) and the Home tab's Sort & Filter menu open with Custom Sort selected; a bar chart titled Marital Status is partly visible below.", caption: none) Change the Sort by to Frequency and the Order to Largest to Smallest and click OK. This will automatically arrange the bars in your bar chart from largest to smallest. Many Pareto charts will have the bars touching. You can right click on the bars, choose format data series, and then change the Gap Width to zero. #figure(figph[Excel Sort dialog set to sort by Frequency, largest to smallest, above the sorted table (Married 44, Single 23, Divorced 16, Widowed 9) with its descending bar chart and the Format Data Series pane showing Gap Width at 0%.], alt: "Excel Sort dialog set to sort by Frequency, largest to smallest, above the sorted table (Married 44, Single 23, Divorced 16, Widowed 9) with its descending bar chart and the Format Data Series pane showing Gap Width at 0%.", caption: none) Here is the completed Pareto chart. #figure(figph[Pareto chart of marital status with touching bars in descending order: Married 44, Single 23, Divorced 16, Widowed 9; the vertical axis shows frequency from 0 to 50.], alt: "Pareto chart of marital status with touching bars in descending order: Married 44, Single 23, Divorced 16, Widowed 9; the vertical axis shows frequency from 0 to 50.", caption: none) There are many other types of graphs used on qualitative data. There are software packages that will create most of them. It depends on your data as to which graph may be best to display the data. ] ] === 2.3.7 Stacked Column Chart The next example illustrates one of these types known as a stacked column chart. Stacked column (bar) charts are used when we need to show the ratio between a total and its parts. Each color shows the different series as a part of the same single bar, where the entire bar is used as a total. #examplebox("Example 12")[][ In the Wii Fit game, you can do four different types of exercises: yoga, strength, aerobic, and balance. The Wii system keeps track of how many minutes you spend on each of the exercises every day. The following graph is the data for Niko over one-week time-period. Discuss any interpretations you can infer from the graph. #figure(figph[Stacked bar chart titled Wii Fit Credits showing minutes of Balance, Aerobic, Strength, and Yoga exercise per day from 15-Aug to 21-Aug; daily totals range from 28 minutes on 16-Aug to 44 minutes on 20-Aug.], alt: "Stacked bar chart titled Wii Fit Credits showing minutes of Balance, Aerobic, Strength, and Yoga exercise per day from 15-Aug to 21-Aug; daily totals range from 28 minutes on 16-Aug to 44 minutes on 20-Aug.", caption: none) Figure 2-22 #solutionbox[ It appears that Niko spends more time on yoga than on any other exercises on any given day. He seems to spend less time on aerobic exercises on a given day. There are several days when the amount of exercise in the different categories is almost equal. The usefulness of a stacked column chart is the ability to compare several different categories over another variable, in this case time. This allows a person to interpret the data with a little more ease. ] ] #examplebox("Example 13")[][ Data scientists write programming using statistics to filter spam from incoming email messages. By noting specific characteristics of an email, a data scientist may be able to classify some emails as spam or not spam with high accuracy. One of those characteristics is whether the email contains no numbers, small numbers, or big numbers. Make a stacked column chart with the data in the table. Which type of email is more likely to be spam? Number     None Small Big Total Spam 149 168 50 367 Not Spam 400 2659 495 3554 Total 549 2827 545 3921 Example from#link("https://www.openintro.org/stat/textbook.php?stat_book=os")[OpenIntroStatistics]. #solutionbox[ Type the summarized table into Excel. Highlight just the inside of the table from the row label, column label and data (do not include the totals or Number label). Select the Insert tab, and then select the 2nd option under the column chart. Add a legend, labels and change colors for clarity. #figure(figph[Excel Insert tab with the 2-D Column chart menu open on the stacked-column option, above a table of email counts (Spam: 149 none, 168 small, 50 big; Not Spam: 400, 2659, 495) and a draft stacked column chart.], alt: "Excel Insert tab with the 2-D Column chart menu open on the stacked-column option, above a table of email counts (Spam: 149 none, 168 small, 50 big; Not Spam: 400, 2659, 495) and a draft stacked column chart.", caption: none) The completed stacked bar graph is shown in Figure 2-23. #figure(figph[Stacked bar chart titled Email Spam: for emails containing no, small, or big numbers, yellow Not Spam counts stack on blue Spam counts on an axis from 0 to 3,000 emails; the Small category is tallest at about 2,800.], alt: "Stacked bar chart titled Email Spam: for emails containing no, small, or big numbers, yellow Not Spam counts stack on blue Spam counts on an axis from 0 to 3,000 emails; the Small category is tallest at about 2,800.", caption: none) Figure 2-23 Emails with no numbers have a relatively high rate of spam email (149/549 = 0.271) about 27%. On the other hand, less than 10% of email with small numbers (168/2827 = 0.059) or big numbers (50/545 = 0.092) are spam. ] ] === 2.3.8 Multiple or Side-by-Side Bar Graph A multiple bar graph, also called a side-by-side bar graph, allows comparisons of several different categories over another variable. #examplebox("Example 14")[][ The percentages of people who use certain contraceptives in Central American countries are displayed in the graph below. Use the graph to find the type of contraceptive that is most used in Costa Rica and El Salvador. #figure(figph[Grouped bar chart titled Contraceptive Types 2014 comparing percentage use of condoms, implants, injectables, IUDs, female sterilization, male sterilization, and pills in Costa Rica, El Salvador, Guatemala, Honduras, and Nicaragua; pills lead in Costa Rica at about 21% and condoms lead in El Salvador at about 22%.], alt: "Grouped bar chart titled Contraceptive Types 2014 comparing percentage use of condoms, implants, injectables, IUDs, female sterilization, male sterilization, and pills in Costa Rica, El Salvador, Guatemala, Honduras, and Nicaragua; pills lead in Costa Rica at about 21% and condoms lead in El Salvador at about 22%.", caption: none) (9/21/2020) Retrieved from #link("https://public.tableau.com/profile/prbdata#!/vizhome/AccesstoContraceptiveMethods/AccesstoContraceptiveMethods")[https://public.tableau.com/profile/prbdata\#!/vizhome/AccesstoContraceptiveMethods/AccesstoContraceptiveMethods] Figure 2-24 #solutionbox[ This side-by-side bar graph allows you to quickly see the differences between the countries. For instance, the birth control pill is used most often in Costa Rica, while condoms are most used in El Salvador. ] ] #examplebox("Example 15")[][ Make a side-by-side bar graph for the following medal count for the 2018 Olympics. Gold Silver Bronze Norway 14 14 11 Germany 14 10 7 Canada 11 8 10 United States 9 8 6 #solutionbox[ Copy the table over to Excel. Highlight the entire table, then use similar steps as the regular bar graph. #figure(figph[Excel Insert tab with the 2-D Column menu open and a table of 2018 Olympic medals (Norway 14 gold, 14 silver, 11 bronze; Germany 14, 10, 7; Canada 11, 8, 10; United States 9, 8, 6) beside a draft clustered column chart.], alt: "Excel Insert tab with the 2-D Column menu open and a table of 2018 Olympic medals (Norway 14 gold, 14 silver, 11 bronze; Germany 14, 10, 7; Canada 11, 8, 10; United States 9, 8, 6) beside a draft clustered column chart.", caption: none) Add labels and change the color. The completed graph is shown below. #figure(figph[Side-by-side bar chart titled Medal Count of the 2018 Olympics showing gold, silver, and bronze medals by country: Norway 14, 14, 11; Germany 14, 10, 7; Canada 11, 8, 10; United States 9, 8, 6.], alt: "Side-by-side bar chart titled Medal Count of the 2018 Olympics showing gold, silver, and bronze medals by country: Norway 14, 14, 11; Germany 14, 10, 7; Canada 11, 8, 10; United States 9, 8, 6.", caption: none) ] ] === 2.3.9 Time-Series Plot A #strong[time-series] plot is a graph showing the data measurements in chronological order, where the data is quantitative data. For example, a time-series plot is used to show profits over the last 5 years. To create a time-series plot, time always goes on the horizontal axis, and the frequency or relative frequency goes on the vertical axis. Then plot the ordered pairs and connect the dots. A time series allows you to see trends over time. Caution: You must realize that the trend may not continue. Just because you see an increase does not mean the increase will continue forever. As an example, prior to 2007, many people noticed that housing prices were increasing. The belief at the time was that housing prices would continue to increase. However, the housing bubble burst in 2007, and many houses lost value during the recession. #examplebox("Example 16")[][ The New York Stock Exchange (NYSE) has a website where you can download information on the stock market. Use technology to make a time-series plot. The daily trading volume for two weeks was downloaded at http://www.nyxdata.com/Data-Products/NYSE-Volume-Summary\#summaries. #figure(table( columns: 4, align: left, inset: 6pt, table.header([Trade Date], [NYSE Trades], [NYSE Volume], [NYSE Dollar Volume]), [2-Nov-17], [3,126,422], [900,365,416], [\$35,252,842,833], [1-Nov-17], [2,951,960], [862,960,656], [\$32,609,257,159], [31-Oct-17], [2,712,611], [944,584,968], [\$37,697,844,745], [30-Oct-17], [2,749,134], [855,767,500], [\$33,455,644,270], [27-Oct-17], [2,816,612], [882,117,579], [\$34,636,857,517], [26-Oct-17], [2,771,894], [866,549,040], [\$34,105,511,597], [25-Oct-17], [2,823,272], [895,997,132], [\$36,504,371,518], [24-Oct-17], [2,369,409], [763,566,128], [\$31,139,796,280], [23-Oct-17], [2,165,477], [745,070,262], [\$30,216,979,896], [20-Oct-17], [2,198,245], [861,995,044], [\$37,745,087,429], [19-Oct-17], [2,211,641], [692,171,878], [\$28,682,027,691], [18-Oct-17], [2,108,579], [669,011,182], [\$28,642,623,992], [17-Oct-17], [2,045,857], [680,893,022], [\$28,072,416,838], [16-Oct-17], [2,078,792], [685,406,032], [\$27,524,409,199], [13-Oct-17], [2,151,643], [757,155,836], [\$30,624,653,749], )) #solutionbox[ Using Excel, we will make a time series plot for NYSE daily trading volume. Using the Ctrl key highlight just the date column and the NYSE Volume, then select the Insert tab and the first 2-D line graph option. #figure(figph[Excel Insert tab with the 2-D Line chart menu open; the Trade Date and NYSE Volume columns of a stock-trading table are highlighted, with daily volumes such as 900,365,416 on 2-Nov-17.], alt: "Excel Insert tab with the 2-D Line chart menu open; the Trade Date and NYSE Volume columns of a stock-trading table are highlighted, with daily volumes such as 900,365,416 on 2-Nov-17.", caption: none) You can then select different designs. #figure(figph[Excel Chart Tools Design tab showing a gallery of style thumbnails for the NYSE Volume line chart, with Add Chart Element, Quick Layout, and Change Colors options at the left.], alt: "Excel Chart Tools Design tab showing a gallery of style thumbnails for the NYSE Volume line chart, with Add Chart Element, Quick Layout, and Change Colors options at the left.", caption: none) One can use time-series plots to see when they want to cash out or buy a stock. The time-series graph shows the behavior of one variable over time and does not reflect other variables that are influencing the trading volume. ] ] === 2.3.10 Scatter Plot Sometimes you have two quantitative variables and you want to see if they are related in any way. A scatter plot helps you to see what the relationship may look like. A scatter plot is just a plotting of the ordered pairs. - When you see the dots increasing from left to right then there is a positive relationship between the two quantitative variables. - If the dots are decreasing from left to right then there is a negative relationship. - If there is no apparent pattern going up or down, then we say there is no relationship between the two variables. Is there any relationship between elevation and high temperature on a given day? The following data are the high temperatures at various cities on a single day and the elevation of the city. #notebox("Note", rgb("#8a94a6"), rgb("#556666"), rgb("#f7f8fa"))[ #emph[Plot temperature against elevation] Elevation is pre-loaded in L1 and the high temperatures in L2. Choose Scatter Plot with X = L1 and Y = L2: the points run downhill exactly as in Figure 2-25 - a negative relationship, so as elevation increases the temperature decreases. - Scatter plot of the 7 cities: elevation (L1) vs temperature (L2) ] #examplebox("Example 17")[][ Make a scatterplot to see what type of relationship exists. Elevation (in feet) 7000 4000 6000 3000 7000 4500 5000 Temperature (°F) 50 60 48 70 55 55 60 #solutionbox[ #strong[Excel] Type the data into two columns next to each other. It is important not to have a blank column between the points or Excel may give you an error message. Once you type your data into columns A and B, use your mouse and highlight all the data including the labels. Select the Insert tab, and then select the first box under Scatter. #figure(figph[Excel Insert tab with the Scatter chart menu open and the first scatter option selected; the highlighted table lists elevations from 3,000 to 7,000 feet with temperatures from 48 to 70 degrees Fahrenheit.], alt: "Excel Insert tab with the Scatter chart menu open and the first scatter option selected; the highlighted table lists elevations from 3,000 to 7,000 feet with temperatures from 48 to 70 degrees Fahrenheit.", caption: none) Add appropriate labels. The completed scatter plot is shown below. #figure(figph[Scatter plot of temperature in degrees Fahrenheit versus elevation in feet: seven points fall from 70 degrees at 3,000 feet to about 50 degrees at 7,000 feet, showing a downward trend.], alt: "Scatter plot of temperature in degrees Fahrenheit versus elevation in feet: seven points fall from 70 degrees at 3,000 feet to about 50 degrees at 7,000 feet, showing a downward trend.", caption: none) #strong[TI-84:] First, enter the data into lists 1 and 2. Press \[STAT\] the first option is already highlighted (1:Edit) so you can either press \[ENTER\] or 1.Type in the data pressing \[ENTER\] after each one. For x-y data pairs, enter all #emph[x]-values in one list. Enter all corresponding #emph[y]-values in a second list. Press \[2nd\] \[QUIT\] to return to the home screen. Make sure you turn off other stat plots or graphs in the y= menu. Press \[2#super[nd]\] then the \[y=\] button. Select the first plot. Highlight On and press \[Enter\] so that On is highlighted. Arrow down to Type and highlight the first option that looks like a scatter plot. Make sure your #emph[x] and #emph[y] lists are using L#sub[1] and L#sub[2]. #figure(figph[TI-84 screens for making a scatter plot: the STAT menu with Edit highlighted, lists L1 and L2 holding elevation and temperature data, the STAT PLOTS menu with Plot1 On, the Plot1 setup with scatter type and Xlist L1 and Ylist L2, ZoomStat highlighted on the ZOOM menu, and the plotted points traced at X=7000, Y=50.], alt: "TI-84 screens for making a scatter plot: the STAT menu with Edit highlighted, lists L1 and L2 holding elevation and temperature data, the STAT PLOTS menu with Plot1 On, the Plot1 setup with scatter type and Xlist L1 and Ylist L2, ZoomStat highlighted on the ZOOM menu, and the plotted points traced at X=7000, Y=50.", caption: none) Select Zoom and arrow down to ZoomStat and press \[Enter\]. You will get the following scatterplot. Select Trace and use your arrow keys to see the values at different points. #strong[TI-89:] Press \[♦\] then \[F1\] (to get Y=) and clear any equations that are in the y-editor. Open the Stats/List Editor. Press \[APPS\], select #strong[FlashApps] then press \[ENTER\]. Highlight #strong[Stats/List Editor] then press \[ENTER\]. Press \[ENTER\] again to select the main folder. Type in the data pressing \[ENTER\] after each one. Enter all x-values in one list. Enter all corresponding y-values in a second list. In the Stats/List Editor, select \[F2\] for the Plots menu. Use cursor keys to highlight 1:Plot Setup. Make sure that the other graphs are turned off by pressing \[F4\] button to remove the check marks. Under “Plot 1” press \[F1\] Define. #figure(figph[TI-89 screens for starting a plot: the Apps desktop with Stats/List Editor highlighted, the folder-selection dialog set to the main folder, the list editor with the F2 Plots menu open to 1:Plot Setup, and the Plot Setup screen with Plot 1 defined.], alt: "TI-89 screens for starting a plot: the Apps desktop with Stats/List Editor highlighted, the folder-selection dialog set to the main folder, the list editor with the F2 Plots menu open to 1:Plot Setup, and the Plot Setup screen with Plot 1 defined.", caption: none) In the “Plot Type” menu, select “Scatter.” Move the cursor to the “x” space press \[2#super[nd]\] Var-Link, scroll down to list1, and then press \[Enter\]. This will put the list name in the dialogue box. Do the same for the y values, but this time choose list2. Press \[ENTER\] twice and you will be returned to the Plot Setup menu. #figure(figph[TI-89 screens defining a scatter plot: the Define Plot 1 dialog listing Scatter, xyline, Box Plot, Histogram, and Mod Box Plot; the VAR-LINK screen for choosing list1 and list2; the completed definition with x list1 and y list2; and the plotted points traced at xc 7000, yc 50.], alt: "TI-89 screens defining a scatter plot: the Define Plot 1 dialog listing Scatter, xyline, Box Plot, Histogram, and Mod Box Plot; the VAR-LINK screen for choosing list1 and list2; the completed definition with x list1 and y list2; and the plotted points traced at xc 7000, yc 50.", caption: none) Press F5 ZoomData to display the graph. Press F3 Trace and use the arrow keys to scroll along the different points. #strong[Interpreting the scatter plot.] The graph indicates a linear relationship between temperature and elevation. If you were to hold a pencil up to cover the dots, note that you would see that the dots roughly follow a fat line downhill. It also appears to be a negative relationship, thus as elevation increases, the temperature decreases. #figure(figph[Scatter plot of temperature versus elevation with the vertical axis from 0 to 80 degrees Fahrenheit; the points drift downward from 70 degrees at 3,000 feet to about 50 degrees at 7,000 feet, suggesting a negative linear relationship.], alt: "Scatter plot of temperature versus elevation with the vertical axis from 0 to 80 degrees Fahrenheit; the points drift downward from 70 degrees at 3,000 feet to about 50 degrees at 7,000 feet, suggesting a negative linear relationship.", caption: none) Figure 2-25 Be careful with the vertical axis of both time-series and scatter plots. If the axis does not start at zero the slope of the line can be exaggerated to show more or less of increase than there really is. This is done in politics and advertising to manipulate the data. For example, if we change the vertical axis of temperature to go between 45°F and 75°F we get the following scatter plot in Figure 2-26. We have the same arrangements of dots, but the slope looks much steeper over the 30° range. #figure(figph[The same temperature-versus-elevation scatter plot redrawn with the vertical axis running only from 45 to 75 degrees Fahrenheit, which makes the downward trend of the points look much steeper.], alt: "The same temperature-versus-elevation scatter plot redrawn with the vertical axis running only from 45 to 75 degrees Fahrenheit, which makes the downward trend of the points look much steeper.", caption: none) Figure 2-26 ] ] === 2.3.11 Misleading Graphs One thing to be aware of as a consumer, data in the media may be represented in misleading graphs. Misleading graphs not only misrepresent the data, they can lead the reader to false conclusions. There are many ways that graphs can be misleading. One way to mislead is to use picture graphs or 3D graphs that exaggerate differences and should be used with caution. Leaving off units and labels can result in a misleading graph. Another more common example is to rescale or reverse the vertical axis to try to show a large difference between categories. Not starting the vertical axes at zero will show a more dramatic rate of change. Other ways that graphs can be misleading is to change the horizontal axis labels so that they are out of time sequence, using inappropriate graphs, not showing the base population. #examplebox("Example 18")[][ What is misleading about the following graph? An ad for a new diet pill shows the following time-series plot for someone that has lost weight over a 5-month period. #figure(figph[Time-series line graph titled Weight over Time: weight falls from 200 pounds at month 0 to about 187 at month 5, with a small rise at month 3; the vertical axis spans only about 188 to 200 pounds, making the loss look dramatic.], alt: "Time-series line graph titled Weight over Time: weight falls from 200 pounds at month 0 to about 187 at month 5, with a small rise at month 3; the vertical axis spans only about 188 to 200 pounds, making the loss look dramatic.", caption: none) #solutionbox[ If you do not start the vertical axis at zero, then a change can look much more dramatic than it really is. Notice the decrease in weight looks much larger in Figure 2-27. The graph in Figure 2-28 has the vertical axis starting at zero. Notice that over the 5 months, the weight appears to be decreasing, however, it does not look like there is a large decrease. #figure(figph[Line graph titled Weight over Time with the vertical axis starting near 188 pounds rather than zero: weight drops from 200 pounds at month 0 to about 187 by month 5, so the decrease appears steep.], alt: "Line graph titled Weight over Time with the vertical axis starting near 188 pounds rather than zero: weight drops from 200 pounds at month 0 to about 187 by month 5, so the decrease appears steep.", caption: none) Figure 2-27 #linebreak() Figure 2-28 ] ] #examplebox("Example 19")[][ What is misleading about the graph in Figure 2-29? #figure(figph[Fox News bar chart titled Obamacare Enrollment comparing 6,000,000 sign-ups as of March 27 with the 7,066,000 March 31 goal, source HHS; the 6,000,000 bar is drawn less than half the height of the goal bar despite the similar values.], alt: "Fox News bar chart titled Obamacare Enrollment comparing 6,000,000 sign-ups as of March 27 with the 7,066,000 March 31 goal, source HHS; the 6,000,000 bar is drawn less than half the height of the goal bar despite the similar values.", caption: none) #link("https://www.mediamatters.org/blog/2014/03/31/dishonest-fox-charts-obamacare-enrollment-editi/198679")[https://www.mediamatters.org/blog/2014/03/31/dishonest-fox-charts-obamacare-enrollment-editi/198679.] Figure 2-29 #solutionbox[ The y-axis scale is different for each bar and there are no units on the axis. The first bar has each tic mark as 2 billion, the second bar has each tick as less then 1 billion. This exaggerates the difference. If they used square scaling as in Figure 2-30, there would not be such an extreme difference between the height of the bars. #figure(figph[Corrected version of the Fox News Obamacare Enrollment chart with bars drawn to scale: the 6,000,000 bar, overlaid with a red label reading Factoring in Reality, now reaches nearly the height of the 7,066,000 goal bar.], alt: "Corrected version of the Fox News Obamacare Enrollment chart with bars drawn to scale: the 6,000,000 bar, overlaid with a red label reading Factoring in Reality, now reaches nearly the height of the 7,066,000 goal bar.", caption: none) #link("https://www.mediamatters.org/blog/2014/03/31/dishonest-fox-charts-obamacare-enrollment-editi/198679")[https://www.mediamatters.org/blog/2014/03/31/dishonest-fox-charts-obamacare-enrollment-editi/198679.] Figure 2-30 ] ] #examplebox("Example 20")[][ What is misleading about the graph in Figure 2-31? #figure(figph[Line chart titled Gun deaths in Florida, counting murders committed using firearms, with the vertical axis inverted so 0 is at the top and 1,000 at the bottom; the line runs from 873 in 1990 to 721 in the 2010s on a red background, with a note that Florida enacted its Stand Your Ground law in 2005.], alt: "Line chart titled Gun deaths in Florida, counting murders committed using firearms, with the vertical axis inverted so 0 is at the top and 1,000 at the bottom; the line runs from 873 in 1990 to 721 in the 2010s on a red background, with a note that Florida enacted its Stand Your Ground law in 2005.", caption: none) #link("https://www.livescience.com/45083-misleading-gun-death-chart.html")[https://www.livescience.com/45083-misleading-gun-death-chart.html] Figure 2-31 #solutionbox[ The graph has the y-axis reversed. What looks like an increasing trend line really is decreasing when you correct the y-axis. The red background is also an effect to raise alarm, almost like a curtain of blood. ] ] #examplebox("Example 21")[][ What is misleading about the graph shown in a Lanacane commercial in May 2012, shown in Figure 2-32? #figure(figph[Frame from a Lanacane commercial titled Clinical Preference Study of Itch Relief: at 1 minute and at 60 minutes, a tall yellow Lanacane bar towers over a short blue hydrocortisone bar, with no numbers, units, or axis labels.], alt: "Frame from a Lanacane commercial titled Clinical Preference Study of Itch Relief: at 1 minute and at 60 minutes, a tall yellow Lanacane bar towers over a short blue hydrocortisone bar, with no numbers, units, or axis labels.", caption: none) Retrieved 7/2/2021 from #link("https://youtu.be/I0DapkQ-c1I?t=17")[https://youtu.be/I0DapkQ-c1I?t=17] Figure 2-32 #solutionbox[ It appears that Lanacane is better than regular hydrocortisone cream at relieving itching. However, note that there are no units or labels to the axis. ] ] #examplebox("Example 22")[][ What is misleading about the graph published Georgia’s Department of Public Health website in May 2020, shown in Figure 2-33? #figure(figph[Georgia Department of Public Health bar chart titled Top 5 Counties with the Greatest Number of Confirmed COVID-19 Cases, with grouped bars for Cobb, DeKalb, Fulton, Gwinnett, and Hall; the dates on the horizontal axis are arranged so bar heights descend (28Apr2020, 27Apr2020, 29Apr2020, and so on) rather than in chronological order.], alt: "Georgia Department of Public Health bar chart titled Top 5 Counties with the Greatest Number of Confirmed COVID-19 Cases, with grouped bars for Cobb, DeKalb, Fulton, Gwinnett, and Hall; the dates on the horizontal axis are arranged so bar heights descend (28Apr2020, 27Apr2020, 29Apr2020, and so on) rather than in chronological order.", caption: none) Retrieved 7/3/2021 from #link("https://www.vox.com/covid-19-coronavirus-us-response-trump/2020/5/18/21262265/georgia-covid-19-cases-declining-reopening")[https://www.vox.com/covid-19-coronav...ning-reopening] Figure 2-33 #solutionbox[ There are two misleading items for this graph. The horizontal axis is time, yet the dates are out of sequence starting with April 28, April 27, April 29, May 1, April 30, May 4, May 6, May 5, May 2, May 7, April 26, May 3, May 8, May 9. The first date of April 26 is presented almost at the end of the axis. The graph at first glance would deceive viewers in cases going down over time. A Pareto style chart should never be used for time series data. The second misleading item is the graph’s title and no label on the y-axis. What does the height of each bar represent? Is the height the number of cases for each county, or is the height the number of deaths and hospitalizations? The website later corrected the graphic as shown in Figure 2-34. #figure(figph[Corrected Georgia graphic titled Cumulative COVID-19 Cases Over Time: blue dots show cumulative confirmed cases climbing to about 38,000 between February 1 and May 18, 2020, red dots show cumulative deaths staying below about 2,000, and vertical lines mark the Large Gathering Ban, Shelter in Place, and its extension.], alt: "Corrected Georgia graphic titled Cumulative COVID-19 Cases Over Time: blue dots show cumulative confirmed cases climbing to about 38,000 between February 1 and May 18, 2020, red dots show cumulative deaths staying below about 2,000, and vertical lines mark the Large Gathering Ban, Shelter in Place, and its extension.", caption: none) Retrieved 7/3/2021 from #link("https://www.vox.com/covid-19-coronavirus-us-response-trump/2020/5/18/21262265/georgia-covid-19-cases-declining-reopening")[https://www.vox.com/covid-19-coronav...ning-reopening] Figure 2-34 Large data sets need to be summarized in order to make sense of all the information. The distribution of data can be represented with a table or a graph. It is the role of the researcher or data scientist to make accurate graphical representations that can help make sense of this in the context of the data. Tables and graphs can summarize data, but they alone are insufficient. In the next chapter we will look at describing data numerically. ] ]