You typically use paired T Tests when you have parametric data that is comparing data that has been collected at two different times, with something happening between those two points. In Social Work research that often means we are doing an intervention that we want to test. In this case, we are using the UMKC School of Social Work Research class. We gave a pretest the first day of class and a post-test after all coursework was completed. So here i compare the scores
Ttest <-read.delim("/Volumes/Mirror Mirror /Google Drive/Research_UMKC/SE4SW.FE/T_Tests/prepost.txt")
pre<-shapiro.test(Ttest$PRE) post<-shapiro.test(Ttest$POST)
pre
## ## Shapiro-Wilk normality test ## ## data: Ttest$PRE ## W = 0.98146, p-value = 0.7179
post
## ## Shapiro-Wilk normality test ## ## data: Ttest$POST ## W = 0.92363, p-value = 0.007946
OH NO! While the 'pre' score is good on the Shapiro Test (greater than .05 on the p-value), the 'POST' value is significant at .008. Decision time (do both is the best answer), but a lot of times you will see people report their findings without any sort of an understanding if there was test for normality done first.
Let's soldier on....So even though we saw the Shapiro test on the POST data was not normally distributed, we are going to go ahead and use the T Test anyway. Then we will do a Wilcoxon Signed Rank Test to confirm our findings.
Crafting Box Plots in R is not difficult:
boxplot(Ttest$PRE,Ttest$POST, names=c('pre-test','post-test'), main='Boxplots comparing scores on Pre-test vs Post-test', col=c('blue','yellow'))