Howdy! I'm Professor Curtis of Aspire Mountain Academy here with more statistics homework help. Today we're going to learn how to perform linear regression analysis of automobile weights and highway fuel consumption. Here's our problem statement: The table lists weights (in lbs) and highway mileage amounts (in mpg) for seven automobiles. Use the sample data to construct a scatterplot. Use the first variable for the x axis. Based on the scatter plot, what do you conclude about a linear correlation?
OK, so here we've got our data. And the first part asks us to construct a plot. We can work this in StatCrunch or Excel, and I'll actually work it both ways and then let you decide which way you think is easier for you.
So first we're going to look at working this problem in StatCrunch. So to construct my scatter plot in StatCrunch, I'm first going to select the data and dump it into StatCrunch. And now here I've got my data in StatCrunch, so I'm going to select Stat --> Regression --> Simple linear. The problem statement says we want the first variable for the x axis. Typically that's what you would select anyway, so we're going to select that. And the y variable will of course be the second variable. I come down here and hit Compute!.
And here in my results window, the scatter plot is actually on the second page. Notice how up here at the top it says "1 of 2." This is the first of two pages to my results window. So if I click down here on this button at the bottom right, I can get to the second page. There's my scatter plot along with a line of best fit. So it's really easy to select where my line of best fit is going to be located. I check my answer. Fantastic!
And now the second part of this problem asks, “Is there a linear relationship between weight and highway mileage?” Well, to look at that, I need to go back to this first page and identify the linear correlation coefficient. My R value, which you see is located right up here at the top --- so -0.9979. So I would need to take the absolute value of this and then compare that with the critical R value. So the critical R value is going to come from the table that's listed there in your textbook. It's also in the insert to your textbook. There's no actual link here in the problem statement to the critical R value table.
And that's OK, because look at the value that we have --- 0.9979. I mean, this is --- this is almost 1. So this is an excellent R value, and we don't need to check it against a critical value because anytime you get an R value that's greater than 0.97, you're going to have linear correlation. You don't need to check it with the R table. You can check it if you want, but it's going to come out to be the same thing. You're going to conclude there is a linear relationship.
So the answer here we're going to click is going to be yes, there is a linear relationship. But notice there's two options here for yes. So let's see what the rest or second part says. "As the weight increases, highway mileage decreases." "As the weight increases, the highway mileage increases." Well, we have a negative correlation here. So as the weight goes up, what's --- what direction is the line going? It's going down. So as the weight goes up, the highway miles per gallon goes down. So we're going to want this answer option here. Good job! And that's how we do it in StatCrunch.
Now to get the same thing out of Excel, I come back here and let's say I'm just going to dump my data in Excel. Probably the easiest way for me to do this is I could open it in Excel, but I'm just gonna copy and paste here. It's much easier for me to go through here. So here's my data in Excel.
And now to get this actually doing it in Excel, first I want to get the scatter plot. So to do that, I'm going to select my data here, and then I'm going to come up to Insert and then here under Charts I'm going to select the scatter plot. I want this first option for my scatter plot, and boom! There's your scatter plot.
To check for the linear relationship, what I'm gonna do is I'm going to left click on one of these data points, and then while my cursor is still over the data point, I'm going to right click on my mouse so I get this wonderful little menu. And I'm going to select Add trendline. Notice in the trendline option that the default selected is the linear, and that's what we want, so we're going to leave that alone. I'm going to come down here, and I'm going to select Display equation, and Display R squared values is what I really want. So notice we've got this little area here. And I'm going to move this over. If I double click inside, select everything, I can actually increase the font size so I can make it more readable.
So here we've got an r squared value of 0.996. The value I need to check for our linear correlation is actually R; I get an R squared. So if I take the square root of R squared, I'm left with R. So if I take the square root of 0.996 --- I can do it with my calculator here --- there's my R value: 0.997, which again, this is what we saw previously. And because this value was greater than 0.97, we don't need to check with the R critical value. We're going to assume that there's linear correlation here.
So that's how we do it at Aspire Mountain Academy. Be sure to leave your comments below. Let us know how good a job we did or how we can improve. And if your stats teacher is boring or just doesn't want to help you learn stats, go to aspiremountainacademy.com, where you can learn more about accessing our lecture videos or provide feedback on what you'd like to see. Thanks for watching! We'll see you in the next video.
Frustrated with a particular MyStatLab/MyMathLab homework problem? No worries! I'm Professor Curtis, and I'm here to help.