Linear Regression Fifth
Inference
Inference refers to situations where we want to understand the relationships between and . For example, we might ask which independent variables we measure are associated with the response variable?
When motivated by inference, we may or may not be interested in generating predictions for . Instead, we wish to understand and how is affected by changes in . In our example, inference questions might include:
- How does the
distance
affectcost
? - How do traffic levels affect
cost
? - How does the total trip time
cost
? - How does the date affect
cost
? - Does a linear model adequately describe the relationship between the input variable we select and
cost
? - Is
distance
our best single predictor of total trip cost using the information we have available? - How much of an increase in trip cost is associated with an increase of one mile in trip distance?
In contrast, a prediction question might be: What is the total cost of traveling 2.5 miles from Sunset Park to Prospect Park?
Modeling can also be performed for some combination of prediction and inference. If accurate prediction is our goal in bivariate linear regression, it is critical to select the best single predictor for our model. In our case, we do not have many variables to choose from. When we analyzed our plots on a previous screen, did we infer that date
is probably not a good predictor of cost
?
As we progress beyond linear regression to models that our more complicated, inference may become more difficult. There is often a trade-off between prediction accuracy and interpretability. Linear models are widely used today, in part because they are generally more interpretable than more complex models. But more complex models may provide more accurate predictions, especially when the data is not linear.
For each question below, state whether the question is for the purpose of prediction, or inference.
- Does our data contain any variables that demonstrate a negative relationship with
cost
(in other words, we observe an increase incost
and a decrease in value for a given variable)?- Assign the string value "prediction" or "inference" to the object
question_1
- Assign the string value "prediction" or "inference" to the object
- How much will it cost to travel from the Bushwick neighborhood to Marine Park?
- Assign the string value "prediction" or "inference" to the object
question_2
- Assign the string value "prediction" or "inference" to the object