# Chapter Three: Regression with Two or More Independent Variables

Chapter 2 laid the foundation for our study of multiple linear regression by showing how to fit a straight line through a set of data points to describe the relationship between a dependent variable and a single independent variable. All this effort may have seemed somewhat anticlimactic after all the arguments in Chapter 1 about how, in many analyses, it was important to consider the simultaneous effects of several independent variables on a dependent variable. We now extend the ideas of simple (one independent variable) linear regression to multiple linear regression, when there are several independent variables. The ability of a multiple regression analysis to quantify the relative importance of several (sometimes competing) possible independent variables makes multiple regression analysis a powerful tool for understanding complicated problems, such as those that commonly arise in biology, medicine, and the health sciences.

We will begin by moving from the case of simple linear regression—when there is a single independent variable—to multiple regression with two independent variables because the situation with two independent variables is easy to visualize. Next, we will generalize the results to any number of independent variables. We will also show how you can use multiple linear regression to describe some kinds of nonlinear (i.e., not proportional to the independent variable) effects as well as the effects of so-called *interaction* between the variables, when the effect of one independent variable depends on the value of another. We will present the statistical procedures that are direct extensions of those presented for simple linear regression in Chapter 2 to test the overall goodness of fit between the multiple regression equation and the data as well as the contributions of the individual independent variables to determining the value of the dependent variable. These tools will enable you to approach a wide variety of practical problems in data analysis.

When we first visited Mars in Chapter 1, we found that we could relate how much Martians weighed *W* to their height *H* and the number of cups of canal water *C* they consumed daily. Figure 3-1A shows the data we collected (reproduced from Fig. 1-2B). As we discussed in Chapter 1, because there are three discrete levels of water consumption (*C* = 0, 10, or 20 cups/day), we could use Eq. (1.2)

to draw three lines through the data in Fig. 3-1A, depending on the level of water consumption. In particular, we noted that for Martians who did not drink at all, on the average, the relationship between height and weight was

and for Martians who drank 10 cups of canal water per day, the relationship was

and, finally, for Martians who drank 20 cups of canal water per day, the relationship was