Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 2 Data Basics.

Similar presentations


Presentation on theme: "Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 2 Data Basics."— Presentation transcript:

1

2 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 2 Data Basics

3 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 3 What Are Data? Data can be numbers, record names, or other labels. Not all data represented by numbers are numerical data (e.g., 1 = male, 2 = female). Data are useless without their context…

4 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 4 The “W’s” To provide context we need the W’s Who What (and in what units) When Where Why (if possible) and How of the data. Note: the answers to “who” and “what” are essential.

5 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 5 Data Tables The following data table clearly shows the context of the data presented: Notice that this data table tells us the What (column) and Who (row) for these data.

6 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 6 Who The Who of the data tells us the individual cases for which (or whom) we have collected data. Individuals who answer a survey are called respondents. People on whom we experiment are called subjects or participants. Animals, plants, and inanimate subjects are called experimental units.

7 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 7 What and Why Variables are characteristics recorded about each individual. The variables should have a name that identify What has been measured. To understand variables, you must Think about what you want to know.

8 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 8 What and Why (cont.) A categorical (or qualitative) variable names categories and answers questions about how cases fall into those categories. Categorical examples: sex, race, ethnicity A quantitative variable is a measured variable (with units) that answers questions about the quantity of what is being measured. Quantitative examples: income ($), height (inches), weight (pounds)

9 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 9 What and Why (cont.) Example: In a student evaluation of instruction at a large university, one question asks students to evaluate the statement “The instructor was generally interested in teaching” on the following scale: 1 = Disagree Strongly; 2 = Disagree; 3 = Neutral; 4 = Agree; 5 = Agree Strongly. Question: Is interest in teaching categorical or quantitative?

10 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 10 What and Why (cont.) Question: Is interest in teaching categorical or quantitative? We sense an order to these ratings, but there are no natural units for the variable interest in teaching. Variables like interest in teaching are often called ordinal variables. With an ordinal variable, look at the Why of the study to decide whether to treat it as categorical or quantitative.

11 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 11 Counts Count When we count the cases in each category of a categorical variable, the counts are not the data, but something we summarize about the data. The category labels are the What, and the individuals counted are the Who.

12 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 12 Counts Count (cont.) When we focus on the amount of something, we use counts differently. For example, Amazon might track the growth in the number of teenage customers each month to forecast CD sales (the Why). The What is teens, the Who is months, and the units are number of teenage customers.

13 Copyright © 2010, 2007, 2004 Pearson Education, Inc. How many chips??? Slide 2 - 13

14 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Categorical versus Quantitative Data Slide 2 - 14

15 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 2 - 15 What have we learned? (cont.) We treat variables as categorical or quantitative. Categorical variables identify a category for each case. Quantitative variables record measurements or amounts of something and must have units. Some variables can be treated as categorical or quantitative depending on what we want to learn from them.

16 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 3 Displaying and Describing Categorical Data

17 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 17 Frequency Tables: Making Piles We can “pile” the data by counting the number of data values in each category of interest. We can organize these counts into a frequency table, which records the totals and the category names.

18 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 18 Frequency Tables: Making Piles (cont.) A relative frequency table is similar, but gives the percentages (instead of counts) for each category.

19 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 19 Frequency Tables: Making Piles (cont.) Both types of tables show how cases are distributed across the categories. They describe the distribution of a categorical variable because they name the possible categories and tell how frequently each occurs.

20 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 20 What’s Wrong With This Picture? You might think that a good way to show the Titanic data is with this display:

21 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 21 The Area Principle The ship display makes it look like most of the people on the Titanic were crew members, with a few passengers along for the ride. When we look at each ship, we see the area taken up by the ship, instead of the length of the ship. The ship display violates the area principle: The area occupied by a part of the graph should correspond to the magnitude of the value it represents.

22 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 22 Bar Charts A bar chart displays the distribution of a categorical variable, showing the counts for each category next to each other for easy comparison. A bar chart stays true to the area principle. Thus, a better display for the ship data is:

23 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 23 Bar Charts (cont.) A relative frequency bar chart displays the relative proportion of counts for each category. A relative frequency bar chart also stays true to the area principle. Replacing counts with percentages in the ship data:

24 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 24 When you are interested in parts of the whole, a pie chart might be your display of choice. Pie charts show the whole group of cases as a circle. They slice the circle into pieces whose size is proportional to the fraction of the whole in each category. Pie Charts

25 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 25 Contingency Tables A contingency table allows us to look at two categorical variables together. It shows how individuals are distributed along each variable, contingent on the value of the other variable. Example: we can examine the class of ticket and whether a person survived the Titanic:

26 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 26 Contingency Tables (cont.) The margins of the table, both on the right and on the bottom, give totals and the frequency distributions for each of the variables. Each frequency distribution is called a marginal distribution of its respective variable. The marginal distribution of Survival is:

27 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 27 Contingency Tables (cont.) Each cell of the table gives the count for a combination of values of the two values. For example, the second cell in the crew column tells us that 673 crew members died when the Titanic sunk.

28 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 28 Conditional Distributions A conditional distribution shows the distribution of one variable for just the individuals who satisfy some condition on another variable. The following is the conditional distribution of ticket Class, conditional on having survived:

29 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 29 Conditional Distributions (cont.) The following is the conditional distribution of ticket Class, conditional on having perished:

30 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Conditional distribution by hospital size Slide 2 - 30

31 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 31 Conditional Distributions (cont.) The conditional distributions tell us that there is a difference in class for those who survived and those who perished. This is better shown with pie charts of the two distributions:

32 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 32 Conditional Distributions (cont.) We see that the distribution of Class for the survivors is different from that of the nonsurvivors. This leads us to believe that Class and Survival are associated, that they are not independent. The variables would be considered independent when the distribution of one variable in a contingency table is the same for all categories of the other variable.

33 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Is time to defibrillation dependent upon hospital size??? Slide 2 - 33

34 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 34 Segmented Bar Charts A segmented bar chart displays the same information as a pie chart, but in the form of bars instead of circles. Each bar is treated as the “whole” and is divided proportionally into segments corresponding o the percentage in each group. Here is the segmented bar chart for ticket Class by Survival status:

35 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Top Five #1 Slide 2 - 35

36 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Top Five #2 Slide 2 - 36

37 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Top Five #3 Slide 2 - 37

38 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Top Five #4 The table shows the perceived risk of smoking. Slide 2 - 38

39 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Top Five #5 Men Women Slide 2 - 39

40 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 3 - 40 What have we learned? We can summarize categorical data by counting the number of cases in each category (expressing these as counts or percents). We can display the distribution in a bar chart or pie chart. And, we can examine two-way tables called contingency tables, examining marginal and/or conditional distributions of the variables.

41 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 4 Displaying and Summarizing Quantitative Data

42 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 42 Histograms: Displaying the Distribution of Earthquake Magnitudes The chapter example discusses earthquake magnitudes. First, slice up the entire span of values covered by the quantitative variable into equal-width piles called bins. The bins and the counts in each bin give the distribution of the quantitative variable.

43 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 43 A histogram plots the bin counts as the heights of bars (like a bar chart). It displays the distribution at a glance. Here is a histogram of earthquake magnitudes: Histograms: Displaying the Distribution of Earthquake Magnitudes (cont.)

44 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Leaving on a jet plane??? Slide 2 - 44

45 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 45 Histograms: Displaying the Distribution of Earthquake Magnitudes (cont.) A relative frequency histogram displays the percentage of cases in each bin instead of the count. In this way, relative frequency histograms are faithful to the area principle. Here is a relative frequency histogram of earthquake magnitudes:

46 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 46 Stem-and-Leaf Displays Stem-and-leaf displays show the distribution of a quantitative variable, like histograms do, while preserving the individual values. Stem-and-leaf displays contain all the information found in a histogram and, when carefully drawn, satisfy the area principle and show the distribution.

47 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 47 Stem-and-Leaf Example Compare the histogram and stem-and-leaf display for the pulse rates of 24 women at a health clinic. Which graphical display do you prefer?

48 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 48 Constructing a Stem-and-Leaf Display First, cut each data value into leading digits (“stems”) and trailing digits (“leaves”). Use the stems to label the bins. Use only one digit for each leaf—either round or truncate the data values to one decimal place after the stem.

49 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Construct a stem & leaf Slide 2 - 49

50 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Back to Back Stem and Leaf Plots Slide 2 - 50

51 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 51 Dotplots A dotplot is a simple display. It just places a dot along an axis for each case in the data. The dotplot to the right shows Kentucky Derby winning times, plotting each race as its own dot. You might see a dotplot displayed horizontally or vertically.

52 Copyright © 2010, 2007, 2004 Pearson Education, Inc. The following data shows the percentage of water quality tests that failed to meet water quality standards at 82 swimming beaches in California. The data is divided into those beaches inside and outside of Los Angeles County. Slide 2 - 52

53 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 53 Shape, Center, and Spread When describing a distribution, make sure to always tell about three things: shape, center, and spread… GRAPHING STATIONS!!!

54 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 54 What is the Shape of the Distribution? 1.Does the histogram have a single, central hump or several separated humps? 2.Is the histogram symmetric? 3.Do any unusual features stick out?

55 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 55 Humps 1.Does the histogram have a single, central hump or several separated bumps? Humps in a histogram are called modes. A histogram with one main peak is dubbed unimodal; histograms with two peaks are bimodal; histograms with three or more peaks are called multimodal.

56 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 56 Humps (cont.) A bimodal histogram has two apparent peaks:

57 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 57 Humps (cont.) A histogram that doesn’t appear to have any mode and in which all the bars are approximately the same height is called uniform:

58 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 58 Symmetry 2.Is the histogram symmetric? If you can fold the histogram along a vertical line through the middle and have the edges match pretty closely, the histogram is symmetric.

59 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 59 Symmetry (cont.) The (usually) thinner ends of a distribution are called the tails. If one tail stretches out farther than the other, the histogram is said to be skewed to the side of the longer tail. In the figure below, the histogram on the left is said to be skewed left, while the histogram on the right is said to be skewed right.

60 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 60 Anything Unusual? 3.Do any unusual features stick out? Sometimes it’s the unusual features that tell us something interesting or exciting about the data. You should always mention any stragglers, or outliers, that stand off away from the body of the distribution. Are there any gaps in the distribution? If so, we might have data from more than one group.

61 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 61 Anything Unusual? (cont.) The following histogram has outliers—there are three cities in the leftmost bar:

62 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 62 Where is the Center of the Distribution? If you had to pick a single number to describe all the data what would you pick? It’s easy to find the center when a histogram is unimodal and symmetric—it’s right in the middle. On the other hand, it’s not so easy to find the center of a skewed histogram or a histogram with more than one mode.

63 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 63 Center of a Distribution -- Median The median is the value with exactly half the data values below it and half above it. It is the middle data value (once the data values have been ordered) that divides the histogram into two equal areas It has the same units as the data

64 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 64 How Spread Out is the Distribution? Variation matters, and Statistics is about variation. Are the values of the distribution tightly clustered around the center or more spread out? Always report a measure of spread along with a measure of center when describing a distribution numerically.

65 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 65 Spread: Home on the Range The range of the data is the difference between the maximum and minimum values: Range = max – min A disadvantage of the range is that a single extreme value can make it very large and, thus, not representative of the data overall.

66 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 66 Spread: The Interquartile Range The interquartile range (IQR) lets us ignore extreme data values and concentrate on the middle of the data. To find the IQR, we first need to know what quartiles are…

67 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 67 Spread: The Interquartile Range (cont.) Quartiles divide the data into four equal sections. One quarter of the data lies below the lower quartile, Q1 One quarter of the data lies above the upper quartile, Q3. The quartiles border the middle half of the data. The difference between the quartiles is the interquartile range (IQR), so IQR = upper quartile – lower quartile

68 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 68 Spread: The Interquartile Range (cont.) The lower and upper quartiles are the 25 th and 75 th percentiles of the data, so… The IQR contains the middle 50% of the values of the distribution, as shown in figure:

69 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 69 5-Number Summary The 5-number summary of a distribution reports its median, quartiles, and extremes (maximum and minimum) The 5-number summary for the recent tsunami earthquake Magnitudes looks like this:

70 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 70 Summarizing Symmetric Distributions -- The Mean (cont.) The mean feels like the center because it is the point where the histogram balances:

71 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 71 Mean or Median? Because the median considers only the order of values, it is resistant to values that are extraordinarily large or small; it simply notes that they are one of the “big ones” or “small ones” and ignores their distance from center. To choose between the mean and median, start by looking at the data. If the histogram is symmetric and there are no outliers, use the mean. However, if the histogram is skewed or with outliers, you are better off with the median.

72 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 72 What About Spread? The Standard Deviation A more powerful measure of spread than the IQR is the standard deviation, which takes into account how far each data value is from the mean. A deviation is the distance that a data value is from the mean. Since adding all deviations together would total zero, we square each deviation and find an average of sorts for the deviations.

73 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 73 What About Spread? The Standard Deviation (cont.) The variance, notated by s 2, is found by summing the squared deviations and (almost) averaging them: The variance will play a role later in our study, but it is problematic as a measure of spread—it is measured in squared units!

74 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 74 What About Spread? The Standard Deviation (cont.) The standard deviation, s, is just the square root of the variance and is measured in the same units as the original data.

75 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 75 Tell -- Shape, Center, and Spread Next, always report the shape of its distribution, along with a center and a spread. If the shape is skewed, report the median and IQR. If the shape is symmetric, report the mean and standard deviation and possibly the median and IQR as well.

76 Copyright © 2010, 2007, 2004 Pearson Education, Inc. GRAPHING STATIONS Find the following for your data set Mean & Standard Deviation 5 Number Summary IQR Range Produce missing display (Histogram & Box & Whisker Slide 2 - 76

77 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 77 What have we learned? We’ve learned how to make a picture for quantitative data to help us see the story the data have to Tell. We can display the distribution of quantitative data with a histogram, stem-and-leaf display, or dotplot. We’ve learned how to summarize distributions of quantitative variables numerically. Measures of center for a distribution include the median and mean. Measures of spread include the range, IQR, and standard deviation. Use the median and IQR when the distribution is skewed. Use the mean and standard deviation if the distribution is symmetric.

78 Copyright © 2010, 2007, 2004 Pearson Education, Inc. Slide 4 - 78 What have we learned? (cont.) We’ve learned to Think about the type of variable we are summarizing. All methods of this chapter assume the data are quantitative. The Quantitative Data Condition serves as a check that the data are, in fact, quantitative.


Download ppt "Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 2 Data Basics."

Similar presentations


Ads by Google