Organizing and Summarizing Data Graphically © 2010 Pearson Prentice Hall. All rights reserved When data is collected from a survey or designed experiment, they must be organized into a manageable form. Data that is not organized is referred to as raw data. Ways to Organize Data • Tables • Graphs • Numerical Summaries (Chapter 3) © 2010 Pearson Prentice Hall. All rights reserved 2-2 Working with categorical variables/Data Categorical data is a result of observing a categorical variable. Each observation is placed into one of many possible categories or levels determined by the variable. Frequency is the count of observations in each category of the variable. © 2010 Pearson Prentice Hall. All rights reserved 2-3 A frequency distribution lists each category of data and the number of occurrences for each category of data. © 2010 Pearson Prentice Hall. All rights reserved 2-4 EXAMPLE Organizing Qualitative Data into a Frequency Distribution The data on the next slide represent the color of M&Ms in a bag of plain M&Ms. Construct a frequency distribution of the color of plain M&Ms. © 2010 Pearson Prentice Hall. All rights reserved 2-5 Frequency table © 2010 Pearson Prentice Hall. All rights reserved 2-6 The relative frequency is the proportion (or percent) of observations within a category and is found using the formula: frequency relative frequency sum of all frequencies A relative frequency distribution lists the relative frequency of each category of data. © 2010 Pearson Prentice Hall. All rights reserved 2-7 Why use the relative frequency? The relative frequency makes it easier for us to compare two or more groups when the number of observations within each of those groups are not the same. © 2010 Pearson Prentice Hall. All rights reserved 2-8 EXAMPLE Organizing Qualitative Data into a Relative Frequency Distribution Use the frequency distribution obtained in the prior example to construct a relative frequency distribution of the color of plain M&Ms. © 2010 Pearson Prentice Hall. All rights reserved 2-9 Relative Frequency 12 0.2667 45 0.2222 0.2 0.1333 0.0667 0.1111 © 2010 Pearson Prentice Hall. All rights reserved 2-10 Bar Graphs A bar graph is constructed by labeling each category of data on either the horizontal or vertical axis and the frequency or relative frequency of the category on the other axis. In many cases since the variable has set categories, the bars from each category often not touch each other in a bar graph. © 2010 Pearson Prentice Hall. All rights reserved 2-11 EXAMPLE Constructing a Frequency and Relative Frequency Bar Graph Use the M&M data to construct (a) a frequency bar graph and (b) a relative frequency bar graph. © 2010 Pearson Prentice Hall. All rights reserved 2-12 © 2010 Pearson Prentice Hall. All rights reserved 2-13 © 2010 Pearson Prentice Hall. All rights reserved 2-14 EXAMPLE Comparing Two Data Sets The following data represent the marital status (in millions) of U.S. residents 18 years of age or older in 1990 and 2006. Draw a side-by-side relative frequency bar graph of the data. Marital Status 1990 2006 Never married 40.4 55.3 Married 112.6 127.7 Widowed 13.8 13.9 Divorced 15.1 22.8 © 2010 Pearson Prentice Hall. All rights reserved 2-15 Marital Status in 1990 vs. 2006 0.7 0.6 Relative Frequency 0.5 1990 0.4 2006 0.3 0.2 0.1 0 Never married Married Widowed Divorced Marital Status © 2010 Pearson Prentice Hall. All rights reserved 2-16 Pie Charts A pie chart is a circle divided into sectors. Each sector represents a category of the variable of interest The area of each sector is proportional to the frequency of the category. In other words each section of the pie represents the relative frequency for that category. © 2010 Pearson Prentice Hall. All rights reserved 2-17 EXAMPLE Constructing a Pie Chart The following data represent the marital status (in millions) of U.S. residents 18 years of age or older in 2006. Draw a pie chart of the data. Marital Status Frequency Never married 55.3 Married 127.7 Widowed 13.9 Divorced 22.8 © 2010 Pearson Prentice Hall. All rights reserved 2-18 Working With Numerical Variables/Data Numerical data is obtained by measurements from an object of interest or where we count the number of objects that have a specific trait. Unlike categorical variables we are interested more in the values/measurements over the categories themselves. © 2010 Pearson Prentice Hall. All rights reserved 2-19 The first step in summarizing quantitative data is to determine whether the data is discrete or continuous. If the data is discrete and there are relatively few different values of the variable, the categories of data will be the observations (as in qualitative data). If the data is discrete, but there are many different values of the variable, or if the data is continuous, the categories of data (called classes) must be created using intervals of numbers. © 2010 Pearson Prentice Hall. All rights reserved 2-20 EXAMPLE Constructing Frequency and Relative Frequency Distribution from Discrete Data The following data represent the number of available cars in a household based on a random sample of 50 households. Construct a frequency and relative frequency distribution. 3 4 1 3 2 0 2 1 3 3 1 2 3 2 2 2 2 2 1 1 1 1 4 2 2 1 2 1 2 2 1 2 2 0 1 2 0 1 3 1 0 2 2 2 3 2 4 2 2 5 Data based on results reported by the United States Bureau of the Census. © 2010 Pearson Prentice Hall. All rights reserved 2-21 © 2010 Pearson Prentice Hall. All rights reserved 2-22 The Histogram A histogram is constructed by drawing rectangles for each class of data whose height is the frequency or relative frequency of the class. The width of each rectangle should be the same and they should touch each other. © 2010 Pearson Prentice Hall. All rights reserved 2-23 EXAMPLE Drawing a Histogram for Discrete Data Draw a frequency and relative frequency histogram for the “number of cars per household” data. © 2010 Pearson Prentice Hall. All rights reserved 2-24 © 2010 Pearson Prentice Hall. All rights reserved 2-25 © 2010 Pearson Prentice Hall. All rights reserved 2-26 EXAMPLE Organizing Continuous Data into a Frequency and Relative Frequency Distribution The following data represent the time between eruptions (in seconds) for a random sample of 45 eruptions at the Old Faithful Geyser in California. Construct a frequency and relative frequency distribution of the data. Source: Ladonna Hansen, Park Curator © 2010 Pearson Prentice Hall. All rights reserved 2-27 The smallest data value is 672 and the largest data value is 738. We will create the classes so that the lower class limit of the first class is 670 and the class width is 10 and obtain the following classes: 670 - 679 680 - 689 690 - 699 700 - 709 710 - 719 720 - 729 730 - 739 © 2010 Pearson Prentice Hall. All rights reserved 2-28 © 2010 Pearson Prentice Hall. All rights reserved 2-29 © 2010 Pearson Prentice Hall. All rights reserved 2-30 EXAMPLE Constructing a Frequency and Relative Frequency Histogram for Continuous Data Using class width of 10: © 2010 Pearson Prentice Hall. All rights reserved 2-31 EXAMPLE Constructing a Frequency and Relative Frequency Histogram for Continuous Data Using class width of 5: © 2010 Pearson Prentice Hall. All rights reserved 2-32 Describing the Shape of the Distribution Shape is the physical appearance of the distribution Uni-modal distributions have one peak. Bi-modal distributions have two peaks. Multi-modal distributions have multiple peaks. In this course we will deal more with the uni-modal distributions since many of our assumptions involve a normal distribution which is uni-modal. © 2010 Pearson Prentice Hall. All rights reserved 2-33 Common Uni-modal Shapes © 2010 Pearson Prentice Hall. All rights reserved 2-34 EXAMPLE Identifying the Shape of the Distribution Identify the shape of the following histogram which represents the time between eruptions at Old Faithful. © 2010 Pearson Prentice Hall. All rights reserved 2-35 EXAMPLE Identifying the Shape of the Distribution Answer: the shape of the distribution appears to be skew left or negatively skewed. © 2010 Pearson Prentice Hall. All rights reserved 2-36