# New Statistics Short Course # Exercise 2: Issues with NHST and p-values # Open and inspect the dataset dat<-read.csv(file.choose()) names(dat) head(dat) # Explore the means tapply(dat$mot_apol,dat$group,mean) # Question 1 # a) Ho: mu1 = mu2, Ha: mu1 != mu2 # b) It is highly unlikely that these populations would be # exactly equal # c) t.test(mot_apol ~ group, data=dat) # It is expected that the p-value is this small given the # sample size # d) The alpha level will depend on the nature of the research # How exploratory vs confirmatory is the research? # Will the government force people to go to church if the # effect is statistically significant? # e) The magnitude of the p-value does not provide an estimate # of the probability that Ho is true ## f) Maybe a more informative research hypothesis is whether # the church group is at least 2.5 points higher than the # no_church group (about d = .5) # A more informative hypothesis given the research question t.test(mot_apol ~ group, mu=2.5, data=dat) ## g) Dichotomous vs magnitude of p-value? Neither is very good # in this setting given all that we have discussed. # Question 2 # a) Sample of 50 cases library(dplyr) dat2<-sample_n(dat,50) t.test(mot_apol ~ group, data=dat2) # Sample of 25 cases dat3<-sample_n(dat, 25) t.test(mot_apol ~ group, data=dat3) # b) Five samples of n = 50 s1<-sample_n(dat,50) s2<-sample_n(dat,50) s3<-sample_n(dat,50) s4<-sample_n(dat,50) s5<-sample_n(dat,50) t.test(mot_apol ~ group, data=s1) t.test(mot_apol ~ group, data=s2) t.test(mot_apol ~ group, data=s3) t.test(mot_apol ~ group, data=s4) t.test(mot_apol ~ group, data=s5) # c) No!!!