## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

# Chapter 8Simple Linear Regression

Regression modeling represents a powerful and elegant method for estimating the value of a continuous target variable. In this chapter, we introduce regression modeling through simple linear regression, where a straight line is used to approximate the relationship between a single continuous predictor variable and a single continuous response variable. Later, in Chapter 9, we turn to multiple regression, where several predictor variables are used to estimate a single response.

## 8.1 An Example of Simple Linear Regression

To develop the simple linear regression model, consider the Cereals data set,1 an excerpt of which is presented in Table 8.1. The Cereals data set contains nutritional information for 77 breakfast cereals, and includes the following variables:

• Cereal name
• Cereal manufacturer
• Type (hot or cold)
• Calories per serving
• Grams of protein
• Grams of fat
• Milligrams of sodium
• Grams of fiber
• Grams of carbohydrates
• Grams of sugar
• Milligrams of potassium
• Percentage of recommended daily allowance of vitamins (0%, 25%, or 100%)
• Weight of one serving
• Number of cups per serving
• Shelf location (1 = bottom, 2 = middle, 3 = top)
• Nutritional rating, as calculated by Consumer Reports.

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required