Exercise

# Predicting house prices

Perhaps the most useful feature of statistical models like linear regression is that you can make predictions. That is, you specify values for each of the explanatory variables, feed them to the model, and you get a prediction for the corresponding response variable. The code flow is as follows.

```
explanatory_data <- tibble(
explanatory_var = some_values
)
explanatory_data %>%
mutate(
response_var = predict(model, explanatory_data)
)
```

Here, you'll make predictions for the house prices in the Taiwan real estate dataset.

`taiwan_real_estate`

is available. The linear regression model of house price versus number of convenience stores is available as `mdl_price_vs_conv`

(*print it and read the call to see how it was made*); and `dplyr`

is loaded.

Instructions 1/3

**undefined XP**

- Create a tibble of explanatory data, where the number of convenience stores,
`n_convenience`

, takes the integer values from zero to ten.