Linear Regression First
Intro to Modeling
At this point in our learning journey, we have experience loading data into R, cleaning and preparing data, and exploring data through visualization and analysis. We applied statistical techniques to form a deeper understanding of our data by estimating characteristics like the median and standard deviation. We generated frequency distributions and confidence intervals to describe our data. In this series of missions, we will expand upon that knowledge to build models that estimate, or predict, an output based on the value of an input.
Why would we want to build a model to predict the value of an output variable? Models provide a way to summarize or describe general patterns in a dataset, and these patterns can be used to estimate future outcomes. For example, we might use modeling to estimate sales growth based on the increase in advertizing budget at a company we work for. Or we could build a model to predict the total cost for an Uber ride based on distance traveled, using data from previous car trips.
With linear models — or, more specifically, linear regression models — we can model these types of relationships with a straight line. We begin our modeling journey with linear regression because it provides a straightforward approach to predict the value of an output based on the value of an input. Whether you are looking to work as a data analyst, a data scientist, or a machine learning engineer, it is important to understand linear regression because this decades-old technique is still useful today.
In this series of missions, we'll build a solid understanding of how and when we can use linear regression models to make predictions. We'll build linear regression models, learn how to interpret their output, and assess model accuracy. We'll discuss the limitations of linear regression models when data is not linear. And we'll use programming tools to fit and visualize many linear regression models at once.
Before we begin to build linear regression models, let's cover fundamental modeling concepts to build our intuition around modeling. Many of the concepts we will cover in this mission apply to predictive models of all types, not just linear regression models. If you are interested in machine learning and other types of predictive modeling, this mission will provide key foundational knowledge.