(I)

(a)

## 
##  Welch Two Sample t-test
## 
## data:  DRP$Response by DRP$Treatment
## t = -2.3109, df = 37.855, p-value = 0.02638
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
##  -18.67588  -1.23302
## sample estimates:
## mean in group Control mean in group Treated 
##              41.52174              51.47619

The lower bound for the 95% confidence interval for the difference in average DRP score is: -18.6759

The upper bound for the 95% confidence interval for the difference in average DRP score is: -1.2330

(b)

I am 95% confident that on average, the treatment group scored higher on the DRP test than the control group by between 1.2330 and 18.6759

(c)

## 
##  Welch Two Sample t-test
## 
## data:  DRP$Response by DRP$Treatment
## t = -2.3109, df = 37.855, p-value = 0.01319
## alternative hypothesis: true difference in means is less than 0
## 95 percent confidence interval:
##       -Inf -2.691293
## sample estimates:
## mean in group Control mean in group Treated 
##              41.52174              51.47619

Null hypothesis: (Control group scores) ≥ (Treatment group scores)

Alternative hypothesis: (Control group scores) < (Treatment group scores)

Test-statistic = -2.3109

Our average sample difference ((average of control)-(average of treatment)) was -2.3109 standard errors below our hypothesized difference of 0.

(d)

## [1] 0.01319121

The p-value for the above stated test statistic and null hypothesis = .01319

If the null hypothesis were true, that the control group scores on the DRP test are greater than or equal to the treatment group scores, then we would observe our data 1.319% of the time.

(e)

α = .05 pvalue < α Therefore we reject the null hypothesis.

At the 5% significance level, there is sufficient evidence to support the claim the treatment group scored higher on the DRP test, on average, than the control group.

(II)

(a)

Null hypothesis: mean(a)=mean(b)=mean(c)

Alternative hypothesis: At least one of the means in IQ scores between majors differs.

ANOVA Table:

## Analysis of Variance Table
## 
## Response: IQ$iq
##           Df Sum Sq Mean Sq F value    Pr(>F)    
## IQ$group   2 1529.4  764.69  20.016 7.843e-07 ***
## Residuals 42 1604.5   38.20                      
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(b)

F-statistic = 20.016

P-value from F table: Pr(F>11.70)=.0001

P-value from anova table: 7.843e-07

If the null hypothesis were true, that there is no difference in the average IQ scores between majors, then we would observe our data 7.843e-05% of the time.

(c)

If α=.001

Pvalue << α

Then we reject the null hypothesis.

(d)

At the 0.1% significance level, there is sufficent evidence to support the claim that at least one of the means in IQ scores between majors differs.

(e)

The QQ plot of the IQ scores shows that the data does not appear to be distributed normally because a large part of the data is not clustered around the normal straight quanitle line.

As a check, I plotted a histogram for the IQ scores. This also shows that the data is not distributed normally.

Code Appendix

IQ <- read.csv("C:/Users/yasse/Downloads/IQ.csv")
DRP <- read.csv("C:/Users/yasse/Downloads/DRP.csv")
t.test(DRP$Response~DRP$Treatment, conf.level = 0.95, alternative="two.sided")
teststatistic = t.test(DRP$Response~DRP$Treatment, conf.level = 0.95, alternative = "less")
teststatistic
teststatistic$p.value
anova(lm(IQ$iq~IQ$group))
qqnorm(IQ$iq)
qqline(IQ$iq)
hist(IQ$iq)