DEPENDENT T-TEST & WILCOXON SIGN RANK
NULL HYPOTHESIS (H0)
There is no difference between the
communication skills before training and after training of
employees.
ALTERNATE HYPOTHESIS (H1)
There is a difference
between the communication skills before training and after training of
employees.
LOAD THE PACKAGE
library(readxl)
IMPORT EXCEL FILE INTO R STUDIO
dataset <- read_excel("C:\\Users\\burug\\Downloads\\A6R3.xlsx")
CALCULATE THE DIFFERENCE SCORES
Before <- dataset$PreTraining
After <- dataset$PostTraining
Differences <- After - Before
CREATE THE HISTOGRAMS
hist(Differences,
main = "Histogram of Difference Scores",
xlab = "Value",
ylab = "Frequency",
col = "blue",
border = "black",
breaks = 20)
QUESTION 1: Is the histograms symmetrical, positively skewed, or
negatively skewed?
ANSWER: Negatively Skewed
QUESTION 2: Did the histogram look too flat, too tall, or did it have
a proper bell curve?
ANSWER: Too Tall
SHAPIRO-WILK TEST
shapiro.test(Differences)
##
## Shapiro-Wilk normality test
##
## data: Differences
## W = 0.98773, p-value = 0.21
QUESTION 1: Was the data normally distributed or abnormally
distributed?
ANSWER: Normally Distributed because p value is greater than 0.05
BOXPLOT
boxplot(Differences,
main = "Distribution of Score Differences (After - Before)",
ylab = "Difference in Scores",
col = "blue",
border = "darkblue")
QUESTION 1: How many dots are in your boxplot?
ANSWER: One dot
QUESTION 2: Where are the dots in your boxplot?
ANSWER: One dot far from whiskers
QUESTION 3: Based on the dots and there location, is the data
normal?
ANSWER: Data Is normal
DESCRIPTIVES FOR BEFORE SCORES
mean(Before, na.rm = TRUE)
## [1] 59.73333
median(Before, na.rm = TRUE)
## [1] 60
sd(Before, na.rm = TRUE)
## [1] 7.966091
length(Before)
## [1] 150
DESCRIPTIVES FOR AFTER SCORES
mean(After, na.rm = TRUE)
## [1] 69.24
median(After, na.rm = TRUE)
## [1] 69.5
sd(After, na.rm = TRUE)
## [1] 9.481653
length(After)
## [1] 150
DEPENDENT T-TEST
t.test(Before, After, paired = TRUE)
##
## Paired t-test
##
## data: Before and After
## t = -23.285, df = 149, p-value < 2.2e-16
## alternative hypothesis: true mean difference is not equal to 0
## 95 percent confidence interval:
## -10.313424 -8.699909
## sample estimates:
## mean difference
## -9.506667
LOAD THE PACKAGE
library(effectsize)
CALCULATE COHEN’S D
cohens_d(Before, After, paired = TRUE)
## For paired samples, 'repeated_measures_d()' provides more options.
## Cohen's d | 95% CI
## --------------------------
## -1.90 | [-2.17, -1.63]
QUESTION 1: What is the size of the effect?
ANSWER: A Cohen’s D
of 1.90 indicates the difference between the group averages was very
large.
QUESTION 2: Which group had the higher average score?
ANSWER:
After training employees had more communication skills
REPORT
A dependent t-test was conducted to improve employee
communication skills by participating in a training program. among 150
participants. Results showed that after training (M = 69.24, SD = 9.49)
were significantly higher than before training (M = 59.74, SD = 7.97),
t= -23.285, p < .05. The effect size was Cohen’s d = 1.90, indicating
a large effect. These results suggest that the communication skills of
employees improved after training.