Regression Worksheet
STA 3024, Spring, 2000
1. In a regression of y = salary on x = years of experience, the dummy variable D was coded 1 for males, 0 for females; the prediction equation was:
.
y-hat = 33 + 1.2x
b) How much is the intercept for Females different from Males?
The intercept for females is 3 units lower, or 30.
c) Sketch the prediction equations for Males and for Females
Draw two straight lines; for males, see above; for females, the intercept = 30, slope = 2.
d) Suppose that -0.8 was not significantly different from zero. Interpret the fitted equation, using words from this particular problem, e.g. salary, females.
Both men and women's salaries rise at 2 units per year, but women start out 3 units lower.
e) What does d) have to do with ANCOVA?
The slopes (increase in salary per year of exper.) are the same, hence ANCOVA is possible.
2. Suppose you have y = # species and x = % ground cover. You have data from three habitats, A, B, and C. Describe how you would set up a regression model Make D1 = 1 only in Habitat B; make D2 = 1 only in Habitat C; regress y on x, D1, and D2. To check whether the slope of # species on ground cover is the same in all habitats, introduce two new variables D1*x and D2*x; if (say) the coefficient of D1*x is significant, the slope for y on x is different in Habitat B from the slope in Habitat A.
See if the estimate of b 2 was significantly greater than 0 (one-sided t-test.)
How would you test whether Habitat C had a different slope from Habitat A? A t-test on the estimate of b 5; H0: b 5 = 0.
3. A fitted equation was ![]()
What is the fitted equation in terms of y? You can assume either natural or common logs.
Y-hat = 3.67 x0.8 assuming base e
How could you test whether y was proportional to x? Don't do the test, just describe it.
Test whether the exponent of x was significantly different from 1, t = (0.8 - 1)/(std. err. of 0.8).