hw5_solutions

# hw5_solutions - STAT 3022 Lab, March 30, 2009 TA: Jinghan...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: STAT 3022 Lab, March 30, 2009 TA: Jinghan Meng EX 10.10 (a) > tuition <- read.table("E:/DataSets/PC-Text/ch10/ta10_001.txt", + sep="\t",header=T) > attach(tuition) > plot(Year.2000, Year.2005, main="Tuition 2000 versus 2005") 3000 4000 5000 6000 7000 4000 6000 8000 10000 Tuition 2000 versus 2005 Year2000 Year2005 The plot shows a strong linear relationship with no striking outliers. (b) > m <- lm(Year.2005 ~ Year.2000) > summary(m) Call: lm(formula = Year.2005 ~ Year.2000) Residuals: Min 1Q Median 3Q Max-1559.04-341.78 47.53 568.54 932.99 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.059e+03 3.968e+02 2.669 0.0122 * Year.2000 1.393e+00 8.988e-02 15.498 7.34e-16 *** Residual standard error: 626.6 on 30 degrees of freedom Multiple R-squared: 0.889, Adjusted R-squared: 0.8853 F-statistic: 240.2 on 1 and 30 DF, p-value: 7.337e-16 1 STAT 3022 Lab, March 30, 2009 TA: Jinghan Meng The regression line is ˆ y = 1059 + 1 . 393 x . (c) > plot(Year.2000, residuals(m), main="Residuals versus 2000") > abline(h=0) > hist(residuals(m)) In the plot (below, left), it appears that large x values, many residuals are negative. 3000 4000 5000 6000 7000-1500-1000-500 500 1000 Residuals versus 2000 Year2000 residuals(m) Histogram of residuals(m) residuals(m) Frequency-2000-1500-1000-500 500 1000 2 4 6 8 (d) The histogram (above, right) suggests a left skew. (e) To test for a relationship, we test H : β 1 = 0 vs. H a : β 1 6 = 0. (f) From the above R output, the test statistic t = 15 . 498 with df = 30, and p-value is 7.34e-16. We have strong evidence of a non-zero slope. EX 10.11 (a) From the above R output, the estimate of β 1 is 1.393, standard error is 8.988e-02. For the 95% confidence interval, t * is > qt(0.975,30) [1] 2.042272 So 95% is 1 . 393 ± 2 . 042272 × . 08988 = [1 . 2095 , 1 . 5765]. When tuition in 2000 is \$5000, the predicted tuition in 2005 is 8024.048. The 95% confidence interval is [7758 . 128 , 8289 . 969]. This slope means that a \$1 difference in tuition in 2000 changes 2005 tuition by between \$1.21 and \$1.58, so we estimate that tuition increase by 21% and 58%. (b) When x = 5000, the estimated 2005 tuition is ˆ y = 1059+1 . 393(5000) = 8024 . 048....
View Full Document

## This note was uploaded on 02/24/2011 for the course STAT 3022 taught by Professor Staff during the Spring '08 term at Minnesota.

### Page1 / 9

hw5_solutions - STAT 3022 Lab, March 30, 2009 TA: Jinghan...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online