0:00
All right.
00:01
So for this question, we have a data set from the national baseball league.
00:06
And we want to know if there is a relationship between player payrolls and gate money.
00:13
And so we have two columns of data here.
00:18
When i copied and pasted from the question into an excel file, some of the numbers got messed up.
00:26
So hopefully these numbers are.
00:30
Correct.
00:32
If not, we're going to just go through the basics of how to calculate our r squared value.
00:38
So we should be able to reproduce this if any of these numbers are off.
00:44
All you would have to do is just change them.
00:46
And so we have in our x column right here, the player payroll, so that's in thousands of dollars.
00:54
And then we have the mean attendance of the stadium also in thousands.
01:01
And so what we want to do basically is plot these data and then we want to calculate the r squared value, which is our correlation coefficient.
01:12
And we want to determine if there is a relationship, what direction that relationship is, if it's positive or negative, and the strength of the relationship.
01:23
So is it weak, moderate, or strong? and so i just put in the x and y, columns here and then this bottom row here is just the summation of all of these columns and then i also added three additional columns we have this which is x times y we have x squared which is just this value squared and then y squared was just this value squared and so all you have to do is highlight your x and y go to insert click scatter plot and then we have a nice little scatter plot here and then we can actually add a trend line to the data.
02:03
So it looks like there is some type of relationship here, a positive relationship because we have a positive slope.
02:13
But we want to see what the correlation coefficient is for this line to see how well that line fits the data.
02:22
And so to do that, we are going to use this formula here to find r.
02:26
And because we're working in excel, we're going to make excel do all the hard work for us.
02:32
And basically, we're just going to play in our formulas and we're going to get our r value.
02:37
So first thing we want to do is the numerator.
02:40
I like to split up my excel equations into different cells because sometimes, you know, working with a lot of parentheses and functions can kind of get messy.
02:51
We don't want to miss any parentheses.
02:54
And so the top number right here.
02:56
This is our numerator.
02:58
So n is our number of observations.
03:02
So in this case, we have 16 observations.
03:06
So it'll be 16 times the summation of our x times y column, which is c.
03:13
And then we're going to subtract that from the summation of the x column times the summation of the y column, which is a and b...