# tTestIndSoTL.R # independent samples t test for SoTL # Import Data From Spreadsheet (Step 1) # ------------------------------------- # Data: numeric data, blank cells are ok, but no cells with words. ControlGroupData = read.table(file = "clipboard", sep = "\t", header = TRUE)[,1]; ControlGroupData ; # display control group data in console. TreatmentGroupData = read.table(file = "clipboard", sep = "\t", header = TRUE)[,1]; TreatmentGroupData ; # display treatment group data in console. # Find the means and standard deviations (Step 2) # ----------------------------------------------- mean(ControlGroupData); # the mean of the Control group sd(ControlGroupData); # the standard deviation of the Control group mean(TreatmentGroupData); # the mean of the Treatment Group sd(TreatmentGroupData); # the standard deviation of the Treatment Group # Create boxplots of the groups' data (Step 3) # -------------------------------------------- boxplot(ControlGroupData, TreatmentGroupData, main = "Boxplots of Control and Treatment Groups", names = c("Control Group", "Treatment Group"), col = c("grey","violet"), ylab = "Quiz scores" ); # Do the independent samples t-test mu = 0 (Step 4) # -------------------------------------------------- t.test(TreatmentGroupData, ControlGroupData, alternative = "greater", mu = 0); # End of Script #---------------------------------------------