Remember earlier in the course that we looked at scatter plots when we talked through different types
of charts and graphs.
Now we want to revisit scatter plots and specifically this idea of regression.
So earlier when we talked about scatter plots, remember that we talked about this least squares line
or the line of best fit.
We also called this the regression line, and we learned to calculate the equation of the regression
line or determine the equation of the regression line by finding M, the slope which was found with
this formula and B the y intercept which we found using this formula and we indicated the equation of
the regression line with this y hat symbol to make the specific point that this is sort of a line of
estimation and it doesn't actually run through all of the data points in the scatterplot.
Instead, it charts a course through the scatterplot that minimizes the error or that minimizes the
residuals.
And so we indicate it with y hat.
So technically regression is just the process of estimating the value of the dependent variable for
some given value of the independent variable.
And in order to estimate the value of the dependent variable, we're going to go through the process
of curve fitting.
Now this equation is the regression equation for a line, but the curve that we use to approximate the
data does not necessarily have to be a line, which is why we'll often refer to the regression equation
as just the approximating curve.
Or instead of saying that we're always finding the linear regression equation, we'll instead just say
that we're going through the curve fitting process.
That being said, as we're getting into this idea of regression, we really want to talk through the
four different ways that we identify the regression curve.
In other words, there are four different ways that we normally describe the trend, and those four
ways are the form, the direction, the strength, and whether or not we have outliers in our data.
So let's talk first about the form of the trend.
Through the scatterplot.
We can think about three different examples here, and I've made these examples pretty extreme so that
the trends are obvious.
But in this first example here, we can clearly see that the trend is linear.
We have linear correlation in the data because the shape of the curve that best fits this data is a
line.
And so in this case, if we were going to find the trend through the data, we would find the trend
line and we would find this linear regression equation.
But that's not always the case.
Sometimes the trend through the data follows a parabolic shape or an exponential shape like this one.
We might describe this trend or this correlation as parabolic or exponential correlation because of
the shape of this approximating curve.
And we can see clearly here that this exponential parabolic shape does a better job of fitting the data
than just using a line.
These are certainly not the only two shapes.
For instance, the data points might follow a trend similar to a sign curve, something like this.
And so maybe our approximating curve looks like this and we would call the trend sinusoidal because
it follows a sine curve.
And maybe that curve does a better job than specifically a line or this parabolic shape at approximating
the trend in the data.
So we're looking for the form of the trend.
And for a scatterplot like this one, we might say here that we see no correlation because the data
is so scattered in such a randomized way that it's difficult for us to see any kind of trend whatsoever
in the data, at least visually.
It almost doesn't make sense to fit this with a linear trend line or a parabolic trend line or some
other approximating curve.
And that can be the case.
We can just have a data set where there's really no correlation at all so we can talk through different
forms that approximate the trend.
We can also talk about the direction of the trend.
So to take two obvious examples here in this first example, the trend here is positive because as we
move to the right, the graph moves up.
Whereas with this second example here the trend is.
Negative, because as we move to the right, the graph moves down and that holds not just for linear
relationships, but also for relationships of other shapes.
So instead of this parabolic curve here, if we had something that looked like this, that approximating
curve could be parabolic or exponential, but the trend would be negative, we would describe the direction
as negative.
So we talk about direction, we talk about strength of the relationship.
So in these two examples here, this first one, we might call this a strong relationship, whereas
the relationship among this data here we might call either moderate or maybe even.
Weak.
And really the judgment we're making here is based on how tightly clustered the data points are around
the approximating curve.
In these cases, the trend line in this first scatterplot.
All of the data points are very, very close to this trend line.
And so the relationship in the data is strong.
But in this example, the data points are spread further away from the trend line.
They're not all packed in close to the line.
And instead we see many data points that are further from the line.
And so we would maybe say that this relationship is a moderate relationship or maybe even a weak relationship,
but we would certainly say that it is not as strong of a relationship as the relationship we see in
this first scatterplot.
And then the last thing we always want to describe is outliers.
So, for instance, in a graph like this one, once we have the approximating curve, if it's linear,
once we have the line of best fit or the linear regression line here, we want to be able to identify
what appear to be outliers in the data in this particular scatterplot.
This point right here appears to be an outlier.
It is by far the furthest point from the regression line, and so it's the biggest outlier in the data
set.
Obviously, that being said, the more outliers there are in the data set, the weaker the relationship
is.
The fewer outliers we have then clearly the stronger the relationship.
So taking account of all four of these characteristics or descriptors, whenever we have the scatterplot
of a data set, we want to be able to describe the trend in the data using these four characteristics.
So for example, if we're looking at this scatterplot right here, we might say that the data displays
a moderate, positive linear trend where the most significant outlier is this point here, which appears
to be at maybe the point, let's say 618 roughly, that would be a fairly comprehensive way to describe
the trend in this data as a moderate, positive linear relationship with an outlier at this point.
Whereas this scatterplot here we might describe as a strong negative linear relationship with no noticeable
outliers.
So the takeaway here is just that the purpose of regression is to be able to estimate the value of the
dependent variable y for any value of the independent variable X.
And the way that we do that is by finding a trend through the data.
Earlier when we talked about scatter plots, we learned how to use these equations to find the equation
of the least squares line or the line of best fit, that regression line that's given by this equation.
So we know how to find this simple equation of the regression line, and now we know how to describe
that regression line based on its form, direction, strength and any outliers in the data set.
With that foundation out of the way, we'll take the rest of this section to talk about some more advanced
regression calculations.