The terms inference and prediction both describe tasks where we learn from data in a supervised manner in order to find a model that describes the relationship between the independent variables and the outcome. Inference and prediction, however, diverge when it comes to the use of the resulting model: Inference: Use the model to learn about the data generation process. Prediction: Use the model to predict the outcomes for new data …