50 likes | 211 Views
Linear Regression and Correlation. Eight backpackers were asked their age (in years) and the number of days they backpacked on their last backpacking trip. Is there a linear relationship between the age of a backpacker and the number of days they backpack on one trip?. Age # Days 20 17
E N D
Linear Regression and Correlation Eight backpackers were asked their age (in years) and the number of days they backpacked on their last backpacking trip. Is there a linear relationship between the age of a backpacker and the number of days they backpack on one trip? Age # Days 20 17 40 8 34 8 40 10 58 7 50 7 26 12 70 3
Linear Regression and Correlation Age # Days 20 17 40 8 34 8 40 10 58 7 50 7 26 12 70 3 • First, do a scatterplot of the data. • Then do Linear Regression.
Linear Regression and Correlation • Line of Best Fit or Least Squares Line • yhat = a + bx: • yhat = 18.5286 – 0.2255x • Correlation: r = - 0.9011
Linear Regression and Correlation • Is the correlation, r, significant? • Compare r = - 0.9011 to the value in the 95% Critical Values of the Sample Correlation Coefficient Table at the end of chapter 12. • Since n – 2 = 8 – 2 = 6, the table critical value is – 0.707 • Because -0.9011 < -0.707, r is significant. • We will plot the line and use use the line for prediction.
Linear Regression and Correlation • If age of backpacker = 45 years, how many days, on average, would he or she backpack? • If age of backpacker = 32 years, how many days, on average, would he or she backpack? • If age of backpacker = 90 years, how many days, on average, would he or she backpack? • (Reminder: 20 x 70)