Hi. This tutorial serves as a Linear Equation Algebra Review. So the construction and use of best-fit lines that are common in statistics require some algebraic knowledge. Let's review the algebra needed to understand linear equations.
All right, you may have seen the slope-intercept form of a linear equation as y equals mx plus b, where m represents the slope of a line, and b represents the y-intercept of a line. This is commonly used in most algebra classes. Now, statisticians prefer to use different notation for the slope-intercept form of a linear equation.
They use y equals b sub 0 plus b sub 1 x, where b1 represents the slope of the line, and b0 represents the y-intercept of the line. So these are representing the exact same thing. We're just using different letters for our constants, our slope and y-intercept constants, and then they're just rearranged.
All right. So if we're talking about a slope-intercept form of a line, let's make sure we have a good working definition of what a slope is and what a y-intercept is. So slope is a measure of a line's steepness. It measures the change in y for a one-unit increase in x. All right? And the y-intercept is the y value when x equals 0. OK? And we'll look at both of these in detail.
All right. So suppose you are given the equation y equals negative 2 plus 3 x. OK? If we think about these, this would be my value of b sub 0, my y-intercept, and this would be my value of the slope which is b1. OK? So being able to graph this equation is an important skill. An easy way to graph a line is to produce two points, then draw a line through those two points. So let's try it.
All right. So let's graph two points. Let's graph the point with an x value of 2 and the point with an x value of 5. OK? I've already reproduced the graph here. So once we have the two points, we'll be able to graph them here, and then use a ruler to draw a nice, straight line through those.
All right so if x equals 2, to determine the y value that matches x equals 2 from this equation, all we need to do is substitute 2 in for x. OK? So y is going to equal negative 2 plus 3, and I'll substitute the 2 in where the x should be. OK? So what this ends up being is negative 2 plus, this is 6, so y will equal 4. OK? So my first point is x, y equals 2 comma 4, and we'll graph that in a minute. OK?
Now, let's also determine what the y value is now when x equals 5. OK? So this will be a negative 2 plus 3. Now, this time we'll put 5 in there. OK? Do my multiplication first, so that's 15 plus negative 2 is 13, so y equals 13. So my coordinate pair here is x, y equals 5 comma 13.
OK. Now, let's go ahead and graph each of those two points, and then we'll draw a nice, straight line through there. OK. So my x value here is 2. My y value is 4. So I'm going to go 2, 4, that will be about here, and my next point is at 5, 13. So 5 is here, 13 is about here. OK?
And I will draw a nice, straight line that goes through those two points, and I'll put arrows on there to reflect that that is going to go to infinite values on both sides. OK? So we of see here, it's not marked down here, but it seems like there is a y-intercept of about negative 2 there. And then for every one-unit increase, so if we increase 1, it does seem like it's going up about three units. OK. So that is determining points from an equation and then using them to graph the line.
All. Right another important skill involving linear equations is to create an equation for a line that passes through two points. OK? So let's determine the equation of a line that passes through 2 comma 4 and 5 comma 13. OK. You'll notice, I'm using the same points. So let's just see if we can get back to that original equation that I gave you in the last example.
So remember that the two things that we need to write the equation are the y-intercept and the slope. OK? I think it's helpful to start with the slope. So now, what we said is that it's the change in y divided by the change in x. It's the ratio of how the y's change to how the x's change.
So if we're looking at how the y's change, the y's are changing from 4 to 13. OK? So to figure out how much that is all we need to do is subtract those values, so 13 minus 4. And then, we need to then do that also as the x's change. The x's are changing from 2 to 5. So to determine that, we just take 5 minus 2. OK?
Now, we can actually do our subtraction. So 13 minus 4 is 9, and 5 minus 2 is 3. 9 divided by 3 is 3. So our slope, b1, is equal to 3. OK? And if you remember, that does match the slope that we had in the last equation. OK?
And now we need to determine what the y-intercept is. OK? So what we can do is, if we're thinking about this equation, we know that the slope is 3. Now, we also know points that are on the line. So we have a value of x, and we have a value of y that will be on that line. So what we can do is substitute in what we know about this equation and then use some algebra to solve for b sub 0, the y-intercept.
All right. So let's do that. So instead of y, I'm going to use the y from this value or from that point, so 4. Now, b sub 0 I don't know yet, so I'm going to leave that as b sub 0. I know the slope, so I'm going to substitute 3 in for the slope.
And since I used 4 for my y value, I have to use the x value that matches the 4. So I can't use the 5 here. I do need to use the 2. OK? So I'm going to put a 2 there.
I'm going to do this multiplication-- 3 times 2 is 6. OK? Now, remember to solve for b sub 0. To get that by itself, I need to subtract the 6 from both sides. OK. So I'll do that-- 4 minus 6 is negative 2, negative 2 is b sub 0. OK? So that means the y-intercept of my line is negative 2. OK?
So now, to put it all together, I'm going to put my y-intercept, negative 2, in for b sub 0. And I'm going to put my 3 in for b sub 1, and that is the equation that I started with in the other example. So I think we got that right.
All right. Let's look at one last situation here. So let's say that you are running some sort of shop, and you had some sales data and some income data. So how much was sold over a certain amount of time, and how much income was made? So if you had that data, you might want to think about, well, what's my explanatory variable? What's my response variable?
So what you could do is you could graph the data using sales on your x-axis as your explanatory variable and income on your y-axis as your response variable. OK? You could look at that correlation, and then maybe you could switch the axes. You could put income on the x-axis and sales on the y-axis, and what you'd find out is that the correlation is the same. OK?
But the question is now, if the correlation is the same, will the equation also be the same? So right now, what I have is I have income equals 2 times sales minus 100. So right now, sales is our x variable, generally our explanatory variable. Income is our y variable, and then this equation shows income as a function of sales.
All right. So what we want to do is if we wanted an equation for sales as a function of income, and again, would that equation looked the same? So what we're going to do is we're going to use some algebra to solve for sales. OK? So using inverse operations, I'm going to add 100 to both sides.
What that's going to leave me is income plus 100 equals 2 times sales, and then I'm going to divide both sides by 2. And what I'm left with is income plus 100 divided by 2 equals sales. I now have sales as a function of income, and as we can see, these two equations look pretty different.
So because these equations look different, it's important to decide and choose what's going to be the explanatory variable, and what's going to be the response variable ahead of time, because you are going to get two pretty different equations. All right. That has been your algebra review on linear equations. Thanks for watching.