The vast majority of problems in applied data science require regression modeling. That is, you have a response variable (y) that you want to model or predict as a function of a vector of inputs or covariates (x). This chapter introduces the basic framework and language of regression. We will build on this material throughout the rest of the book.
A basic but powerful regression strategy is to deal in averages and lines. We model the conditional mean for y given x as
Here, x = [1, x1, x2, . . . xp] is a vector of covariates ...