Session Ready
Exercise

Car prices

Two important factors in determining the price of a used car are age and mileage. In this exercise, you'll compare how price depends on age, using two models and three evaluation techniques.

Instructions
100 XP
  • Using the Used_Fords dataset (in statisticalModeling), train a linear model of price as a function of both age and mileage.
  • Calculate the partial effect size of age (holding mileage constant, as effect_size() does.)
  • Calculate the total effect size of price and mileage by comparing the model output in two scenarios: (1) age 6 and mileage 42000, (2) age 7 and mileage 50000.
  • Train a new model of price using only age as an explanatory variable.
  • Calculate the partial effect size of age in the new model. Is this more similar to the partial effect of age in the first model, or the total effect of age and mileage in the first model?