DOC PREVIEW
UCLA STATS 101A - Stats 101a hw 2 turn in

This preview shows page 1-2 out of 5 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 5 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Brittany Oliva UID 003933164 Stats 101A Sec 2A Homework 2 Problem 1 a) Welch Two Sample t-test data: attitudeproj by transfer t = -0.1971, df = 38.503, p-value = 0.8448 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -14.12185 11.61467 sample estimates: mean in group 1 mean in group 2 70.47368 71.72727 Since the p-value is .84 which is greater than .05, we fail to reject the Null Hypothesis which tells us that there is no relationship between attitude towards the project given that they are a transfer or not. H0 states that the true difference in means is equal to 0 (the means are equal) which we failed to reject so the means are indeed equal. As for the confidence interval of -14.12 to 11.61, it tells us again that we should not reject the null hypothesis and that there is no evidence telling us that being a transfer affects one’s attitude toward a project because the interval includes zero. b) Call: lm(formula = attitudeproj ~ transfer) Residuals: Min 1Q Median 3Q Max -47.727 -15.727 6.526 15.273 24.526 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 69.220 10.302 6.719 5.22e-08 *** transfer 1.254 6.377 0.197 0.845 Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 20.36 on 39 degrees of freedom (9 observations deleted due to missingness) Multiple R-squared: 0.0009899, Adjusted R-squared: -0.02463 F-statistic: 0.03864 on 1 and 39 DF, p-value: 0.8452 After conducting the linear model, we find the above data. Our p-value is high, .8452, which means we will fail to reject the null hypothesis telling us that the slope is zero. This confirms what we saw in question a because since there is only a one unit increase in the Transfer variable (from 1 to 2) then having 1.254 is not that far from 1, showing the little difference it makes, confirming there is no significant relationship between the two variables.Problem 2 a)Call: lm(formula = armspan ~ height, data = armspandata, na.action = na.omit) Residuals: Min 1Q Median 3Q Max -13.8291 -1.1998 0.4801 1.4857 7.0980 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.52483 2.19883 0.693 0.49 height 0.96630 0.03291 29.361 <2e-16 *** Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 3.129 on 81 degrees of freedom (2 observations deleted due to missingness) Multiple R-squared: 0.9141, Adjusted R-squared: 0.913 F-statistic: 862.1 on 1 and 81 DF, p-value: < 2.2e-16 1.5248 0.9663 Equation for predicting armspan from height: armspan = 1.5248 + .9663 * (height) Here we see our slope is pretty much 1 which is exactly what we would hope so that there can be a relationship between armspan and height. With a slope of 1 we can see that the height and armspan can be equal. We must take note that the missing information has been removed and this affects our data. Residual plot: The residual line is very close to zero. The residual plot seems to be random as we see a group of data to the right while there are other points scattered below and to the left of the larger group, these outliers are 12 and 6, and leverage points with smaller x values than the rest of the points. The plot should look like splattered paint for it to be linear but groups cause doubt especially when we also see outliers, but overall I believe we can assume linearity. We must take note that the missing information has been removed and this affects our data. b) The confidence interval for the height and slope is: 2.5 % 97.5 % (Intercept) -2.8501470 5.899805 height 0.9008204 1.031787 Vitrivius’ theory states plainly that the ideal human should have armspan equal to height, and given that our data is a normal model, our confidence interval for the intercept includes 1 as it should to show the expectation of equal height and armspan. Also the intercept CI includes 0 aswe would hope it is so that there is a 0 intercept while the slope is 1 giving us equal armspan and height. c) ANOVA table: Df Sum Sq Mean Sq F value Pr(>F) height 1 8441 8441 862.1 <2e-16 *** Residuals 81 793 10 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 2 observations deleted due to missingness You can find the F-value using R2 as follows: F = R2/((1-R2)/(N-2)) which equals 871, which is close to the F-value found in our ANOVA table of 862.1 (possibly due to rounding). We found that the .95 (95%) quantile on 1 with 83 degrees of freedom to be 3.956, whereas our F is 862, so since the calculated value is larger than tabulated value, so we reject the null. The null hypothesis we are testing through ANOVA is that our slope (B1) is equal to 0, which we rejected and found that the regression model was indeed a good fit in general. d) Using the equations from the TA homework help page: SStotal = sd(armspan)^2 *84 = 9322 SSresidual/error = (3.129)^2 * 81 = 793 SSregression = SStotal – SSresidual/error = 9322 – 793 = 8529 Se(b) = SE of B1 = S(e) / sqrt(SXX)= 3.129/sqrt(9322)= .0324 R2 = SSregression/SStotal = 8529/9322 = .9149 (1-R2) = 1 - .9149 = .0851 e) Adjusted R2 = 1 – ((1-R2)(N-1))/(N-K-1) = .9138 We found R2 to be .9141 which is close to Adjusted R2 but a little larger. The R2 is not dependent on the number of variables in the model while the adjusted R2 is. Adjusted R2 is R2 with some divisions added to make it dependent on the number of variables in the model which decreases its value a little as compared to R2. Problem 3 show that Bhat1 = ∑(ciyi)Problem 4 a) 95% estimation interval for x = 40 (x = knowledgepre) fit lwr upr 1 48.72798 47.60448 49.85148 Estimation interval is then (47.6, 49.85) b) 95% prediction interval for x = 40 fit lwr upr 1 48.72798 17.66642 79.78954 Prediction interval is then: (17.67, 79.79) c) The confidence interval tells us how well we determined the mean while the prediction interval tells us about the distribution of values, not the uncertainty in determining the population means. The estimation interval tells us that a group of people with a mean pre-test of 40, then their mean post-test should be on the interval (47.6, 49.85). The prediction interval tells us that if you have one person with


View Full Document

UCLA STATS 101A - Stats 101a hw 2 turn in

Documents in this Course
Load more
Download Stats 101a hw 2 turn in
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Stats 101a hw 2 turn in and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Stats 101a hw 2 turn in 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?