DEPENDENT T-TEST

This analysis assesses whether there is a significant difference in employees’ communication skills before and after attending a professional communication training program

HYPOTHESES

R code and Analysis

Import Excel File

Purpose:

Import your Excel dataset into R for conduct analyses.

# INSTALL REQUIRED PACKAGE
 
# install.packages("readxl")
 
# LOAD THE PACKAGE
 
library(readxl)
 
# IMPORT EXCEL FILE INTO R STUDIO
 
A6R3 <- read_excel("C:/Users/konifade/Downloads/A6R3.xlsx")
 
 head(A6R3)
## # A tibble: 6 × 3
##   EmployeeID PreTraining PostTraining
##        <dbl>       <dbl>        <dbl>
## 1          1          64           71
## 2          2          42           50
## 3          3          60           71
## 4          4          61           78
## 5          5          57           63
## 6          6          56           67

CALCULATE THE DIFFERENCE SCORES

Purpose:

Calculate the difference between the before scores versus the after scores

Before <- A6R3$PreTraining

After <- A6R3$PostTraining

Differences <- After - Before
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: Symmetrical (looks balanced on both sides)

####QUESTION 2:Did the histogram look too flat, too tall, or did it have a proper bell curve?

Answer: The histogram has a proper bell curve (normal distribution shape)

SHAPIRO-WILK TEST

Check the normality for the difference between the groups.

shapiro.test(Differences)
## 
##  Shapiro-Wilk normality test
## 
## data:  Differences
## W = 0.98773, p-value = 0.21

QUESTION: Was the data normally distributed or abnormally distributed?

Answer:The data was normally distributed.

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?

  1. No dots.

  2. One or two dots.

  3. Many dots.

Answer: A

QUESTION 2: Where are the dots in your boxplot?

  1. There are no dots.

  2. Very close to the whiskers (lines of the boxplot).

  3. Far from the whiskers (lines of the boxplot).

QUESTION 3: Based on the dots and there location, is the data normal?

Answer: Normal

DESCRIPTIVE STATISTICS

The Mean, Median, and SD For Each Group.
# 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

EFFECT SIZE FOR DEPENDENT T-TEST

Purpose:

Determine how big of a difference there was between the group means.

# INSTALL REQUIRED PACKAGE

# 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]

COMMENT

Cohen’s d = -1.90 (very large effect), which means the training had a substantial practical impact.

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?

Ans.

RESULT PARAGRAPH

A dependent t-test was conducted to compare employees’ communication skill scores before and after participating in a professional communication training program among 150 employees. Results showed that post-training scores (M = 69.24, SD = 9.48) were significantly higher than pre-training scores (M = 59.73, SD = 7.97), t(149) = -23.29, p < .001. The effect size was Cohen’s d = -1.90, indicating a very large effect. These results suggest that the communication training program led to a substantial improvement in employees’ communication skills.