Solutions to Homework 2
(Solutions written by grader
for Section 002)
1.
Do you think x
and ya are positively correlated? If correlation is
present, is it positive or negative?
By the plot of ya*x, there
is positive correlation between x and ya
2.
Do you think x an
yb are positively correlated? If correlation is present, is it negative or
positive?
The plot of yb*x shows
positive correlation between x and yb. Yb has a quadratic
relationship with x.
3.
Do you think x
and yc are positively correlated? If correlation is present, is it negative or
positive?
There is positive correlation between x and yc.
4.
Do you think x1
and y1 are positively correlated? If
correlation is present, is it negative or positive?
If the outlier is ignored, it appears that there is
positive correlation between these two variables.
5.
For the data set
x and ya, calculate the correlation coefficient by
hand. You can get SAS to calculate some
of the values for your hand computation.
Interpret the value that you calculated.
r = sxy / sqrt(sxxsyy) = 0.8164
This value tells us that there is a fairly strong,
positive correlation between x and ya.
6.
Use PROC CORR to
calculate the correlation for each pair of variables. Report the correlation and the p-value for
each pair.
|
Correlation |
p-value |
X with Ya |
0.816 |
0.0022 |
X with Yb |
0.816 |
0.0022 |
X with Yc |
0.816 |
0.0022 |
x1 with y1 |
0.816 |
0.0022 |
7.
Use PROC REG to
fit a regression line to each set of data.
Report the equation of the regression line for each data set.
Ya = 3.00 +
0.5x
Yb = 3.00 +
0.5x
Yc = 3.00 +
0.5x
Y1 = 3.00 + 0.5x1
8.
Create a table
summarizing the mean of the independent variable, mean of the dependent
variable, equation of the regression line, MSE, R-square, r, std. error of the
slope.
|
X and ya |
X and yb |
X and yc |
X1 and y1 |
Mean |
9.000 |
9.000 |
9.000 |
9.000 |
Mean dep var |
7.501 |
7.501 |
7.501 |
7.501 |
Reg. eqn. |
See above |
|
|
|
MSE |
1.530 |
1.531 |
1.528 |
1.527 |
R-square |
0.667 |
0.666 |
0.666 |
0.667 |
r |
0.816 |
0.816 |
0.816 |
0.817 |
se(slope) |
0.118 |
0.118 |
0.118 |
0.118 |
9.
What would happen
to the value of the MSE if we fit a curve, possibly a quadratic, to the data
for x and yb?
The MSE will decrease
10. Write 2 or 3 sentences about how you would handle the
outlier in the data set for x and yc.
First, check the data to determine whether the point
truly is an outlier (e.g., could it have been a data entry error – which could
be corrected, or is it really a realistic value for the data). If it is an outlier, remove it from the data
set and re-fit the regression line.
11. What would happen if that observation was deleted?
If y1 is deleted, then the fitted regression line
would be perpendicular to the x1 axis.