A quick introduction to linear regression, a technique for fitting a linear model to data.
TRANSCRIPT:
Hello, and welcome to Introduction to Optimization. This video provides a basic answer to the question, what is Linear Regression?
Put simply, linear regression is a technique for fitting or matching a line to a set of data points.
As a basic example, imagine you’re driving a car, and every time you take a trip you keep track of how far you drive, and how much gas the car uses. After a few trips, you make a graph showing the miles driven on each trip on the X axis, and the gas used on each trip on the Y axis.
Linear regression is finding the line that best fits this data, and there are several ways to find it, including using optimization to minimize the error between the line and the data points, which is also known as least squares. Once we find the line, it gives us an equation y = mx + b. In this case, b is zero, x is our trip distance, y is the gas used, and m is our car’s gas mileage. We can then use this equation to predict about how much gas we can expect to use on our next trip.
So far we’ve been looking at very simple cases, with one input and one output, but what if there are multiple factors involved? This is called multiple linear regression. For example, we could include the percentage of time spent driving in the city in our trip data. In this case, instead of a line, we fit a plane to the data points.
Linear regression is a simple technique, but it’s applied every day in many areas, from engineering to machine learning, finance, healthcare, manufacturing, and more.
Linear regression is an important technique that helps us understand relationships between variables and make predictions. Thanks for watching!