Chapter 5 - PowerPoint PPT Presentation

chapter 5 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Chapter 5 PowerPoint Presentation
play fullscreen
1 / 60
Chapter 5
75 Views
Download Presentation
libby-goff
Download Presentation

Chapter 5

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Chapter 5 Summarizing Bivariate Data

  2. Weight Age There does not appear to be a relationship between age and weight in adults. Suppose we found the age and weight for each person in a sample of 10 adults. Is there any relationship between the age and weight of these adults? Create a scatterplot of the data below. Do you think there is a relationship? If so, what kind? If not, why not?

  3. Weight Height Suppose we found the height and weight for each person in a sample of 10 adults. Is there any relationship between the height and weight of these adults? Create a scatterplot of the data below. Do you think there is a relationship? If so, what kind? If not, why not? Is it positive or negative? Weak or strong?

  4. Correlation • What feature(s) of the graph would indicate a weak or strong relationship? • The relationship between bivariate numerical variables • May be positive or negative • May be weak or strong What does it mean if the relationship is positive? Negative?

  5. Set B Set C Set D Identify the strength and direction of the following data sets. Set A Set D shows a strong, positive curved relationship. Set A shows a strong, positive linear relationship. Set B shows little or no relationship. Set C shows a weaker (moderate), negative linear relationship.

  6. Identify as having a positive relationship, a negative relationship, or no relationship. • Heights of mothers and heights of their adult daughters + - • Age of a car in years and its current value + • Weight of a person and calories consumed no • Height of a person and the person’s birth month • Number of hours spent in safety training and the number of accidents that occur -

  7. Correlation Coefficient (r)- • A quantitative assessment of the strength and direction of the linear relationship in bivariate, quantitative data • Pearson’s sample correlation is used the most • Population correlation coefficient - r (rho) • statistic correlation coefficient – r • Equation: What are these values called? These are the z-scores for x and y.

  8. Example 5.1 For the six primarily undergraduate universities in California with enrollments between 10,000 and 20,000, six-year graduation rates (y) and student-related expenditures per full-time students (x) for 2003 were reported as follows: Create a scatterplot and calculate r.

  9. Graduation Rates Expenditures Example 5.1 Continued r = 0.05 In order to interpret what this number tells us, let’s investigate the properties of the correlation coefficient

  10. Strong correlation No Correlation Moderate Correlation Weak correlation Properties of r(correlation coefficient) 1) legitimate values are -1 <r< 1

  11. 2) value of r is not changed by anylineartransformation Suppose that the graduation rates were changed from percents to decimals (divide by 100). Transform the graduation rates and calculate r. Do the following transformations and calculate r 1) x’ = 5(x + 14) 2) y’ = (y + 30) ÷ 4 r = 0.05 It is the same! Why?

  12. 3) value of r does not depend on whichof the two variables is labeled x Suppose we wanted to estimate the expenditures per student for given graduation rates. Switch x and y, then calculate r. r = 0.05 It is the same!

  13. Graduation Rates Graduation Rates Expenditures Expenditures 4) value of r isaffected by extreme values. 63.9 Plot a revised scatterplot and find r. Suppose the 33.9 was REALLY 63.9. What do you think would happen to the value of the correlation coefficient? r = 0.42 Extreme values affect the correlation coefficient

  14. y x 5) value of r is a measure of the extent to which x and y arelinearlyrelated Find the correlation for these points: x -3 -1 1 3 5 7 9 Y 40 20 8 4 8 20 40 Compute the correlation coefficient? Sketch the scatterplot r = 0 r = 0, but the data set has adefiniterelationship! Does this mean that there is NO relationship between these points?

  15. Recap the Properties of r: • legitimate values of r are -1 <r< 1 • value of r is not changed by anytransformation • value of r does not depend on whichof the two variables is labeled x • value of r isaffected by extreme values • value of r is a measure of the extent to which x and y are linearly related

  16. Graduation Rates Expenditures Example 5.1 Continued Interpret r = 0.05 There is a weak, positive, linear relationship between expenditures and graduation rates. A quantitative assessment of the strength and direction of the linear relationship between bivariate, quantitative data In order to interpret r, recall the definition of the correlation coefficient.

  17. Does a value of r close to 1 or -1 mean that a change in one variable cause a change in the other variable? Consider the following examples: • The relationship between the number of cavities in a child’s teeth and the size of his or her vocabulary is strong and positive. • Consumption of hot chocolate is negatively correlated with crime rate. Causality can only be shown by carefully controlling values of all variables that might be related to the ones under study. In other words, with a well-controlled, well-designed experiment. Should we all drink more hot chocolate to lower the crime rate? Both are responses to cold weather These variables are both strongly related to the age of the child So does this mean I should feed children more candy to increase their vocabulary?

  18. Correlation does not imply causation Correlation does not imply causation Correlation does not imply causation

  19. x – variable: is the independent or explanatory variable y- variable: is the dependent or response variable We will use values of x to predict values of y. What is the objective of regression analysis? The objective of regression analysis is to use information about one variable, x, to draw some sort of a conclusion about a second variable, y. Suppose that we have two variables: x = the amount spent on advertising y = the amount of sales for the product during a given period What question might I want to answer using this data?

  20. b – is the slope it is the approximate amount by which y increases when x increases by 1 unit a – is the y-intercept it is the approximate height of the line when x = 0 in some situations, the y-intercept has no meaning The slope of the LSRL is The intercept of the LSRL is The LSRL is Scatterplots frequently exhibit a linear pattern. When this is the case, it makes sense to summarize the relationship between the variables by finding a line that is as close as possible to the plots in the plot. This is done by calculating the line of best fit or Least Square Regression Line (LSRL). - (y-hat) means the predictedy The LSRL is the line that minimizes the sum of the squares of the deviations from the line Be sure to put the hat on the y Let’s explore what this means . . .

  21. (3,10) y =.5(6) + 4 = 7 2 – 7 = -5 4.5 y =.5(0) + 4 = 4 0 – 4 = -4 -5 y =.5(3) + 4 = 5.5 10 – 5.5 = 4.5 -4 (6,2) Suppose we have a data set that consists of the observations (0,0), (3,10) and 6,2). Let’s just fit a line to the data by drawing a line through what appears to be the middle of the points. Now find the vertical distance from each point to the line. Find the sum of the squares of these deviations. (0,0) Sum of the squares = 61.25

  22. (3,10) 6 -3 (6,2) -3 (0,0) What is the sum of the deviations from the line? Will it always be zero? Use a calculator to find the line of best fit Find the sum of the squares of the deviations from the line Find the vertical deviations from the line The line that minimizes the sum of the squares of the deviations from the line is the LSRL. Sum of the squares = 54

  23. Researchers are studying pomegranate's antioxidants properties to see if it might be helpful in the treatment of cancer. In one study, mice were injected with cancer cells and randomly assigned to one of three groups, plain water, water supplemented with .1% pomegranate fruit extract (PFE), and water supplemented with .2% PFE. The average tumor volume for mice in each group was recorded for several points in time. (x = number of days after injection of cancer cells in mice assigned to plain water and y = average tumor volume (in mm3) x 11 15 19 23 27 y 150 270 450 580 740 Sketch a scatterplot for this data set.

  24. Remember that an interpretation is stating the definition in context. Pomegranate study continued x = number of days after injection of cancer cells in mice assigned to plain water and y = average tumor volume x 11 15 19 23 27 y 150 270 450 580 740 Calculate the LSRL and the correlation coefficient. Interpret the slope and the correlation coefficient in context. The average volume of the tumor increases by approximately 37.25 mm3 for each day increase in the number of days after injection. There is a strong, positive, linear relationship between the average tumor volume and the number of days since injection. Does the intercept have meaning in this context? Why or why not?

  25. This is the danger ofextrapolation. The least-squares line should not be used to make predictions for y using x-values outside the range in the data set. Pomegranate study continued x = number of days after injection of cancer cells in mice assigned to plain water and y = average tumor volume x 11 15 19 23 27 y 150 270 450 580 740 Predict the average volume of the tumor for 20 days after injection. Predict the average volume of the tumor for 5 days after injection. Why? It is unknown whether the pattern observed in the scatterplot continues outside the range of x-values. Can volume be negative?

  26. No, the slope of the line for predicting x is not and the intercepts are almost always different. Here is the appropriate regression line: Pomegranate study continued x = number of days after injection of cancer cells in mice assigned to plain water and y = average tumor volume x 11 15 19 23 27 y 150 270 450 580 740 Suppose we want to know how many days after injection of cancer cells would the average tumor size be 500 mm3? The regression line of y on x should not be used to predict x, because it is not the line that minimizes the sum of the squared deviations in the x direction. Is this the appropriate regression line to answer this question?

  27. Pomegranate study continued x = number of days after injection of cancer cells in mice assigned to plain water and y = average tumor volume x 11 15 19 23 27 y 150 270 450 580 740 Find the mean of the x-values (x) and the mean of the y-values (y). x = 19 and y = 438 + Plot the point of averages (x,y) on the scatterplot. Will the point of averages always be on the regression line?

  28. Let’s investigate how the LSRL and correlation coefficient change when different points are added to the data set Suppose we have the following data set. x 4 5 6 7 8 y 2 5 4 6 9 Sketch a scatterplot. Calculate the LSRL and the correlation coefficient.

  29. Let’s investigate how the LSRL and correlation coefficient change when different points are added to the data set Suppose we have the following data set. x 4 5 6 7 8 y 2 5 4 6 9 Suppose we add the point (5,8) to the data set. What happens to the regression line and the correlation coefficient? 5 8 What happened?

  30. Let’s investigate how the LSRL and correlation coefficient change when different points are added to the data set Suppose we have the following data set. x 4 5 6 7 8 y 2 5 4 6 9 Suppose we add the point (12,12) to the data set. What happens to the regression line and the correlation coefficient? 12 12 What happened?

  31. Let’s investigate how the LSRL and correlation coefficient change when different points are added to the data set Suppose we have the following data set. x 4 5 6 7 8 y 2 5 4 6 9 Suppose we add the point (12,0) to the data set. What happens to the regression line and the correlation coefficient? 12 0 What happened?

  32. The correlation coefficient and the LSRL are both measures that are affected by extreme values.

  33. Pomegranate study revisited x = number of days after injection of cancer cells in mice assigned to plain water and y = average tumor volume x 11 15 19 23 27 y 150 270 450 580 740 Minitab, a statistical software package, was used to fit the least-squares regression line. Part of the resulting output is shown below. We will discuss what these numbers mean in the Chapter 13. slope intercept

  34. Assessing the fit of the LSRL Once the LSRL is obtained, the next step is to examine how effectively the line summarizes the relationship between x and y. Important questions are: • Is the line an appropriate way to summarize the relationship between x and y. • Are there any unusual aspects of the data set that we need to consider before proceeding to use the line to make predictions? • If we decide to use the line as a basis for prediction, how accurate can we expect predictions based on the line to be? We will look at graphical and numerical methods to answer these questions.

  35. In a study, researchers were interested in how the distance a deer mouse will travel for food (y) is related to the distance from the food to the nearest pile of fine woody debris (x). Distances were measured in meters. Minitab was used to fit the least-squares regression line. From the partial output, identify the regression line. Plot the data, including the regression line.

  36. Residuals are calculated by subtracting the predicted y from the observed y. Distance traveled Distance to debris In a study, researchers were interested in how the distance a deer mouse will travel for food (y) is related to the distance from the food to the nearest pile of fine woody debris (x). Distances were measured in meters. The vertical deviation between the point and the LSRL is called the residual. If the point is above the line, the residual will be positive. If the point is below the line the residual will be negative.

  37. In a study, researchers were interested in how the distance a deer mouse will travel for food (y) is related to the distance from the food to the nearest pile of fine woody debris (x). Distances were measured in meters. Use the LSRL to calculate the predicted distance traveled. Subtract to find the residuals. What does this remind you of? What does the sum of the residuals equal? Will the sum of the residuals always equal zero?

  38. Residual plots • Is a scatterplot of the (x, residual) pairs. • Residuals can also be graphed against the predicted y-values • The purpose is to determine if a linearmodel is the best way to describe the relationship between the x & y variables • If nopattern exists between the points in the residual plot, then the linear model is appropriate.

  39. This residual shows no pattern so it indicates that the linear model is appropriate. This residual showsa curved patternso it indicates that the linear model is not appropriate.

  40. In a study, researchers were interested in how the distance a deer mouse will travel for food (y) is related to the distance from the food to the nearest pile of fine woody debris (x). Distances were measured in meters. Use the values in this table to create a residual plot for this data set. Is a linear model appropriate for describing the relationship between the distance from debris and the distance a deer mouse will travel for food? Plot the residuals against the distance from debris (x)

  41. Since the residual plot displays no pattern, a linear model is appropriate for describing the relationship between the distance from debris and the distance a deer mouse will travel for food. Now plot the residuals against the predicted distance from food.

  42. What do you notice about the general scatter of points on this residual plot versus the residual plot using the x-values? Residual plots can be plotted against either the x-values or the predicted y-values.

  43. This point is considered an influential point because it affects the placement of the least-squares regression line. Let’s examine the following data set: The following data is for 12 black bears from the Boreal Forest. x = age (in years) and y = weight (in kg) Sketch a scatterplot with the fitted regression line. Do you notice anything unusual about this data set? What would happen to the regression line if this point is removed? Influential observation

  44. Let’s examine the following data set: The following data is for 12 black bears from the Boreal Forest. x = age (in years) and y = weight (in kg) An observation is an outlier if it has a large residual. Notice that this observation has a large residual.

  45. Coefficient of determination- • Denoted by r2 • gives the proportion of variation in ythat can be attributed to an approximate linear relationship between x & y

  46. Distance traveled Distance to Debris Let’s explore the meaning of r2 by revisiting the deer mouse data set. x = the distance from the food to the nearest pile of fine woody debris y = distance a deer mouse will travel for food Suppose you didn’tknow any x-values. What distance would you expect deer mice to travel? SS stands for “sum of squares” So this is the total sum of squares. Why do we square the deviations? What is total amount of variation in the distance traveled (y-values)? Hint: Find the sum of the squared deviations. Total amount of variation in the distance traveled is 773.95 m2.

  47. Distance traveled Distance to debris x = the distance from the food to the nearest pile of fine woody debris y = distance a deer mouse will travel for food Now suppose you DO know the x-values. Your best guess would be the predicted distance traveled (the point on the LSRL). By how much do the observed points vary from the LSRL? Hint: Find the sum of the residuals squared. The points vary from the LSRL by 526.27 m2.

  48. x = the distance from the food to the nearest pile of fine woody debris y = distance a deer mouse will travel for food Total amount of variation in the distance traveled is 773.95 m2. The points vary from the LSRL by 526.27 m2. Approximately what percent of the variation in distance traveled can be explained by the regression line? Or approximately 32%

  49. The standard deviation (s): This is the typical amount by which an observation deviates from the least squares regression line. It’s found by: Partial output from the regression analysis of deer mouse data: Let’s review the values from this output and their meanings. What does this number represent? The y-intercept (a): This value has no meaning in context since it doesn't make sense to have a negative distance. The slope (b): The distance traveled to food increases by approxiamtely 3.234 meters for an increase of 1 meter to the nearest debris pile. The coefficient of determination (r2) Only 32% of the observed variability in the distance traveled for food can be explained by the approximate linear relationship between the distance traveled for food and the distance to the nearest debris pile.

  50. Since this curve resembles a parabola, a quadratic function can be used to describe this relationship. Using Minitab: The least-squares quadratic regression is Average Finish Time Representative Age Because of the curved pattern, a straight line would not accurately describe the relationship between average finish time and age. Let’s examine this data set: x = representative age y = average marathon finish time Create a scatterplot for this data set. This curve minimizes the sum of the squares of the residuals (similar to least-squares linear regression).