EXAMPLE 11.22 Price and the Number of Bathrooms
homes04
CASE 11.3 The homes in our data set have 1, 1.5, 2, or 2.5 bathrooms. Figure 11.18 gives a plot of price versus the number of bathrooms with a "smooth’’ fit. The relationship does not appear to be linear, so we start by treating the number of bathrooms as a categorical variable. We require three indicator variables for the four values. To use the homes that have one bath as the basis for comparisons, we let this correspond to "all indicator variables equal to 0.’’ The indicator variables are
Multiple regression using these three explanatory variables gives the output in Figure 11.19. The overall model is statistically significant (, , ), and it explains 53.3% of the variation in price. This is somewhat more than the 37.3% explained by square feet.
The fitted model is
The coefficients of all the indicator variables are statistically significant, indicating that each additional bathroom is associated with higher prices.
574