Introductory Statistics MA 207 Day 38 Linear Regression














- Slides: 14

Introductory Statistics MA 207 Day 38 - Linear Regression

Fun with correlation Go to THIS WEB SITE and find your favorite correlation. To find more correlations, Scroll to the bottom of the page Click “Discover a correlation” Pick your “interesting variable” Click “View Variables” Select your variable and click “Correlate” Select your favorite and create the chart What is the takeaway from this exercise?

Regression Example Download the Used Honda Civic data from Moodle. Create a scatter plot of the data Do you see a relationship between the age of the car and its price? How would you describe that relationship?

Regression Example Download the Used Honda Civic data from Moodle. Create a scatter plot of the data Do you see a relationship between the age of the car and its price? How would you describe that relationship? For each extra year of age, the car prices goes up/down by _$______. Put your best guess in Nearpod

Linear Regression

Regression Example Using the Used Honda Civic data from Moodle. Create a scatter plot of the data Find the correlation coefficient, slope, and intercept using =CORREL( ) =SLOPE( ) =INTERCEPT( ) In the plot, right click on the data and select “Add Trendline”, display the equation, and display the R 2.

Using our Used Honda Civic regression With the Used Honda Civic data: 1. Is the relationship between age and price positive or negative. Give two ways that you know this. 2. Assume that we have an 8 year old Honda Civic. According to our linear regression, what is the approximate price if we were to sell it? (nearpod) 3. According to our linear regression, what is the approximate price of an 18 year old Honda Civic? 4. If a used car dealer sold a Honda Civic for $10, 000, what was the approximate age of the car according to our linear regression? 5. What percent of the variation in price is explained by the age of the Honda Civic?

Using our Used Honda Civic regression With the Used Honda Civic data: 1. Is the relationship between age and price positive or negative. Give two ways that you know this. 2. Assume that we have an 8 year old Honda Civic. According to our linear regression, what is the approximate price if we were to sell it? 3. According to our linear regression, what is the approximate price of an 18 year old Honda Civic? (nearpod) 4. If a used car dealer sold a Honda Civic for $10, 000, what was the approximate age of the car according to our linear regression? 5. What percent of the variation in price is explained by the age of the Honda Civic?

Using our Used Honda Civic regression With the Used Honda Civic data: 1. Is the relationship between age and price positive or negative. Give two ways that you know this. 2. Assume that we have an 8 year old Honda Civic. According to our linear regression, what is the approximate price if we were to sell it? 3. According to our linear regression, what is the approximate price of an 18 year old Honda Civic? 4. If a used car dealer sold a Honda Civic for $10, 000, what was the approximate age of the car according to our linear regression? (nearpod) 5. What percent of the variation in price is explained by the age of the Honda Civic?

Is there a relationship between GPA and # of missed classes? A high school athletic director is worried that his athletes are missing too much class. In particular, he is curious if there is a relationship between the GPA of his student athletes and the number of classes missed during a semester for sportsrelated reasons. Create a linear regression model for this data. • Classify the relationship as strong / weak, positive / negative, linear / nonlinear • How much variation in GPA is explained by the number of days missed? • What is the expected GPA for a student who misses 3 days for sports? • What is the expected GPA for a student who misses 7 days for sports?

Is there a relationship between GPA and # of missed classes? A high school athletic director is worried that his athletes are missing too much class. In particular, he is curious if there is a relationship between the GPA of his student athletes and the number of classes missed during a semester for sportsrelated reasons. Create a linear regression model for this data. • Classify the relationship as strong / weak, positive / negative, linear / nonlinear • How much variation in GPA is explained by the number of days missed? • What is the expected GPA for a student who misses 3 days for sports? • What is the expected GPA for a student who misses 7 days for sports?

Is there a relationship between GPA and # of missed classes? A high school athletic director is worried that his athletes are missing too much class. In particular, he is curious if there is a relationship between the GPA of his student athletes and the number of classes missed during a semester for sportsrelated reasons. Create a linear regression model for this data. • Classify the relationship as strong / weak, positive / negative, linear / nonlinear • How much variation in GPA is explained by the number of days missed? • What is the expected GPA for a student who misses 3 days for sports? • What is the expected GPA for a student who misses 7 days for sports?

Regression Example Open the fish data set from Lab 7 Part 2. Is there a linear relationship between length and weight of fish? Let x = length and y = weight. How strong is that relationship? (Describe this in words and numbers) Your boss at Fish and Game wants to know whether you can use your trend line to predict the weight of a fish that is 900 mm in length. What would you say?

Outliers and Regression Use THIS APPLET (https: //www. geogebra. org/m/MZMBYx 2 p) to help answer the following questions. If you have a strong positive correlation, how can one outlier influence the correlation coefficient? Can an outlier switch a correlation from positive to negative? What do you do when you spot an outlier in your data set?