Math 106: Elements of Statistics Graphically Displaying Data January 20, 2016 Learning Objectives: Know how to differentiate categorical from numeric variables, and within numeric variables, be able to differentiate between continuous and discrete variables Understand how and when to use various types of graphical displays to show univariate distributions: bar charts, pie charts, stem-and-leaf plots, dot plots, histograms, box plots Know how "bin sizes" might affect stem-and-leaf plots, dot plots, and histograms. Understand how and when to use various types of graphical displays to show bivariate distributions: scatterplots, stacked bar charts, etc. Know how to use R to create the graphs listed above! Be able to discuss the shape, center, and spread of a distribution (of a univariate set of data) Note: You should save your work to your H: drive, NOT to the C: drive of the computer on which you’re working! The data from our class dataset can be found at P:\Data\MATH\Snipes\Statistics_S16\Datasets\ClassDataS16.csv The scripts we went through today were P:\Data\MATH\Snipes\Statistics_S16\RScripts\GraphIntroNum.R P:\Data\MATH\Snipes\Statistics_S16\RScripts\GraphIntroCat.R Homework Assignment (in lieu of book problems) Due Friday Jan. 22 For homework, make the following graphs by adjusting the code from the scripts. Unless otherwise noted, you should be using the class dataset. Paste your graphs in the following text, along with the code you used to produce each, and answer the questions below. Displaying Numerical Variables Univariate Data Make a dotplot of the variable Age.mos. 1. What is apparent here? We will discuss this at length – it is one of the most misunderstood topics in data analysis. Make a stem-and-leaf plot of Wingspan.in. Paste your graph in this document, along with the code you used to produce the graph. Describe this distribution (center, spread, shape). Load the data set P:\Data\MATH\Snipes\Statistics_S16\Datasets\obits.csv, which provides the age in years of the deceased as listed in the obituaries for four weeks of The Columbus Dispatch. Make a histogram1 of the variable Age at Death. 1. Describe the center, range, and shape of the distribution. Bivariate Data What information do you get from the following chart? Make a scatterplot of Height.in. vs. RightFoot.in. CHOOSE YOUR OWN ADVENTURE: Poke around in the data. Make one chart of your choosing (not one from the class demo, nor from this worksheet) and include it below. Part 2: Displaying Categorical Variables SAVE FOR LATER Univariate (just one variable!) Data Make a pie chart of the variable Varsity from our class dataset. Make a bar chart of the variable Award. What percentage of our class would prefer a Nobel Prize? Bivariate (two variables!) Data Make a comparative bar chart of Varsity vs. Award. 1. Discuss your observations. 1 Note that changing “bin sizes” for both dotplots and histograms changes how the data looks! Check out the following website for a cool demonstration of this fact! http://www.amstat.org/publications/jse/v6n3/applets/histogram.html