Question: x = read.csv(file.choose(), header=T) state=x$GESTFIPS wage=x$PTERNWA wage[wage <1]=NA sed=x$PREDUCA5 gender=x$PESEX education=x$PREDUCA5 wageAZ=wage[state==4] genderAZ=gender[state==4] educationAZ=education[state==4] mwage=wage[gender==1] fwage=wage[gender==2] mwageAZ=wageAZ[gender==1] fwageAZ=wageAZ[gender==2] var.test(mwage,fwage) t.test(fwageAZ,mwageAZ,alternative=less) aw=aov(wage~factor(education)) summary(aw) print(model.tables(aw,means),digits=3) TukeyHSD(aw) data(InsectSprays)
x = read.csv(file.choose(), header=T) state=x$GESTFIPS wage=x$PTERNWA wage[wage<1]=NA sed=x$PREDUCA5 gender=x$PESEX education=x$PREDUCA5 wageAZ=wage[state==4] genderAZ=gender[state==4] educationAZ=education[state==4] mwage=wage[gender==1] fwage=wage[gender==2] mwageAZ=wageAZ[gender==1] fwageAZ=wageAZ[gender==2] var.test(mwage,fwage) t.test(fwageAZ,mwageAZ,alternative="less") aw=aov(wage~factor(education)) summary(aw) print(model.tables(aw,"means"),digits=3) TukeyHSD(aw) data(InsectSprays) str(InsectSprays) attach(InsectSprays) tapply(count, spray, mean) aov.out = aov(count ~ spray, data=InsectSprays) summary(aov.out) TukeyHSD(aov.out) Name Assignment 6. Please fill in the yellow areas with your text or numeric answer. Please fill in the blue areas with a graphic generated in R Problem 1.Is the proportion of men with a BS or BA (coded as 5 in the education column)higher than the proportion of women in Arizona? Null hypothesis p1 = p2 Alternate hypothesis p1 > p2 Paste the output from your R prop.test or binom.test below: Explain your results in several sentences. The reported results indicated no enough evidence to conclude that the proportion of men with a BS or BA is higher than the proportion of women in Arizona, Chi-square test statistic (1) = 0.1705, p = 0.6602 > .05. Problem 2. Do women earn less than men in Arizona? Null hypothesis 1 = 2 Alternate hypothesis 1 < 2 Paste the output from your R t.test below: Explain your results in several sentences. The reported results indicated no enough evidence to conclude that women earn less than men in Arizona, t (170) = 0.3858, p = 0.6499 > .05. Problem 3. Using the census data for all of the USA, perform an ANOVA to determine whether the mean weekly salary is the same for each level of educational attainment. Null hypothesis 1 = 2 = 3 = 4 = 5 Alternate hypothesis At least two of the five levels of education differ in mean weekly salaries. Paste the output from your R one way ANOVA test below: Explain your results. The reported results indicated no enough evidence to conclude that the mean weekly salary is the same for each level of educational attainment, F (4, 13490) = 797.5, p < .001. If the null hypothesis is rejected, perform the Tukey HSD post-hoc and paste your R results below. Which pairs of educational levels show statistically significant differences. The reported Tukey's results indicated that all the pairs of levels of educational attainment were differ significantly in mean weekly salary except the pair of levels 3 and 2. Chapter 9. Problem 6a. Null hypothesis D = 0 Alternate hypothesis D > 0 Paste the output from your R paired t.test below: Explain your results. The reported results indicated (no) enough evidence to conclude that the new method is effective t (df) = value, p = p-value > (<) .05. Chaper 11. Problem 4. Null hypothesis 1 = 2 = 3 = 4 = 5 = 6 Alternate hypothesis At least two of the six insect sprays differ in mean effectiveness. Paste the output from your R one way ANOVA test below: Explain your results. The reported results indicated no enough evidence to conclude that the mean effectiveness is the same for each of the six insect sprays, F (5, 66) = 34.7, p < .001. If the null hypothesis is rejected, perform the Tukey HSD post-hoc and paste your R results below. Which pair(s) show statistically significant differences? The reported Tukey's results indicated that all the pairs of insect sprays were differ significantly in mean effectiveness except the pairs (A, B), (A, F), (B, F), (D, C), (E, C), and (E, D)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
