In: Math
Researcher conducts a study to decide whether support groups
improve academic performance for at-risk high school students. Ten
such students are randomly selected to take part in the support
group for a semester, while the other 10 at-risk students serve as
a control group. At the end of the semester, the improvement in GPA
versus the previous semester is recorded for each student.
Support Group: 0.5, 0.8, 0.7, 0.7, -0.1, 0.2, 0.4, 0.4, 0.5,
0.4
Control Group: -0.3, 0.0, -0.1, 0.2, -0.1, -0.2, -0.2, 0.0, -0.1,
0.1
At the 10% level, use R to compare the two groups using a permutation test (with 100,000 randomly generated permutations). You need to write your hypotheses, the test statistic, the pvalue, and the decision/conclusion in the context of the problem.
R code for reference:
SupportGroup <- c(0.5, 0.8, 0.7, 0.7, -0.1, 0.2, 0.4, 0.4,
0.5, 0.4)
ControlGroup <- c(-0.3, 0.0, -0.1, 0.2, -0.1, -0.2, -0.2, 0.0,
-0.1, 0.1)
mean(SupportGroup);sd(SupportGroup)
mean(ControlGroup);sd(ControlGroup)
#permutation test on difference of means
choose(20,10)#number of possible permutations
new.dat <- c(SupportGroup,ControlGroup)
obs.mean.diff <- mean(SupportGroup) - mean(ControlGroup)
nsim <- 100000
sim.mean.diff <- rep(NA,length=nsim)
for (i in 1:nsim){
grps <- sample(c(rep(1,10),rep(2,10)),replace=FALSE)
sim.mean.diff[i] <- mean(new.dat[grps==1]) -
mean(new.dat[grps==2])
}
hist(sim.mean.diff);abline(v=obs.mean.diff,col="red",lty=2)
length(sim.mean.diff[sim.mean.diff<=obs.mean.diff])/nsim
#estimated p-value