Statistics for Environmental Engineers

Скачать в pdf «Statistics for Environmental Engineers»

y, = a0 + 0O Z + a1 x, + 01 Zx, + e,

In this last form the regression is done as though there are three independent variables, x, Z, and Zx. The vectors of Z and Zx have to be created from the categorical variables defined above. The four parameters a0, 0о, a1, and 01 are estimated by linear regression.

A model for each category can be obtained by substituting the defined values. For the first category, Z = 0 and:

y, = a0 + a1 x, + e,

Slopes Diffferent

Slopes Equal





y=(ao+Po) + (ai + Pi)x,-+e,-

y=(ao +Po) + aix + e,

y,-=ao +(ai + Pi)Xi+ei

Уi = ao+aiX,+e,

FIGURE 40.2 Four possible models to fit a straight line to data in two categories.

Complete model y=(aQ+Po)+(a1+p1)x+e

Category 2:

У = (ao+Po)+ai*+e

a0 +eo

FIGURE 40.3 Model with two categories having different intercepts but equal slopes.

For the second category, Z = 1 and:

yt = (a0 + A) ) + (a1 + A) xt + ei

The regression might estimate either P0 or в1 as zero, or both as zero. If во = 0, the two lines have the same intercept. If в1 = 0, the two lines have the same slope. If both в1 and в0 equal zero, a single straight line fits all the data. Figure 40.2 shows the four possible outcomes. Figure 40.3 shows the particular case where the slopes are equal and the intercepts are different.

Скачать в pdf «Statistics for Environmental Engineers»