Exercise

# Slopes

During the previous exercise, you used multiple **intercepts** to model the expected values for discrete groups. During this exercise, you will include continuous predictor variables, **slopes**, in the model.

Building models for data science is often an iterative process, requiring both visualizing and modeling data.

In this exercise, you will:

Plot the data and build a model that assumes all the data come from one group with the same linear response to the predictor variable

`x`

. This model has one slope and one intercept estimate.Challenge the above assumption. What happens if we model each group with its own intercept?

Go a step farther. What happens if we model each group as having its own slope and intercept?

Instructions 1/3

**undefined XP**

- Plot the data,
`multIntDemo`

, with`x`

on the x-axis and`response`

on the y-axis. Include a linear model on the plot. - Build a linear model using
`multIntDemo`

where`response`

is predicted by`x`

.